1 import { c } from 'ttag';
3 import { Input } from '@proton/atoms';
4 import { IconRow } from '@proton/components';
5 import { LOCATION_INPUT_ID, MAX_CHARS_API } 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 RowLocation = ({ canEditSharedEventData, model, setModel }: Props) => {
17 if (!canEditSharedEventData) {
22 <IconRow icon="map-pin" title={c('Label').t`Location`} id={LOCATION_INPUT_ID}>
24 id={LOCATION_INPUT_ID}
25 placeholder={c('Placeholder').t`Add location`}
26 maxLength={MAX_CHARS_API.LOCATION}
27 title={c('Title').t`Add event location`}
28 {...createHandlers({ model, setModel, field: 'location' }).native}