
import { getServerSession } from 'next-auth';
import { redirect } from 'next/navigation';
import { authOptions } from '@/lib/auth';

export const dynamic = 'force-dynamic';

export default async function QuotesPage() {
  const session = await getServerSession(authOptions);

  if (!session) {
    redirect('/auth/signin');
  }

  // Redirect customers to their dashboard
  if (session.user.role === 'CUSTOMER') {
    redirect('/customer/dashboard');
  }

  return (
    <div className="container mx-auto py-8 space-y-6">
      <div>
        <h1 className="text-3xl font-bold gradient-text">Quotes</h1>
        <p className="text-muted-foreground mt-1">
          View and manage all quotes
        </p>
      </div>

      <div className="bg-white rounded-lg border p-8 text-center">
        <p className="text-muted-foreground">
          Quote listing feature coming soon.
        </p>
      </div>
    </div>
  );
}
