1 import { type FC } from 'react';
2 import { useSelector } from 'react-redux';
4 import { c } from 'ttag';
6 import { selectTrashedItems } from '@proton/pass/store/selectors';
7 import clsx from '@proton/utils/clsx';
9 import { DropdownMenuButton } from '../../Layout/Dropdown/DropdownMenuButton';
14 handleTrashEmpty: () => void;
15 handleTrashRestore: () => void;
19 export const TrashItem: FC<Props> = ({ dense, selected, handleTrashRestore, handleTrashEmpty, onSelect }) => {
20 const count = useSelector(selectTrashedItems).length;
24 label={c('Label').t`Trash`}
27 className={clsx(selected && 'sidebar-item-selected', !dense && 'py-3')}
28 parentClassName={clsx('pass-vault-submenu-vault-item w-full')}
32 onClick={handleTrashRestore}
33 label={c('Label').t`Restore all items`}
34 icon="arrow-up-and-left"
39 onClick={handleTrashEmpty}
40 label={c('Label').t`Empty trash`}
45 extra={<span className="pass-vault--count shrink-0 color-weak mx-1">{count}</span>}