import {createClient} from "@/lib/supabase/server";import {notFound} from "next/navigation";import CustomerCall from "./ui";
export default async function CallPage({params}:{params:Promise<{restaurant:string;table:string}>}){const {restaurant,table}=await params;const db=await createClient();const {data:venue}=await db.from('restaurants').select('id,name,slug,logo_url,brand_color,welcome_message').eq('slug',restaurant).eq('active',true).single();if(!venue)notFound();const {data:seat}=await db.from('restaurant_tables').select('id,label').eq('restaurant_id',venue.id).eq('slug',table).eq('active',true).single();if(!seat)notFound();const {data:types}=await db.from('service_types').select('id,name,slug,icon').eq('restaurant_id',venue.id).eq('enabled',true).order('sort_order');return <CustomerCall venue={venue} seat={seat} types={types||[]} />}
