import { Skeleton } from "@/shared/components/ui/skeleton"
import { Card, CardContent, CardFooter, CardHeader } from "@/shared/components/ui/card"

export default function Loading() {
  return (
    <div
      role="status"
      aria-busy="true"
      aria-label="加载中"
      className="space-y-8"
    >
      <div className="space-y-2">
        <Skeleton className="h-8 w-40" />
        <Skeleton className="h-4 w-56" />
      </div>
      <Skeleton className="h-10 w-full max-w-md" />
      <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
        {Array.from({ length: 8 }).map((_, i) => (
          <Card key={i} className="h-full overflow-hidden">
            <div className="aspect-[4/3] w-full bg-muted/30 p-6 flex items-center justify-center">
              <Skeleton className="h-24 w-20 rounded-sm" />
            </div>
            <CardHeader className="p-4 pb-2 space-y-2">
              <Skeleton className="h-5 w-16" />
              <Skeleton className="h-6 w-full" />
            </CardHeader>
            <CardContent className="p-4 pt-0 space-y-2">
              <Skeleton className="h-4 w-24" />
              <Skeleton className="h-4 w-32" />
            </CardContent>
            <CardFooter className="p-4 pt-0 mt-auto">
              <Skeleton className="h-6 w-full rounded-md" />
            </CardFooter>
          </Card>
        ))}
      </div>
    </div>
  )
}
