import { useState, Dispatch, SetStateAction } from 'react' import { Modal } from 'react-bootstrap' import { useTranslation, Trans } from 'react-i18next' import getMeta from '../../../../utils/meta' import LeaveModalForm, { LeaveModalFormProps } from './modal-form' import { ExposedSettings } from '../../../../../../types/exposed-settings' import ButtonWrapper from '@/features/ui/components/bootstrap-5/wrappers/button-wrapper' type LeaveModalContentProps = { handleHide: () => void inFlight: boolean setInFlight: Dispatch> } function LeaveModalContentBlock({ setInFlight, isFormValid, setIsFormValid, }: LeaveModalFormProps) { const { t } = useTranslation() const { isOverleaf } = getMeta('ol-ExposedSettings') as ExposedSettings const hasPassword = getMeta('ol-hasPassword') as boolean 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