'use client'; import { usePathname } from 'next/navigation'; import { ProgressIndicator } from '@/components/ProgressIndicator'; export default function BookingLayout({ children, }: { children: React.ReactNode; }) { const pathname = usePathname(); const stepMap: Record = { '/booking/search': 'search', '/booking/results': 'results', '/booking/auth-check': 'passengers', '/booking/passengers': 'passengers', '/booking/seats': 'seats', '/booking/review': 'review', '/booking/payment': 'payment', '/booking/confirmation': 'confirmation', }; const currentStep = stepMap[pathname] || 'search'; const showProgress = pathname !== '/booking/search' && pathname !== '/booking/confirmation' && pathname !== '/booking/detail' && pathname !== '/booking/lookup'; return (
{showProgress && (
)} {children}
); }