import { useState, Dispatch, SetStateAction } from 'react' import { useTranslation, Trans } from 'react-i18next' import getMeta from '../../../../utils/meta' import LeaveModalForm, { LeaveModalFormProps } from './modal-form' import OLButton from '@/features/ui/components/ol/ol-button' import { OLModalBody, OLModalFooter, OLModalHeader, OLModalTitle, } from '@/features/ui/components/ol/ol-modal' type LeaveModalContentProps = { handleHide: () => void inFlight: boolean setInFlight: Dispatch> } function LeaveModalContentBlock({ setInFlight, isFormValid, setIsFormValid, }: LeaveModalFormProps) { const { t } = useTranslation() const { isOverleaf } = getMeta('ol-ExposedSettings') const hasPassword = getMeta('ol-hasPassword') if (isOverleaf && !hasPassword) { return (

{t('delete_acct_no_existing_pw')}

) } return ( ) } function LeaveModalContent({ handleHide, inFlight, setInFlight, }: LeaveModalContentProps) { const { t } = useTranslation() const [isFormValid, setIsFormValid] = useState(false) return ( <> {t('delete_account')}

}} />

{t('cancel')} {inFlight ? <>{t('deleting')}… : t('delete')} ) } export default LeaveModalContent