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 (
);
}