import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '@/components/ui/alert-dialog' import { Button } from '@/components/ui/button' import { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@/components/ui/drawer' import { useNostr } from '@/providers/NostrProvider' import { useScreenSize } from '@/providers/ScreenSizeProvider' import { useTranslation } from 'react-i18next' export default function LogoutDialog({ open = false, setOpen }: { open: boolean setOpen: (open: boolean) => void }) { const { t } = useTranslation() const { isSmallScreen } = useScreenSize() const { account, removeAccount } = useNostr() if (isSmallScreen) { return ( {t('Logout')} {t('Are you sure you want to logout?')} ) } return ( {t('Logout')} {t('Are you sure you want to logout?')} {t('Cancel')} { if (account) { removeAccount(account) } }} > {t('Logout')} ) }