import * as React from 'react';
import { Skeleton } from '@/components/ui/skeleton';

export default function CategoryLoading() {
  return (
    <main className="min-h-screen bg-[#0F0F12]">
      <div className="container mx-auto px-4 py-8 max-w-7xl">
        {/* Breadcrumb skeleton */}
        <div className="flex items-center gap-2 mb-4">
          <Skeleton className="h-4 w-16 bg-[#202026]" />
          <Skeleton className="h-4 w-4 bg-[#202026]" />
          <Skeleton className="h-4 w-24 bg-[#202026]" />
        </div>

        {/* Title skeleton */}
        <Skeleton className="h-10 w-48 mb-2 bg-[#202026]" />

        {/* Article count skeleton */}
        <Skeleton className="h-4 w-24 mb-8 bg-[#202026]" />

        {/* Filters skeleton - Search and Sort only (no category filter) */}
        <div className="mb-8 flex flex-col md:flex-row gap-4">
          <Skeleton className="flex-1 h-11 bg-[#202026]" />
          <Skeleton className="h-11 w-[150px] bg-[#202026]" />
        </div>

        {/* Article grid skeleton - 2 columns to match ArticleGrid */}
        <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12">
          {Array.from({ length: 10 }).map((_, index) => (
            <div key={index} className="rounded-lg border border-[#2A2A33] bg-[#202026] overflow-hidden shadow-sm">
              {/* Image Skeleton */}
              <Skeleton className="aspect-video w-full bg-[#202026]" />
              
              {/* Content Skeleton */}
              <div className="p-4 space-y-3">
                <Skeleton className="h-6 w-20 bg-[#202026]" />
                <Skeleton className="h-6 w-full bg-[#202026]" />
                <Skeleton className="h-6 w-3/4 bg-[#202026]" />
                <Skeleton className="h-4 w-full bg-[#202026]" />
                <Skeleton className="h-4 w-5/6 bg-[#202026]" />
                <div className="flex gap-4 pt-2">
                  <Skeleton className="h-4 w-24 bg-[#202026]" />
                  <Skeleton className="h-4 w-20 bg-[#202026]" />
                </div>
              </div>
            </div>
          ))}
        </div>

        {/* Pagination Skeleton */}
        <div className="flex justify-center gap-2">
          <Skeleton className="h-10 w-10 bg-[#202026]" />
          <Skeleton className="h-10 w-10 bg-[#202026]" />
          <Skeleton className="h-10 w-10 bg-[#202026]" />
        </div>
      </div>
    </main>
  );
}
