1 import { c } from 'ttag';
3 import { removeZoomInfoFromDescription } from '@proton/calendar/components/videoConferencing/zoom/zoomHelpers';
4 import { IconRow, TextAreaTwo } from '@proton/components';
5 import { DESCRIPTION_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 RowDescription = ({ canEditSharedEventData, model, setModel }: Props) => {
17 if (!canEditSharedEventData) {
23 icon="text-align-left"
24 iconClassName="rtl:mirror"
25 title={c('Label').t`Description`}
26 id={DESCRIPTION_INPUT_ID}
29 id={DESCRIPTION_INPUT_ID}
32 placeholder={c('Placeholder').t`Add description`}
33 maxLength={MAX_CHARS_API.EVENT_DESCRIPTION}
34 className="max-h-custom"
35 title={c('Title').t`Add more information related to this event`}
37 // We need to remove the zoom info from the description to avoid displaying it to users editing the description
38 model: { ...model, description: removeZoomInfoFromDescription(model.description) },