import type React from 'react'; import { useTranslation } from 'react-i18next'; import { Cloud, Loader2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; interface AddAccountDialogProps { open: boolean; onOpenChange: (open: boolean) => void; authCode: string; onAuthCodeChange: (code: string) => void; selectedOAuthClientKey: string; onOAuthClientChange: (key: string) => void; oauthClients: Array<{ key: string; label: string; is_active: boolean }>; isOAuthClientsLoading: boolean; isSetActiveOAuthClientPending: boolean; onOpenGoogleAuth: () => void; onSubmitAuthCode: () => void; isAddPending: boolean; } export function AddAccountDialog(props: AddAccountDialogProps) { const { t } = useTranslation(); const { open, onOpenChange, authCode, onAuthCodeChange, selectedOAuthClientKey, onOAuthClientChange, oauthClients, isOAuthClientsLoading, isSetActiveOAuthClientPending, onOpenGoogleAuth, onSubmitAuthCode, isAddPending, } = props; return ( {t('cloud.authDialog.title')} {t('cloud.authDialog.description')}
) => onAuthCodeChange(e.target.value) } />

{t('cloud.authDialog.instruction')}

); }