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='flex flex-wrap gap-2'>
          <Skeleton className='h-10 w-40' />
          <Skeleton className='h-10 w-32' />
          <Skeleton className='h-10 w-24' />
        </div>
        <div className='space-y-4'>
          {Array.from({ length: 4 }).map((_, index) => (
            <Card key={index}>
              <CardHeader className='space-y-3'>
                <Skeleton className='h-6 w-64' />
                <Skeleton className='h-4 w-48' />
              </CardHeader>
              <CardContent className='space-y-3'>
                <Skeleton className='h-4 w-full' />
                <Skeleton className='h-4 w-full' />
                <Skeleton className='h-4 w-2/3' />
              </CardContent>
            </Card>
          ))}
        </div>
      </div>
    </PageContainer>
  );
}
