import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Card, CardContent } from "@/components/ui/card"; export default function LegacyCertificateGenerator() { const [name, setName] = useState(""); const [event, setEvent] = useState(""); const [year, setYear] = useState(""); const [submitted, setSubmitted] = useState(false); const [subtitle, setSubtitle] = useState(""); const generateSubtitle = (event, year) => { const templates = [ `Veteran of the ${event} Collapse of ${year}`, `Crowned and Forgotten – ${year}`, `Honorably Mentioned in ${event} (${year})`, `Peak Form Achieved. Decline Immediate. (${year})`, `Emotionally Unranked Since ${year}` ]; return templates[Math.floor(Math.random() * templates.length)]; }; const handleGenerate = () => { if (name && event && year) { const newSubtitle = generateSubtitle(event, year); setSubtitle(newSubtitle); setSubmitted(true); } }; const generateMerchLink = () => { const base = '/merch/preview'; const query = `?name=${encodeURIComponent(name)}&event=${encodeURIComponent(event)}&year=${encodeURIComponent(year)}&subtitle=${encodeURIComponent(subtitle)}`; return base + query; }; return (

Burnt Legacy Certificate Generator

setName(e.target.value)} /> setEvent(e.target.value)} /> setYear(e.target.value)} />
{submitted && (

🏆 Burnt Legacy Sports Certificate 🏆

This certifies that {name}

Peaked during {event} in {year}

{subtitle}

Apply this to merch →
)}
); }