import {useEffect, useState} from 'react';
import styled from '@emotion/styled';
import {addErrorMessage, addLoadingMessage} from 'sentry/actionCreators/indicator';
import type {ModalRenderProps} from 'sentry/actionCreators/modal';
import {openModal} from 'sentry/actionCreators/modal';
import {fetchOrganizations} from 'sentry/actionCreators/organizations';
import {Alert} from 'sentry/components/alert';
import {LinkButton} from 'sentry/components/button';
import Checkbox from 'sentry/components/checkbox';
import HookOrDefault from 'sentry/components/hookOrDefault';
import LoadingIndicator from 'sentry/components/loadingIndicator';
import Panel from 'sentry/components/panels/panel';
import PanelAlert from 'sentry/components/panels/panelAlert';
import PanelBody from 'sentry/components/panels/panelBody';
import PanelHeader from 'sentry/components/panels/panelHeader';
import PanelItem from 'sentry/components/panels/panelItem';
import {t} from 'sentry/locale';
import type {Organization, OrganizationSummary} from 'sentry/types/organization';
import useApi from 'sentry/utils/useApi';
import {ConfirmAccountClose} from 'sentry/views/settings/account/confirmAccountClose';
import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';
import TextBlock from 'sentry/views/settings/components/text/textBlock';
const BYE_URL = '/';
const leaveRedirect = () => (window.location.href = BYE_URL);
const Important = styled('div')`
font-weight: ${p => p.theme.fontWeightBold};
font-size: 1.2em;
`;
function GoodbyeModalContent({Header, Body, Footer}: ModalRenderProps) {
return (
{t('Closing Account')}
{t('Your account has been deactivated and scheduled for removal.')}
{t('Thanks for using Sentry! We hope to see you again soon!')}
{t(
'This will permanently remove all associated data for your user. Any specified organizations will also be deleted.'
)}
{t('Closing your account is permanent and cannot be undone')}!
{t('Delete the following organizations')}{t('ORGANIZATIONS WITH CHECKED BOXES WILL BE DELETED!')}
{t(
'Ownership will remain with other organization owners if an organization is not deleted.'
)}
{t(
"Boxes which can't be unchecked mean that you are the only organization owner and the organization will be deleted."
)}
{organizations?.map(({organization, singleOwner}) => (
))}