import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' import {CommonNavigatorParams} from '#/lib/routes/types' import {useModalControls} from '#/state/modals' import {useSession} from '#/state/session' import {ExportCarDialog} from '#/view/screens/Settings/ExportCarDialog' import * as SettingsList from '#/screens/Settings/components/SettingsList' import {atoms as a, useTheme} from '#/alf' import {useDialogControl} from '#/components/Dialog' import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings' import {At_Stroke2_Corner2_Rounded as AtIcon} from '#/components/icons/At' import {BirthdayCake_Stroke2_Corner2_Rounded as BirthdayCakeIcon} from '#/components/icons/BirthdayCake' import {Car_Stroke2_Corner2_Rounded as CarIcon} from '#/components/icons/Car' import {Check_Stroke2_Corner0_Rounded as CheckIcon} from '#/components/icons/Check' import {Envelope_Stroke2_Corner2_Rounded as EnvelopeIcon} from '#/components/icons/Envelope' import {Freeze_Stroke2_Corner2_Rounded as FreezeIcon} from '#/components/icons/Freeze' import {Lock_Stroke2_Corner2_Rounded as LockIcon} from '#/components/icons/Lock' import {PencilLine_Stroke2_Corner2_Rounded as PencilIcon} from '#/components/icons/Pencil' import {Trash_Stroke2_Corner2_Rounded} from '#/components/icons/Trash' import {Verified_Stroke2_Corner2_Rounded as VerifiedIcon} from '#/components/icons/Verified' import * as Layout from '#/components/Layout' import {ChangeHandleDialog} from './components/ChangeHandleDialog' import {DeactivateAccountDialog} from './components/DeactivateAccountDialog' type Props = NativeStackScreenProps export function AccountSettingsScreen({}: Props) { const t = useTheme() const {_} = useLingui() const {currentAccount} = useSession() const {openModal} = useModalControls() const birthdayControl = useDialogControl() const changeHandleControl = useDialogControl() const exportCarControl = useDialogControl() const deactivateAccountControl = useDialogControl() return ( Email {currentAccount && ( <> {currentAccount.email || (no email)} {currentAccount.emailConfirmed ? ( ) : ( {}} /> )} )} openModal({name: 'change-email'})}> Change email Protect your account Birthday birthdayControl.open()} /> openModal({name: 'change-password'})}> Password changeHandleControl.open()}> Handle exportCarControl.open()}> Export my data deactivateAccountControl.open()} destructive> Deactivate account openModal({name: 'delete-account'})} destructive> Delete account ) }