import { useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogTitle, } from "@/components/ui/dialog"; interface ManusDialogProps { title?: string; logo?: string; open?: boolean; onLogin: () => void; onOpenChange?: (open: boolean) => void; onClose?: () => void; } export function ManusDialog({ title, logo, open = false, onLogin, onOpenChange, onClose, }: ManusDialogProps) { const [internalOpen, setInternalOpen] = useState(open); useEffect(() => { if (!onOpenChange) { setInternalOpen(open); } }, [open, onOpenChange]); const handleOpenChange = (nextOpen: boolean) => { if (onOpenChange) { onOpenChange(nextOpen); } else { setInternalOpen(nextOpen); } if (!nextOpen) { onClose?.(); } }; return (
{logo ? (
Dialog graphic
) : null} {/* Title and subtitle */} {title ? ( {title} ) : null} Please login with Manus to continue
{/* Login button */}
); }