1 import { useState } from 'react';
3 import { c } from 'ttag';
5 import { Button } from '@proton/atoms';
6 import SettingsLink from '@proton/components/components/link/SettingsLink';
7 import type { PromptProps } from '@proton/components/components/prompt/Prompt';
8 import Prompt from '@proton/components/components/prompt/Prompt';
9 import { FeatureCode, useFeature } from '@proton/features';
11 const RecoverDataConfirmModal = (props: Omit<PromptProps, 'open' | 'title' | 'buttons' | 'children'>) => {
12 const [dismissing, setDismissing] = useState(false);
13 const { update: setDismissedRecoverDataCard } = useFeature(FeatureCode.DismissedRecoverDataCard);
15 const boldDataLocked = (
16 <b key="data-locked-bold-text">{
17 // translator: Full sentence is 'The Data locked message will no longer be shown, but you can still unlock your data under Encryption and keys.'
18 c('Info').t`Data locked`
22 const encryptionAndKeysLink = (
23 <SettingsLink path="/encryption-keys" key="link">{
24 // translator: Full sentence is 'The Data locked message will no longer be shown, but you can still unlock your data under Encryption and keys.'
25 c('Link').t`Encryption and keys`
32 title={c('Title').t`Don't show again?`}
36 onClick={async () => {
38 await setDismissedRecoverDataCard(true);
44 {c('Action').t`Don't show again`}
46 <Button onClick={props.onClose}>{c('Action').t`Cancel`}</Button>,
51 // translator: Full sentence is 'The Data locked message will no longer be shown, but you can still unlock your data under Encryption and keys.'
53 .jt`The ${boldDataLocked} message will no longer be shown, but you can still unlock your data under ${encryptionAndKeysLink}.`
60 export default RecoverDataConfirmModal;