Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / sections / Trash / ToolbarButtons / DeletePermanentlyButton.tsx
blobf0aa2260315f8b8ce65ded41a1cf5e0570872845
1 import { c } from 'ttag';
3 import { Icon, ToolbarButton } from '@proton/components';
5 import type { DecryptedLink } from '../../../../store';
6 import { useActions } from '../../../../store';
8 interface Props {
9     selectedLinks: DecryptedLink[];
12 const DeletePermanentlyButton = ({ selectedLinks }: Props) => {
13     const { deletePermanently, confirmModal } = useActions();
15     return (
16         <>
17             <ToolbarButton
18                 title={c('Action').t`Delete permanently`}
19                 icon={<Icon name="cross-circle" />}
20                 onClick={() => deletePermanently(new AbortController().signal, selectedLinks)}
21                 data-testid="toolbar-delete"
22             />
23             {confirmModal}
24         </>
25     );
28 export default DeletePermanentlyButton;