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

export default function AdminFilesLoading() {
  return (
    <div className="flex h-full flex-col space-y-6 p-8">
      <div className="space-y-2">
        <Skeleton className="h-8 w-48" />
        <Skeleton className="h-4 w-72" />
      </div>

      {/* 统计卡片骨架 */}
      <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
        {Array.from({ length: 4 }).map((_, i) => (
          <Card key={i}>
            <CardContent className="p-4">
              <Skeleton className="h-3.5 w-24" />
              <Skeleton className="mt-2 h-7 w-16" />
            </CardContent>
          </Card>
        ))}
      </div>

      {/* 上传区骨架 */}
      <Skeleton className="h-32 w-full rounded-lg" />

      {/* 工具栏骨架 */}
      <div className="flex gap-3">
        <Skeleton className="h-9 w-[200px]" />
        <Skeleton className="h-9 flex-1" />
      </div>

      {/* 列表骨架 */}
      <Card>
        <CardHeader className="border-b bg-muted/40 py-2">
          <Skeleton className="h-4 w-full" />
        </CardHeader>
        <CardContent className="p-0">
          {Array.from({ length: 6 }).map((_, i) => (
            <div key={i} className="flex items-center gap-3 border-b p-3">
              <Skeleton className="h-4 w-4" />
              <Skeleton className="h-6 w-6" />
              <Skeleton className="h-4 flex-1" />
              <Skeleton className="h-3 w-24" />
              <Skeleton className="h-3 w-32" />
              <Skeleton className="h-3 w-32" />
              <Skeleton className="h-8 w-24" />
            </div>
          ))}
        </CardContent>
      </Card>
    </div>
  )
}
