import { useState } from "react"; import { login } from "../../shared/api/client"; import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input } from "../../shared/ui"; import { Lock } from "lucide-react"; interface AuthOverlayProps { onAuthenticated: () => void; } export function AuthOverlay({ onAuthenticated }: AuthOverlayProps) { const [password, setPassword] = useState(""); const [error, setError] = useState(null); const [loading, setLoading] = useState(false); const handleSubmit = async (e: { preventDefault: () => void }) => { e.preventDefault(); setLoading(true); setError(null); try { await login(password); localStorage.setItem("admin-password", password); onAuthenticated(); } catch { setError("Invalid password"); } finally { setLoading(false); } }; return (
Admin Access Required Enter the admin password to access Voice and Media controls.
setPassword(e.target.value)} autoFocus /> {error &&

{error}

}
); }