1 import { type FC } from 'react';
2 import { useSelector } from 'react-redux';
4 import { c } from 'ttag';
8 type ConfirmationPromptHandles,
9 } from '@proton/pass/components/Confirmation/ConfirmationPrompt';
10 import { WithVault } from '@proton/pass/components/Vault/WithVault';
11 import { selectItemSecureLinks } from '@proton/pass/store/selectors';
12 import type { ItemRevision } from '@proton/pass/types';
14 type Props = ConfirmationPromptHandles & {
19 export const ConfirmMoveItem: FC<Props> = ({ item, open, shareId, onCancel, onConfirm }) => {
20 const hasLinks = Boolean(useSelector(selectItemSecureLinks(item.shareId, item.itemId)).length);
23 <WithVault shareId={shareId} onFallback={onCancel}>
24 {({ content: { name: vaultName } }) => (
29 title={c('Title').t`Move item to "${vaultName}"?`}
32 ? c('Info').t`Moving an item to another vault will erase its history and all secure links.`
33 : c('Info').t`Moving an item to another vault will erase its history.`