import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogFooter, } from "@/components/ui/dialog"; import { Eye, EyeOff } from "lucide-react"; interface CredentialsModalProps { isOpen: boolean; onClose: () => void; onSubmit: (credentials: { username: string; password: string }) => void; providerName: string; isLoading?: boolean; } export function CredentialsModal({ isOpen, onClose, onSubmit, providerName, isLoading = false, }: CredentialsModalProps) { const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); const [showPassword, setShowPassword] = useState(false); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (username && password) { onSubmit({ username, password }); } }; const handleClose = () => { setUsername(""); setPassword(""); setShowPassword(false); onClose(); }; return ( Insurance Portal Login Enter your credentials for {providerName} insurance portal to check patient eligibility automatically.
setUsername(e.target.value)} placeholder="Enter your username" required disabled={isLoading} />
setPassword(e.target.value)} placeholder="Enter your password" required disabled={isLoading} />
); }