1 import { c } from 'ttag';
3 import Option from '@proton/components/components/option/Option';
4 import SelectTwo from '@proton/components/components/selectTwo/SelectTwo';
5 import { SWIPE_ACTION } from '@proton/shared/lib/mail/mailSettings';
7 export interface SwipeActionSelectProps {
8 onChange: (swipeAction: SWIPE_ACTION) => void;
14 const SwipeActionSelect = ({ onChange, ...rest }: SwipeActionSelectProps) => {
16 { title: c('Option').t`Trash`, value: SWIPE_ACTION.Trash },
17 { title: c('Option').t`Spam`, value: SWIPE_ACTION.Spam },
18 { title: c('Option').t`Star`, value: SWIPE_ACTION.Star },
19 { title: c('Option').t`Archive`, value: SWIPE_ACTION.Archive },
20 { title: c('Option').t`Mark as read`, value: SWIPE_ACTION.MarkAsRead },
23 <SelectTwo onChange={({ value }) => onChange(value)} {...rest}>
24 {options.map(({ title, value }) => (
25 <Option key={value} title={title} value={value} />
31 export default SwipeActionSelect;