1 import { c, msgid } from 'ttag';
3 import { Button } from '@proton/atoms';
4 import type { ModalProps } from '@proton/components/components/modalTwo/Modal';
5 import Prompt from '@proton/components/components/prompt/Prompt';
6 import { BRAND_NAME, VPN_APP_NAME } from '@proton/shared/lib/constants';
7 import humanSize from '@proton/shared/lib/helpers/humanSize';
8 import type { Organization } from '@proton/shared/lib/interfaces';
10 interface Props extends ModalProps {
11 organization: Organization;
12 onConfirm: () => void;
15 const LossLoyaltyModal = ({ organization, onConfirm, onClose, ...rest }: Props) => {
16 const bonusSpace = organization.BonusSpace && humanSize({ bytes: organization.BonusSpace, unit: 'GB' });
20 title={c('Title').t`Confirm loss of ${BRAND_NAME} bonuses`}
28 data-testid="confirm-loss-btn"
30 {c('Action').t`Remove bonuses`}
32 <Button onClick={onClose}>{c('Action').t`Cancel`}</Button>,
35 data-testid="confirm-loss"
38 <div className="mb-4">
39 {c('Info').t`Since you're a loyal user, your account has additional features enabled.`}
43 .t`By downgrading to a Free plan, you will permanently lose these benefits, even if you upgrade again in the future.`}
45 {organization.BonusSpace ? <li>{c('Info').t`+${bonusSpace} bonus storage`}</li> : null}
46 {organization.BonusVPN ? (
49 msgid`+${organization.BonusVPN} connection for ${VPN_APP_NAME} (allows you to connect more devices to VPN)`,
50 `+${organization.BonusVPN} connections for ${VPN_APP_NAME} (allows you to connect more devices to VPN)`,
61 export default LossLoyaltyModal;