1 import { c, msgid } from 'ttag';
3 import { MAX_ATTENDEES } from '@proton/shared/lib/calendar/constants';
5 export const getParticipantsError = ({
8 maxAttendees = MAX_ATTENDEES,
10 isOwnedCalendar: boolean;
11 numberOfAttendees: number;
12 maxAttendees?: number;
14 if (!isOwnedCalendar) {
15 if (numberOfAttendees > 0) {
16 return c('Information about why calendar event cannot be saved')
17 .t`Creating invites in a shared calendar is not allowed`;
21 if (numberOfAttendees > maxAttendees) {
22 return c('Information about why calendar event cannot be saved').ngettext(
23 msgid`At most ${maxAttendees} participant is allowed per invitation`,
24 `At most ${maxAttendees} participants are allowed per invitation`,