1 import { c } from 'ttag';
3 import { Input } from '@proton/atoms';
4 import { IconRow } from '@proton/components';
5 import { MAX_CHARS_API, TITLE_INPUT_ID } from '@proton/shared/lib/calendar/constants';
6 import type { EventModel } from '@proton/shared/lib/interfaces/calendar';
8 import createHandlers from '../eventForm/createPropFactory';
11 canEditSharedEventData: boolean;
13 setModel: (value: EventModel) => void;
16 export const RowTitle = ({ canEditSharedEventData, model, setModel }: Props) => {
17 if (!canEditSharedEventData) {
22 <IconRow icon="text-title" id={TITLE_INPUT_ID} title={c('Label').t`Event title`}>
25 placeholder={c('Placeholder').t`Add title`}
26 title={c('Title').t`Add event title`}
28 maxLength={MAX_CHARS_API.TITLE}
29 {...createHandlers({ model, setModel, field: 'title' }).native}