@burdenoff/microfe-calendar 2026.625.1 → 2026.625.2

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