Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / components / containers / autoReply / AutoReplyForm / AutoReplyFormWeekly.tsx
blob6fc0011574a86e72ecd9f4dc06fddf378ddfac3e
1 import { c } from 'ttag';
3 import SettingsParagraph from '@proton/components/containers/account/SettingsParagraph';
5 import DayOfWeekField from './fields/DayOfWeekField';
6 import TimeField from './fields/TimeField';
7 import TimeZoneField from './fields/TimeZoneField';
8 import type { AutoReplyFormModel } from './interfaces';
10 interface Props {
11     model: AutoReplyFormModel;
12     updateModel: (key: string) => (value: any) => void;
15 const AutoReplyFormWeekly = ({ model: { start, end, timezone }, updateModel }: Props) => {
16     return (
17         <>
18             <SettingsParagraph>
19                 {c('Info').t`Auto-reply is active each week between the selected start and end time.`}
20             </SettingsParagraph>
21             <DayOfWeekField
22                 value={start.day}
23                 onChange={updateModel('start.day')}
24                 id="startDayOfWeek"
25                 label={c('Label').t`Start weekday`}
26             />
27             <TimeField
28                 value={start.time}
29                 onChange={updateModel('start.time')}
30                 label={c('Label').t`Start time`}
31                 id="startTime"
32             />
33             <DayOfWeekField
34                 value={end.day}
35                 onChange={updateModel('end.day')}
36                 id="endDayOfWeek"
37                 label={c('Label').t`End weekday`}
38             />
39             <TimeField
40                 value={end.time}
41                 onChange={updateModel('end.time')}
42                 label={c('Label').t`End time`}
43                 id="endTime"
44             />
45             <TimeZoneField value={timezone} onChange={updateModel('timezone')} />
46         </>
47     );
50 export default AutoReplyFormWeekly;