import PageContainer from '@/components/layout/page-container';
import { Card, CardContent, CardHeader } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';

export default function Loading() {
  return (
    <PageContainer
      pageTitle='รอตรวจสอบข้อมูลหลัก'
      pageDescription='กำลังโหลดรายการข้อมูลหลักที่รอการตรวจสอบ...'
    >
      <div className='space-y-6'>
        <div className='grid gap-4 md:grid-cols-4'>
          {Array.from({ length: 4 }).map((_, index) => (
            <Card key={index}>
              <CardHeader className='pb-2'>
                <Skeleton className='h-4 w-24' />
                <Skeleton className='h-8 w-16' />
              </CardHeader>
            </Card>
          ))}
        </div>

        {Array.from({ length: 3 }).map((_, index) => (
          <Card key={index}>
            <CardHeader className='space-y-3'>
              <Skeleton className='h-7 w-40' />
              <Skeleton className='h-4 w-full' />
            </CardHeader>
            <CardContent className='space-y-3'>
              {Array.from({ length: 2 }).map((__, rowIndex) => (
                <Skeleton key={rowIndex} className='h-20 w-full' />
              ))}
            </CardContent>
          </Card>
        ))}
      </div>
    </PageContainer>
  );
}
