import { LiveCameraView } from './LiveCameraView'

interface CameraRouteProps {
    cameraNumber: string
}

export function CameraRoute({ cameraNumber }: CameraRouteProps) {
    // Validate camera number (only allow camera1, camera2, etc.)
    if (!cameraNumber || !/^camera\d+$/.test(cameraNumber)) {
        return (
            <div className="min-h-screen flex items-center justify-center bg-gray-900">
                <div className="text-center text-white">
                    <h1 className="text-2xl font-bold mb-4">Invalid Camera</h1>
                    <p className="text-gray-300">Camera number must be in format: camera1, camera2, etc.</p>
                </div>
            </div>
        )
    }

    return <LiveCameraView cameraName={cameraNumber} />
}












