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='กำลังโหลดชั่วโมงเป้าหมายและการตั้งค่า K/S/A...'>
      <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='space-y-2'>
                <Skeleton className='h-4 w-24' />
                <Skeleton className='h-8 w-20' />
              </CardHeader>
              <CardContent>
                <Skeleton className='h-4 w-full' />
              </CardContent>
            </Card>
          ))}
        </div>
        <Card>
          <CardHeader className='space-y-2'>
            <Skeleton className='h-6 w-52' />
            <Skeleton className='h-4 w-72' />
          </CardHeader>
          <CardContent className='grid grid-cols-1 gap-6 md:grid-cols-2 xl:grid-cols-3'>
            {Array.from({ length: 6 }).map((_, index) => (
              <Skeleton key={index} className='h-10 w-full' />
            ))}
          </CardContent>
        </Card>
      </div>
    </PageContainer>
  );
}
