@burdenoff/microfe-calendar 2026.1116.1 → 2026.1119.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,16 +5,16 @@ import { useEventPermissions as r } from "../hooks/useEventPermissions.js";
5
5
  import { useDeleteEventMutation as ee, useGetEventQuery as i } from "../generated/wspace-operations.js";
6
6
  import { CALENDAR_PERMISSIONS as a } from "../constants/permissions.js";
7
7
  import { EventFormModal as o } from "../components/EventFormModal.js";
8
- import { ConfirmDialog as s } from "../components/ConfirmDialog.js";
9
- import { useSafePermissions as te } from "../hooks/useSafePermissions.js";
10
- import { nativeConfirm as ne, nativeNotify as c } from "../utils/nativeBridge.js";
11
- import { ADD_ATTENDEE_MUTATION as re, CREATE_REMINDER_MUTATION as ie, DELETE_REMINDER_MUTATION as l, REMOVE_ATTENDEE_MUTATION as u, RESPOND_TO_EVENT_MUTATION as d } from "../graphql/calendarDocuments.js";
12
- import { useState as f } from "react";
13
- import { AccessDenied as p } from "@burdenoff/fe-libs/shared/components";
14
- import { ArrowLeft as m, Bell as h, Clock as g, Edit as _, Link2 as ae, MapPin as v, Paperclip as oe, Repeat as se, Shield as ce, Tag as y, Trash2 as le, Users as b, Video as ue } from "lucide-react";
15
- import { useNavigate as de, useParams as fe } from "react-router";
16
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
17
- import { CTAOverflowMenu as pe, GlassCard as me, GradientText as he, NextSteps as ge, PagePurpose as C } from "@burdenoff/fe-libs/ui";
8
+ import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
9
+ import { useSafePermissions as ne } from "../hooks/useSafePermissions.js";
10
+ import { nativeConfirm as re, nativeNotify as s } from "../utils/nativeBridge.js";
11
+ import { ADD_ATTENDEE_MUTATION as ie, CREATE_REMINDER_MUTATION as ae, DELETE_REMINDER_MUTATION as c, REMOVE_ATTENDEE_MUTATION as l, RESPOND_TO_EVENT_MUTATION as u } from "../graphql/calendarDocuments.js";
12
+ import { useState as d } from "react";
13
+ import { AccessDenied as f } from "@burdenoff/fe-libs/shared/components";
14
+ import { ArrowLeft as p, Bell as m, Clock as h, Edit as g, Link2 as oe, MapPin as _, Paperclip as se, Repeat as ce, Shield as le, Tag as v, Trash2 as ue, Users as y, Video as de } from "lucide-react";
15
+ import { useNavigate as fe, useParams as pe } from "react-router";
16
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
17
+ import { CTAOverflowMenu as me, GlassCard as he, GradientText as ge, NextSteps as _e, PagePurpose as S, ThemedSelect as C } from "@burdenoff/fe-libs/ui";
18
18
  import { useMutation as w } from "@apollo/client/react";
19
19
  // src/pages/EventDetailsPage.tsx
20
20
  function T(e) {
@@ -83,7 +83,7 @@ function T(e) {
83
83
  } : null;
84
84
  }
85
85
  function E() {
86
- let { eventId: E } = fe(), D = de(), { basePath: O } = t(), k = e(), A = {
86
+ let { eventId: E } = pe(), D = fe(), { basePath: O } = t(), k = e(), A = {
87
87
  ACCEPTED: k("calendar.attendeeStatusAccepted", "Accepted"),
88
88
  DECLINED: k("calendar.attendeeStatusDeclined", "Declined"),
89
89
  TENTATIVE: k("calendar.attendeeStatusTentative", "Tentative"),
@@ -96,53 +96,53 @@ function E() {
96
96
  EMAIL: k("calendar.reminderMethodEmail", "email"),
97
97
  NOTIFICATION: k("calendar.reminderMethodNotification", "notification"),
98
98
  SMS: k("calendar.reminderMethodSms", "sms")
99
- }, [N, P] = f(!1), [F, I] = f(!1), [L, R] = f(""), [z, B] = f(""), [V, _e] = f("15"), [H, ve] = f("IN_APP"), { hasPermission: U, isLoading: W } = te(), ye = U(a.CALENDAR_EVENT_READ), { data: G, loading: be, error: K, refetch: q } = i({
99
+ }, [N, P] = d(!1), [F, I] = d(!1), [L, R] = d(""), [z, B] = d(""), [V, ve] = d("15"), [H, ye] = d("IN_APP"), { hasPermission: U, isLoading: W } = ne(), be = U(a.CALENDAR_EVENT_READ), { data: G, loading: xe, error: K, refetch: q } = i({
100
100
  variables: { id: E ?? "" },
101
- skip: !E || W || !ye,
101
+ skip: !E || W || !be,
102
102
  fetchPolicy: "cache-and-network"
103
- }), [xe, { loading: Se }] = ee(), [Ce, { loading: J }] = w(re), [we, { loading: Y }] = w(u), [Te] = w(d), [Ee, { loading: X }] = w(ie), [De, { loading: Oe }] = w(l), Z = T(G?.event ?? null), Q = r(Z), $ = U, ke = async () => {
104
- if (E && await ne({
103
+ }), [Se, { loading: Ce }] = ee(), [we, { loading: J }] = w(ie), [Y, { loading: Te }] = w(l), [Ee] = w(u), [De, { loading: X }] = w(ae), [Oe, { loading: ke }] = w(c), Z = T(G?.event ?? null), Q = r(Z), $ = U, Ae = async () => {
104
+ if (E && await re({
105
105
  title: k("calendar.deleteEvent", "Delete Event"),
106
106
  message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.", { title: Z?.title ?? "" }),
107
107
  okButtonTitle: k("calendar.delete", "Delete")
108
108
  }) !== !1) try {
109
- await xe({ variables: { id: E } }), c("success"), I(!1), D(`${O}/view/week`);
109
+ await Se({ variables: { id: E } }), s("success"), I(!1), D(`${O}/view/week`);
110
110
  } catch (e) {
111
- throw c("error"), e;
111
+ throw s("error"), e;
112
112
  }
113
- }, Ae = async () => {
114
- E && L.trim() && (await Ce({ variables: {
113
+ }, je = async () => {
114
+ E && L.trim() && (await we({ variables: {
115
115
  eventId: E,
116
116
  email: L.trim(),
117
117
  name: z.trim() || void 0
118
118
  } }), R(""), B(""), await q());
119
- }, je = async () => {
120
- E && (await Ee({ variables: { input: {
119
+ }, Me = async () => {
120
+ E && (await De({ variables: { input: {
121
121
  eventId: E,
122
122
  minutesBefore: parseInt(V, 10),
123
123
  channel: H
124
124
  } } }), await q());
125
125
  };
126
- return W || be && !G ? /* @__PURE__ */ x("div", {
126
+ return W || xe && !G ? /* @__PURE__ */ b("div", {
127
127
  className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
128
- children: /* @__PURE__ */ x("p", {
128
+ children: /* @__PURE__ */ b("p", {
129
129
  className: "font-text-md text-text-secondary",
130
130
  children: k("calendar.loading", "Loading...")
131
131
  })
132
- }) : $(a.CALENDAR_EVENT_READ) ? K ? /* @__PURE__ */ x("div", {
132
+ }) : $(a.CALENDAR_EVENT_READ) ? K ? /* @__PURE__ */ b("div", {
133
133
  className: "@container min-h-screen bg-bg-canvas p-6",
134
- children: /* @__PURE__ */ x("div", {
134
+ children: /* @__PURE__ */ b("div", {
135
135
  className: "max-w-3xl mx-auto",
136
- children: /* @__PURE__ */ S("div", {
136
+ children: /* @__PURE__ */ x("div", {
137
137
  className: "text-center py-12",
138
- children: [/* @__PURE__ */ S("p", {
138
+ children: [/* @__PURE__ */ x("p", {
139
139
  className: "font-text-md text-red-600 dark:text-red-400 mb-4",
140
140
  children: [
141
141
  k("calendar.failedToLoadEvent", "Failed to load event:"),
142
142
  " ",
143
143
  K.message
144
144
  ]
145
- }), /* @__PURE__ */ x("button", {
145
+ }), /* @__PURE__ */ b("button", {
146
146
  type: "button",
147
147
  onClick: () => D(`${O}/view/week`),
148
148
  className: "px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
@@ -150,119 +150,119 @@ function E() {
150
150
  })]
151
151
  })
152
152
  })
153
- }) : Z ? /* @__PURE__ */ S("div", {
153
+ }) : Z ? /* @__PURE__ */ x("div", {
154
154
  className: "@container min-h-screen bg-bg-canvas",
155
155
  children: [
156
- /* @__PURE__ */ x("header", {
156
+ /* @__PURE__ */ b("header", {
157
157
  className: "border-b border-border-seam bg-bg-surface px-6 py-3",
158
- children: /* @__PURE__ */ S("div", {
158
+ children: /* @__PURE__ */ x("div", {
159
159
  className: "max-w-4xl mx-auto flex items-center justify-between gap-2",
160
- children: [/* @__PURE__ */ S("button", {
160
+ children: [/* @__PURE__ */ x("button", {
161
161
  type: "button",
162
162
  onClick: () => D(-1),
163
163
  className: "inline-flex items-center gap-1.5 text-text-secondary hover:text-text-primary font-text-sm font-weight-medium transition-colors",
164
- children: [/* @__PURE__ */ x(m, { className: "size-4" }), k("calendar.back", "Back")]
165
- }), /* @__PURE__ */ x(pe, {
164
+ children: [/* @__PURE__ */ b(p, { className: "size-4" }), k("calendar.back", "Back")]
165
+ }), /* @__PURE__ */ b(me, {
166
166
  primary: $(a.CALENDAR_EVENT_UPDATE) && Q.canEdit ? {
167
167
  label: k("calendar.edit", "Edit"),
168
- icon: /* @__PURE__ */ x(_, { className: "size-4" }),
168
+ icon: /* @__PURE__ */ b(g, { className: "size-4" }),
169
169
  onSelect: () => P(!0)
170
170
  } : void 0,
171
171
  actions: $(a.CALENDAR_EVENT_DELETE) && Q.canDelete ? [{
172
172
  label: k("calendar.delete", "Delete"),
173
- icon: /* @__PURE__ */ x(le, { className: "size-4" }),
173
+ icon: /* @__PURE__ */ b(ue, { className: "size-4" }),
174
174
  intent: "destructive",
175
175
  onSelect: () => I(!0)
176
176
  }] : []
177
177
  })]
178
178
  })
179
179
  }),
180
- /* @__PURE__ */ S("div", {
180
+ /* @__PURE__ */ x("div", {
181
181
  className: "max-w-4xl mx-auto p-6 space-y-section-gap",
182
182
  children: [
183
- /* @__PURE__ */ x(C, {
183
+ /* @__PURE__ */ b(S, {
184
184
  className: "max-w-3xl",
185
185
  children: k("calendar.eventDetailsPagePurpose", "Everything about this event in one place — time, location, attendees, reminders, resources, and attachments. Invite people, set when you want to be reminded, RSVP, or edit the details; changes sync to everyone on the invite.")
186
186
  }),
187
- /* @__PURE__ */ x(ge, {
187
+ /* @__PURE__ */ b(_e, {
188
188
  storageKey: "calendar-event-details",
189
189
  steps: [
190
190
  ...$(a.CALENDAR_EVENT_UPDATE) && Q.canEdit ? [{
191
191
  id: "edit-event",
192
192
  label: k("calendar.nextStepEditEvent", "Edit event details"),
193
193
  description: k("calendar.nextStepEditEventDesc", "Update the title, time, location, or recurrence."),
194
- icon: /* @__PURE__ */ x(_, { className: "size-4" }),
194
+ icon: /* @__PURE__ */ b(g, { className: "size-4" }),
195
195
  onClick: () => P(!0)
196
196
  }] : [],
197
197
  {
198
198
  id: "manage-attendees",
199
199
  label: k("calendar.nextStepAttendees", "Invite people and track RSVPs"),
200
200
  description: k("calendar.nextStepAttendeesDesc", "Add attendees by email and see who has accepted."),
201
- icon: /* @__PURE__ */ x(b, { className: "size-4" }),
201
+ icon: /* @__PURE__ */ b(y, { className: "size-4" }),
202
202
  href: "#event-attendees"
203
203
  },
204
204
  {
205
205
  id: "set-reminder",
206
206
  label: k("calendar.nextStepReminder", "Set a reminder"),
207
207
  description: k("calendar.nextStepReminderDesc", "Get notified by in-app, email, or SMS before the event starts."),
208
- icon: /* @__PURE__ */ x(h, { className: "size-4" }),
208
+ icon: /* @__PURE__ */ b(m, { className: "size-4" }),
209
209
  href: "#event-reminders"
210
210
  },
211
211
  {
212
212
  id: "back-to-calendar",
213
213
  label: k("calendar.nextStepBackToCalendar", "Back to your calendar"),
214
214
  description: k("calendar.nextStepBackToCalendarDesc", "Return to the calendar grid to review the rest of your schedule."),
215
- icon: /* @__PURE__ */ x(m, { className: "size-4" }),
215
+ icon: /* @__PURE__ */ b(p, { className: "size-4" }),
216
216
  onClick: () => D(`${O}/view/week`)
217
217
  }
218
218
  ]
219
219
  }),
220
- /* @__PURE__ */ S(me, {
220
+ /* @__PURE__ */ x(he, {
221
221
  treatment: "glass",
222
222
  className: "p-card-padding",
223
- children: [/* @__PURE__ */ S("div", {
223
+ children: [/* @__PURE__ */ x("div", {
224
224
  className: "mb-section-gap",
225
- children: [/* @__PURE__ */ x("h1", {
225
+ children: [/* @__PURE__ */ b("h1", {
226
226
  className: "font-heading-lg text-text-primary mb-4",
227
- children: /* @__PURE__ */ x(he, { children: Z.title })
228
- }), /* @__PURE__ */ S("div", {
227
+ children: /* @__PURE__ */ b(ge, { children: Z.title })
228
+ }), /* @__PURE__ */ x("div", {
229
229
  className: "flex items-center gap-2 text-text-secondary font-text-md",
230
- children: [/* @__PURE__ */ x(g, { className: "size-4" }), /* @__PURE__ */ x("span", { children: Z.isAllDay ? `${n(Z.startTime).split(",")[0]} (${k("calendar.allDay", "All day")})` : `${n(Z.startTime)} - ${n(Z.endTime)}` })]
230
+ children: [/* @__PURE__ */ b(h, { className: "size-4" }), /* @__PURE__ */ b("span", { children: Z.isAllDay ? `${n(Z.startTime).split(",")[0]} (${k("calendar.allDay", "All day")})` : `${n(Z.startTime)} - ${n(Z.endTime)}` })]
231
231
  })]
232
- }), /* @__PURE__ */ S("div", {
232
+ }), /* @__PURE__ */ x("div", {
233
233
  className: "space-y-4",
234
234
  children: [
235
- Z.location && /* @__PURE__ */ S("div", {
235
+ Z.location && /* @__PURE__ */ x("div", {
236
236
  className: "flex gap-2",
237
- children: [/* @__PURE__ */ x(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
237
+ children: [/* @__PURE__ */ b(_, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
238
238
  className: "min-w-0 flex-1",
239
- children: [/* @__PURE__ */ x("p", {
239
+ children: [/* @__PURE__ */ b("p", {
240
240
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
241
241
  children: k("calendar.location", "Location")
242
- }), /* @__PURE__ */ x("p", {
242
+ }), /* @__PURE__ */ b("p", {
243
243
  className: "font-text-sm text-text-secondary",
244
244
  children: Z.location
245
245
  })]
246
246
  })]
247
247
  }),
248
- (Z.locationAddress || Z.locationUrl || Z.locationType) && /* @__PURE__ */ S("div", {
248
+ (Z.locationAddress || Z.locationUrl || Z.locationType) && /* @__PURE__ */ x("div", {
249
249
  className: "flex gap-2",
250
- children: [/* @__PURE__ */ x(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
250
+ children: [/* @__PURE__ */ b(_, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
251
251
  className: "min-w-0 flex-1 space-y-1",
252
252
  children: [
253
- /* @__PURE__ */ x("p", {
253
+ /* @__PURE__ */ b("p", {
254
254
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
255
255
  children: k("calendar.locationDetails", "Location details")
256
256
  }),
257
- Z.locationType && /* @__PURE__ */ x("p", {
257
+ Z.locationType && /* @__PURE__ */ b("p", {
258
258
  className: "font-text-sm text-text-secondary",
259
259
  children: Z.locationType
260
260
  }),
261
- Z.locationAddress && /* @__PURE__ */ x("p", {
261
+ Z.locationAddress && /* @__PURE__ */ b("p", {
262
262
  className: "font-text-sm text-text-secondary",
263
263
  children: Z.locationAddress
264
264
  }),
265
- Z.locationUrl && /* @__PURE__ */ x("a", {
265
+ Z.locationUrl && /* @__PURE__ */ b("a", {
266
266
  href: Z.locationUrl,
267
267
  target: "_blank",
268
268
  rel: "noopener noreferrer",
@@ -272,14 +272,14 @@ function E() {
272
272
  ]
273
273
  })]
274
274
  }),
275
- Z.videoCallLink && /* @__PURE__ */ S("div", {
275
+ Z.videoCallLink && /* @__PURE__ */ x("div", {
276
276
  className: "flex gap-2",
277
- children: [/* @__PURE__ */ x(ue, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
277
+ children: [/* @__PURE__ */ b(de, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
278
278
  className: "min-w-0 flex-1",
279
- children: [/* @__PURE__ */ x("p", {
279
+ children: [/* @__PURE__ */ b("p", {
280
280
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
281
281
  children: k("calendar.videoCall", "Video Call")
282
- }), /* @__PURE__ */ x("a", {
282
+ }), /* @__PURE__ */ b("a", {
283
283
  href: Z.videoCallLink,
284
284
  target: "_blank",
285
285
  rel: "noopener noreferrer",
@@ -288,16 +288,16 @@ function E() {
288
288
  })]
289
289
  })]
290
290
  }),
291
- /* @__PURE__ */ S("div", {
291
+ /* @__PURE__ */ x("div", {
292
292
  className: "flex gap-2",
293
- children: [/* @__PURE__ */ x(ce, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
293
+ children: [/* @__PURE__ */ b(le, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
294
294
  className: "min-w-0 flex-1 space-y-1",
295
295
  children: [
296
- /* @__PURE__ */ x("p", {
296
+ /* @__PURE__ */ b("p", {
297
297
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
298
298
  children: k("calendar.eventRules", "Event rules")
299
299
  }),
300
- /* @__PURE__ */ S("p", {
300
+ /* @__PURE__ */ x("p", {
301
301
  className: "font-text-sm text-text-secondary",
302
302
  children: [
303
303
  k("calendar.visibility", "Visibility"),
@@ -305,27 +305,27 @@ function E() {
305
305
  Z.privacy
306
306
  ]
307
307
  }),
308
- Z.maxAttendees ? /* @__PURE__ */ x("p", {
308
+ Z.maxAttendees ? /* @__PURE__ */ b("p", {
309
309
  className: "font-text-sm text-text-secondary",
310
310
  children: k("calendar.attendeeCapacity", "{{current}} / {{max}} attendees", {
311
311
  current: Z.currentAttendeeCount ?? 0,
312
312
  max: Z.maxAttendees
313
313
  })
314
314
  }) : null,
315
- Z.checkInEnabled ? /* @__PURE__ */ x("p", {
315
+ Z.checkInEnabled ? /* @__PURE__ */ b("p", {
316
316
  className: "font-text-sm text-text-secondary",
317
317
  children: k("calendar.checkInEnabled", "Attendee check-in enabled")
318
318
  }) : null
319
319
  ]
320
320
  })]
321
321
  }),
322
- /* @__PURE__ */ S("div", {
322
+ /* @__PURE__ */ x("div", {
323
323
  id: "event-attendees",
324
324
  className: "flex gap-2 scroll-mt-24",
325
- children: [/* @__PURE__ */ x(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
325
+ children: [/* @__PURE__ */ b(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
326
326
  className: "min-w-0 flex-1",
327
327
  children: [
328
- /* @__PURE__ */ S("p", {
328
+ /* @__PURE__ */ x("p", {
329
329
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
330
330
  children: [
331
331
  k("calendar.attendees", "Attendees"),
@@ -334,71 +334,71 @@ function E() {
334
334
  ")"
335
335
  ]
336
336
  }),
337
- Z.attendees && Z.attendees.length > 0 ? /* @__PURE__ */ x("div", {
337
+ Z.attendees && Z.attendees.length > 0 ? /* @__PURE__ */ b("div", {
338
338
  className: "space-y-1",
339
- children: Z.attendees.map((e) => /* @__PURE__ */ S("div", {
339
+ children: Z.attendees.map((e) => /* @__PURE__ */ x("div", {
340
340
  className: "flex items-center justify-between",
341
341
  children: [
342
- /* @__PURE__ */ x("span", {
342
+ /* @__PURE__ */ b("span", {
343
343
  className: "font-text-sm text-text-secondary",
344
344
  children: e.name || e.email || e.userId
345
345
  }),
346
- /* @__PURE__ */ x("span", {
346
+ /* @__PURE__ */ b("span", {
347
347
  className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.status === "ACCEPTED" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : e.status === "DECLINED" ? "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
348
348
  children: A[e.status] ?? e.status
349
349
  }),
350
- $(a.CALENDAR_ATTENDEE_DELETE) ? /* @__PURE__ */ x("button", {
350
+ $(a.CALENDAR_ATTENDEE_DELETE) ? /* @__PURE__ */ b("button", {
351
351
  type: "button",
352
352
  onClick: async () => {
353
353
  let t = G?.event?.attendees?.find((t) => (t.email ?? t.userId) === (e.email || e.userId))?.id;
354
- t && (await we({ variables: { attendeeId: t } }), await q());
354
+ t && (await Y({ variables: { attendeeId: t } }), await q());
355
355
  },
356
- disabled: Y,
356
+ disabled: Te,
357
357
  className: "ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
358
358
  children: k("calendar.remove", "Remove")
359
359
  }) : null
360
360
  ]
361
361
  }, e.userId || e.email))
362
- }) : /* @__PURE__ */ x("p", {
362
+ }) : /* @__PURE__ */ b("p", {
363
363
  className: "font-text-sm text-text-secondary",
364
364
  children: k("calendar.noAttendeesYet", "No attendees added yet.")
365
365
  }),
366
- /* @__PURE__ */ S("div", {
366
+ /* @__PURE__ */ x("div", {
367
367
  className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
368
368
  children: [
369
- /* @__PURE__ */ x("input", {
369
+ /* @__PURE__ */ b("input", {
370
370
  value: L,
371
371
  onChange: (e) => R(e.target.value),
372
372
  placeholder: k("calendar.attendeeEmail", "Attendee email"),
373
373
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
374
374
  "aria-label": k("calendar.attendeeEmail", "Attendee email")
375
375
  }),
376
- /* @__PURE__ */ x("input", {
376
+ /* @__PURE__ */ b("input", {
377
377
  value: z,
378
378
  onChange: (e) => B(e.target.value),
379
379
  placeholder: k("calendar.attendeeName", "Attendee name"),
380
380
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
381
381
  "aria-label": k("calendar.attendeeName", "Attendee name")
382
382
  }),
383
- /* @__PURE__ */ x("button", {
383
+ /* @__PURE__ */ b("button", {
384
384
  type: "button",
385
- onClick: Ae,
385
+ onClick: je,
386
386
  disabled: !L.trim() || J,
387
387
  className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
388
388
  children: J ? k("calendar.adding", "Adding...") : k("calendar.addAttendee", "Add attendee")
389
389
  })
390
390
  ]
391
391
  }),
392
- /* @__PURE__ */ x("div", {
392
+ /* @__PURE__ */ b("div", {
393
393
  className: "mt-2 flex flex-wrap gap-2",
394
394
  children: [
395
395
  "ACCEPTED",
396
396
  "TENTATIVE",
397
397
  "DECLINED"
398
- ].map((e) => /* @__PURE__ */ x("button", {
398
+ ].map((e) => /* @__PURE__ */ b("button", {
399
399
  type: "button",
400
400
  onClick: async () => {
401
- E && (await Te({ variables: {
401
+ E && (await Ee({ variables: {
402
402
  eventId: E,
403
403
  status: e
404
404
  } }), await q());
@@ -410,30 +410,30 @@ function E() {
410
410
  ]
411
411
  })]
412
412
  }),
413
- Z.tags && Z.tags.length > 0 && /* @__PURE__ */ S("div", {
413
+ Z.tags && Z.tags.length > 0 && /* @__PURE__ */ x("div", {
414
414
  className: "flex gap-2",
415
- children: [/* @__PURE__ */ x(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
415
+ children: [/* @__PURE__ */ b(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
416
416
  className: "min-w-0 flex-1",
417
- children: [/* @__PURE__ */ x("p", {
417
+ children: [/* @__PURE__ */ b("p", {
418
418
  className: "font-text-sm font-weight-semibold text-text-primary mb-2",
419
419
  children: k("calendar.tags", "Tags")
420
- }), /* @__PURE__ */ x("div", {
420
+ }), /* @__PURE__ */ b("div", {
421
421
  className: "flex flex-wrap gap-2",
422
- children: Z.tags.map((e) => /* @__PURE__ */ x("span", {
422
+ children: Z.tags.map((e) => /* @__PURE__ */ b("span", {
423
423
  className: "px-2 py-0.5 rounded-radius-sm bg-bg-elevated text-text-secondary font-text-xs",
424
424
  children: e
425
425
  }, e))
426
426
  })]
427
427
  })]
428
428
  }),
429
- (Z.recurrence || Z.rrule) && /* @__PURE__ */ S("div", {
429
+ (Z.recurrence || Z.rrule) && /* @__PURE__ */ x("div", {
430
430
  className: "flex gap-2",
431
- children: [/* @__PURE__ */ x(se, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
431
+ children: [/* @__PURE__ */ b(ce, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
432
432
  className: "min-w-0 flex-1",
433
- children: [/* @__PURE__ */ x("p", {
433
+ children: [/* @__PURE__ */ b("p", {
434
434
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
435
435
  children: k("calendar.recurrence", "Recurrence")
436
- }), Z.recurrence ? /* @__PURE__ */ S("p", {
436
+ }), Z.recurrence ? /* @__PURE__ */ x("p", {
437
437
  className: "font-text-sm text-text-secondary",
438
438
  children: [
439
439
  Z.recurrence.pattern,
@@ -441,80 +441,80 @@ function E() {
441
441
  k("calendar.recurrenceEveryInterval", "every {{interval}}", { interval: Z.recurrence.interval }),
442
442
  ")"
443
443
  ]
444
- }) : /* @__PURE__ */ x("p", {
444
+ }) : /* @__PURE__ */ b("p", {
445
445
  className: "font-text-sm text-text-secondary font-mono break-all",
446
446
  children: Z.rrule
447
447
  })]
448
448
  })]
449
449
  }),
450
- /* @__PURE__ */ S("div", {
450
+ /* @__PURE__ */ x("div", {
451
451
  id: "event-reminders",
452
452
  className: "flex gap-2 scroll-mt-24",
453
- children: [/* @__PURE__ */ x(h, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
453
+ children: [/* @__PURE__ */ b(m, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
454
454
  className: "min-w-0 flex-1",
455
455
  children: [
456
- /* @__PURE__ */ x("p", {
456
+ /* @__PURE__ */ b("p", {
457
457
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
458
458
  children: k("calendar.reminders", "Reminders")
459
459
  }),
460
- Z.reminders && Z.reminders.length > 0 ? /* @__PURE__ */ x("div", {
460
+ Z.reminders && Z.reminders.length > 0 ? /* @__PURE__ */ b("div", {
461
461
  className: "space-y-1",
462
- children: Z.reminders.map((e) => /* @__PURE__ */ S("div", {
462
+ children: Z.reminders.map((e) => /* @__PURE__ */ x("div", {
463
463
  className: "flex items-center justify-between gap-3",
464
- children: [/* @__PURE__ */ x("p", {
464
+ children: [/* @__PURE__ */ b("p", {
465
465
  className: "font-text-sm text-text-secondary",
466
466
  children: k("calendar.reminderSummary", "{{minutes}} minutes before ({{method}})", {
467
467
  minutes: e.minutesBefore,
468
468
  method: M[e.method] ?? e.method.toLowerCase()
469
469
  })
470
- }), /* @__PURE__ */ x("button", {
470
+ }), /* @__PURE__ */ b("button", {
471
471
  type: "button",
472
472
  onClick: async () => {
473
- e.id && (await De({ variables: { id: e.id } }), await q());
473
+ e.id && (await Oe({ variables: { id: e.id } }), await q());
474
474
  },
475
- disabled: Oe,
475
+ disabled: ke,
476
476
  className: "font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
477
477
  children: k("calendar.delete", "Delete")
478
478
  })]
479
479
  }, e.id))
480
- }) : /* @__PURE__ */ x("p", {
480
+ }) : /* @__PURE__ */ b("p", {
481
481
  className: "font-text-sm text-text-secondary",
482
482
  children: k("calendar.noRemindersConfigured", "No reminders configured yet.")
483
483
  }),
484
- /* @__PURE__ */ S("div", {
484
+ /* @__PURE__ */ x("div", {
485
485
  className: "mt-3 grid grid-cols-1 gap-2 @md:grid-cols-[1fr,1fr,auto]",
486
486
  children: [
487
- /* @__PURE__ */ x("input", {
487
+ /* @__PURE__ */ b("input", {
488
488
  type: "number",
489
489
  min: "1",
490
490
  value: V,
491
- onChange: (e) => _e(e.target.value),
491
+ onChange: (e) => ve(e.target.value),
492
492
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
493
493
  "aria-label": k("calendar.reminderMinutesBefore", "Minutes before event")
494
494
  }),
495
- /* @__PURE__ */ S("select", {
495
+ /* @__PURE__ */ x(C, {
496
496
  value: H,
497
- onChange: (e) => ve(e.target.value),
497
+ onChange: (e) => ye(e.target.value),
498
498
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
499
499
  "aria-label": k("calendar.reminderChannel", "Reminder channel"),
500
500
  children: [
501
- /* @__PURE__ */ x("option", {
501
+ /* @__PURE__ */ b("option", {
502
502
  value: "IN_APP",
503
503
  children: k("calendar.inApp", "In app")
504
504
  }),
505
- /* @__PURE__ */ x("option", {
505
+ /* @__PURE__ */ b("option", {
506
506
  value: "EMAIL",
507
507
  children: k("calendar.email", "Email")
508
508
  }),
509
- /* @__PURE__ */ x("option", {
509
+ /* @__PURE__ */ b("option", {
510
510
  value: "SMS",
511
511
  children: k("calendar.sms", "SMS")
512
512
  })
513
513
  ]
514
514
  }),
515
- /* @__PURE__ */ x("button", {
515
+ /* @__PURE__ */ b("button", {
516
516
  type: "button",
517
- onClick: je,
517
+ onClick: Me,
518
518
  disabled: X,
519
519
  className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
520
520
  children: X ? k("calendar.adding", "Adding...") : k("calendar.addReminder", "Add reminder")
@@ -524,27 +524,27 @@ function E() {
524
524
  ]
525
525
  })]
526
526
  }),
527
- Z.resourceBookings && Z.resourceBookings.length > 0 && /* @__PURE__ */ S("div", {
527
+ Z.resourceBookings && Z.resourceBookings.length > 0 && /* @__PURE__ */ x("div", {
528
528
  className: "flex gap-2",
529
- children: [/* @__PURE__ */ x(b, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
529
+ children: [/* @__PURE__ */ b(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
530
530
  className: "min-w-0 flex-1",
531
- children: [/* @__PURE__ */ x("p", {
531
+ children: [/* @__PURE__ */ b("p", {
532
532
  className: "font-text-sm font-weight-semibold text-text-primary mb-2",
533
533
  children: k("calendar.resourceBookings", "Resource bookings")
534
- }), /* @__PURE__ */ x("div", {
534
+ }), /* @__PURE__ */ b("div", {
535
535
  className: "space-y-2",
536
- children: Z.resourceBookings.map((e) => /* @__PURE__ */ S("div", {
536
+ children: Z.resourceBookings.map((e) => /* @__PURE__ */ x("div", {
537
537
  className: "rounded-radius-md border border-border-subtle p-3",
538
538
  children: [
539
- /* @__PURE__ */ x("p", {
539
+ /* @__PURE__ */ b("p", {
540
540
  className: "font-text-sm font-weight-medium text-text-primary",
541
541
  children: e.resourceName
542
542
  }),
543
- /* @__PURE__ */ x("p", {
543
+ /* @__PURE__ */ b("p", {
544
544
  className: "font-text-xs text-text-tertiary",
545
545
  children: [e.resourceType, e.resourceLocation].filter(Boolean).join(" • ")
546
546
  }),
547
- e.notes ? /* @__PURE__ */ x("p", {
547
+ e.notes ? /* @__PURE__ */ b("p", {
548
548
  className: "mt-1 font-text-sm text-text-secondary",
549
549
  children: e.notes
550
550
  }) : null
@@ -553,24 +553,24 @@ function E() {
553
553
  })]
554
554
  })]
555
555
  }),
556
- Z.attachments && Z.attachments.length > 0 && /* @__PURE__ */ S("div", {
556
+ Z.attachments && Z.attachments.length > 0 && /* @__PURE__ */ x("div", {
557
557
  className: "flex gap-2",
558
- children: [/* @__PURE__ */ x(oe, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
558
+ children: [/* @__PURE__ */ b(se, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
559
559
  className: "min-w-0 flex-1",
560
- children: [/* @__PURE__ */ x("p", {
560
+ children: [/* @__PURE__ */ b("p", {
561
561
  className: "font-text-sm font-weight-semibold text-text-primary mb-2",
562
562
  children: k("calendar.attachments", "Attachments")
563
- }), /* @__PURE__ */ x("div", {
563
+ }), /* @__PURE__ */ b("div", {
564
564
  className: "space-y-2",
565
- children: Z.attachments.map((e) => /* @__PURE__ */ S("div", {
565
+ children: Z.attachments.map((e) => /* @__PURE__ */ x("div", {
566
566
  className: "flex items-center gap-2 font-text-sm",
567
- children: [/* @__PURE__ */ x("a", {
567
+ children: [/* @__PURE__ */ b("a", {
568
568
  href: e.url || "#",
569
569
  target: "_blank",
570
570
  rel: "noopener noreferrer",
571
571
  className: "text-blue-600 dark:text-blue-400 hover:underline break-all",
572
572
  children: e.name
573
- }), e.fileId ? /* @__PURE__ */ S("span", {
573
+ }), e.fileId ? /* @__PURE__ */ x("span", {
574
574
  className: "text-text-tertiary",
575
575
  children: [
576
576
  "(",
@@ -582,40 +582,40 @@ function E() {
582
582
  })]
583
583
  })]
584
584
  }),
585
- /* @__PURE__ */ S("div", {
585
+ /* @__PURE__ */ x("div", {
586
586
  className: "flex gap-2",
587
- children: [/* @__PURE__ */ x(y, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
587
+ children: [/* @__PURE__ */ b(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ x("div", {
588
588
  className: "min-w-0 flex-1",
589
- children: [/* @__PURE__ */ x("p", {
589
+ children: [/* @__PURE__ */ b("p", {
590
590
  className: "font-text-sm font-weight-semibold text-text-primary mb-1",
591
591
  children: k("calendar.status", "Status")
592
- }), /* @__PURE__ */ x("span", {
592
+ }), /* @__PURE__ */ b("span", {
593
593
  className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${Z.status === "CONFIRMED" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : Z.status === "CANCELLED" ? "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300" : "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300"}`,
594
594
  children: j[Z.status] ?? Z.status
595
595
  })]
596
596
  })]
597
597
  }),
598
- Z.description && /* @__PURE__ */ S("div", {
598
+ Z.description && /* @__PURE__ */ x("div", {
599
599
  className: "pt-4 border-t border-border-default",
600
- children: [/* @__PURE__ */ x("p", {
600
+ children: [/* @__PURE__ */ b("p", {
601
601
  className: "font-text-sm font-weight-semibold text-text-primary mb-2",
602
602
  children: k("calendar.notes", "Notes")
603
- }), /* @__PURE__ */ x("p", {
603
+ }), /* @__PURE__ */ b("p", {
604
604
  className: "font-text-sm text-text-secondary whitespace-pre-wrap",
605
605
  children: Z.description
606
606
  })]
607
607
  }),
608
- Array.isArray(Z.metadata?.links) && Z.metadata?.links.length > 0 && /* @__PURE__ */ S("div", {
608
+ Array.isArray(Z.metadata?.links) && Z.metadata?.links.length > 0 && /* @__PURE__ */ x("div", {
609
609
  className: "pt-4 border-t border-border-default",
610
- children: [/* @__PURE__ */ S("div", {
610
+ children: [/* @__PURE__ */ x("div", {
611
611
  className: "flex items-center gap-1.5 mb-2",
612
- children: [/* @__PURE__ */ x(ae, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ x("p", {
612
+ children: [/* @__PURE__ */ b(oe, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ b("p", {
613
613
  className: "font-text-sm font-weight-semibold text-text-primary",
614
614
  children: k("calendar.links", "Links")
615
615
  })]
616
- }), /* @__PURE__ */ x("div", {
616
+ }), /* @__PURE__ */ b("div", {
617
617
  className: "space-y-2",
618
- children: Z.metadata.links.map((e) => /* @__PURE__ */ x("a", {
618
+ children: Z.metadata.links.map((e) => /* @__PURE__ */ b("a", {
619
619
  href: e,
620
620
  target: "_blank",
621
621
  rel: "noopener noreferrer",
@@ -629,32 +629,32 @@ function E() {
629
629
  })
630
630
  ]
631
631
  }),
632
- /* @__PURE__ */ x(o, {
632
+ /* @__PURE__ */ b(o, {
633
633
  open: N,
634
634
  event: Z,
635
635
  onClose: () => P(!1)
636
636
  }),
637
- /* @__PURE__ */ x(s, {
637
+ /* @__PURE__ */ b(te, {
638
638
  open: F,
639
639
  title: k("calendar.deleteEvent", "Delete Event"),
640
640
  message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.", { title: Z.title }),
641
641
  confirmLabel: k("calendar.delete", "Delete"),
642
642
  variant: "danger",
643
- loading: Se,
644
- onConfirm: ke,
643
+ loading: Ce,
644
+ onConfirm: Ae,
645
645
  onCancel: () => I(!1)
646
646
  })
647
647
  ]
648
- }) : /* @__PURE__ */ x("div", {
648
+ }) : /* @__PURE__ */ b("div", {
649
649
  className: "@container min-h-screen bg-bg-canvas p-6",
650
- children: /* @__PURE__ */ x("div", {
650
+ children: /* @__PURE__ */ b("div", {
651
651
  className: "max-w-3xl mx-auto",
652
- children: /* @__PURE__ */ S("div", {
652
+ children: /* @__PURE__ */ x("div", {
653
653
  className: "text-center py-12",
654
- children: [/* @__PURE__ */ x("p", {
654
+ children: [/* @__PURE__ */ b("p", {
655
655
  className: "font-text-md text-text-secondary",
656
656
  children: k("calendar.eventNotFound", "Event not found")
657
- }), /* @__PURE__ */ x("button", {
657
+ }), /* @__PURE__ */ b("button", {
658
658
  type: "button",
659
659
  onClick: () => D(`${O}/view/week`),
660
660
  className: "mt-4 px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
@@ -662,7 +662,7 @@ function E() {
662
662
  })]
663
663
  })
664
664
  })
665
- }) : /* @__PURE__ */ x(p, {
665
+ }) : /* @__PURE__ */ b(f, {
666
666
  title: k("calendar.accessDenied", "Access Denied"),
667
667
  description: k("calendar.noPermissionViewEvent", "You don't have permission to view this event.")
668
668
  });