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'>
        <Card>
          <CardHeader className='space-y-3'>
            <Skeleton className='h-8 w-72' />
            <Skeleton className='h-4 w-64' />
          </CardHeader>
          <CardContent className='grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4'>
            {Array.from({ length: 8 }).map((_, index) => (
              <Skeleton key={index} className='h-16 w-full' />
            ))}
          </CardContent>
        </Card>
        <Card>
          <CardHeader>
            <Skeleton className='h-7 w-40' />
          </CardHeader>
          <CardContent className='space-y-4'>
            <Skeleton className='h-10 w-full' />
            <Skeleton className='h-24 w-full' />
            <Skeleton className='h-10 w-full' />
          </CardContent>
        </Card>
      </div>
    </PageContainer>
  );
}
