1 import { c } from 'ttag';
3 import { Icon, ToolbarButton } from '@proton/components';
4 import { useLoading } from '@proton/hooks';
6 import type { DecryptedLink } from '../../../../store';
7 import { useActions } from '../../../../store';
10 selectedLinks: DecryptedLink[];
13 const MoveToTrashButton = ({ selectedLinks }: Props) => {
14 const [isLoading, withLoading] = useLoading();
15 const { trashLinks } = useActions();
20 title={c('Action').t`Move to trash`}
21 icon={<Icon name="trash" alt={c('Action').t`Move to trash`} />}
22 onClick={() => withLoading(trashLinks(new AbortController().signal, selectedLinks))}
23 data-testid="toolbar-trash"
28 export default MoveToTrashButton;