import { Card, CardContent } from "@/components/ui/card"
import Link from "next/link"
import { Calendar } from "lucide-react"

const years = Array.from({ length: 2025 - 2014 + 1 }, (_, i) => 2025 - i)

export default function ArchivePage() {
    return (
        <div className="flex flex-col gap-6">
            <h1 className="text-3xl font-bold tracking-tight">Archive</h1>
            <p className="text-muted-foreground">Browse shows by year.</p>
            <div className="grid gap-4 md:grid-cols-3 lg:grid-cols-4">
                {years.map((year) => (
                    <Link key={year} href={`/shows?year=${year}`}>
                        <Card className="hover:bg-accent/50 transition-colors cursor-pointer text-center py-6">
                            <CardContent>
                                <div className="text-4xl font-bold text-primary">{year}</div>
                                <div className="flex items-center justify-center gap-2 mt-2 text-muted-foreground">
                                    <Calendar className="h-4 w-4" />
                                    <span>Browse Shows</span>
                                </div>
                            </CardContent>
                        </Card>
                    </Link>
                ))}
            </div>
        </div>
    )
}
