@burdenoff/microfe-calendar 2026.610.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,45 +1,52 @@
1
1
  import { useGetCalendarsQuery as e } from "../generated/wspace-operations.js";
2
2
  import { useCalendarStore as t } from "../store/calendarStore.js";
3
3
  import { useSafePermissions as n } from "../hooks/useSafePermissions.js";
4
- import { AVAILABILITY_RULES_QUERY as r, BLACKOUT_DATES_QUERY as i, CALENDAR_DETAILS_QUERY as ee, CONNECT_EXTERNAL_CALENDAR_MUTATION as te, CREATE_AVAILABILITY_RULE_MUTATION as ne, CREATE_BLACKOUT_DATE_MUTATION as re, CREATE_BOOKING_PAGE_MUTATION as ie, DELETE_AVAILABILITY_RULE_MUTATION as ae, DELETE_BLACKOUT_DATE_MUTATION as oe, DELETE_BOOKING_PAGE_MUTATION as se, DISCONNECT_EXTERNAL_CALENDAR_MUTATION as ce, EXTERNAL_SYNCS_QUERY as le, PAUSE_SYNC_MUTATION as ue, RESUME_SYNC_MUTATION as a, REVOKE_CALENDAR_SHARE_MUTATION as o, SHARE_CALENDAR_MUTATION as s, TRIGGER_SYNC_MUTATION as c } from "../graphql/calendarDocuments.js";
5
- import { CALENDAR_PERMISSIONS as l } from "../constants/permissions.js";
6
- import { useMemo as u, useState as d } from "react";
7
- import { AccessDenied as de } from "@burdenoff/fe-libs/shared/components";
8
- import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { CalendarClock as pe, CalendarDays as me, Clock as he, Link2 as ge, Settings as _e, Shield as ve, Users as ye } from "lucide-react";
10
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
- import { useMutation as m, useQuery as h } from "@apollo/client/react";
4
+ import { AVAILABILITY_RULES_QUERY as r, BLACKOUT_DATES_QUERY as i, CALENDAR_DETAILS_QUERY as a, CONNECT_EXTERNAL_CALENDAR_MUTATION as ee, CREATE_AVAILABILITY_RULE_MUTATION as te, CREATE_BLACKOUT_DATE_MUTATION as ne, CREATE_BOOKING_PAGE_MUTATION as o, DELETE_AVAILABILITY_RULE_MUTATION as re, DELETE_BLACKOUT_DATE_MUTATION as ie, DELETE_BOOKING_PAGE_MUTATION as ae, DISCONNECT_EXTERNAL_CALENDAR_MUTATION as oe, EXTERNAL_SYNCS_QUERY as se, PAUSE_SYNC_MUTATION as ce, RESUME_SYNC_MUTATION as s, REVOKE_CALENDAR_SHARE_MUTATION as le, SHARE_CALENDAR_MUTATION as ue, TRIGGER_SYNC_MUTATION as de } from "../graphql/calendarDocuments.js";
5
+ import { CALENDAR_PERMISSIONS as fe } from "../constants/permissions.js";
6
+ import { useMemo as c, useState as l } from "react";
7
+ import { AccessDenied as pe } from "@burdenoff/fe-libs/shared/components";
8
+ import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { CalendarClock as he, CalendarDays as ge, Clock as u, Link2 as _e, Settings as ve, Shield as ye, Users as be } from "lucide-react";
10
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { GlassCard as p, GradientText as xe, IllustratedEmptyState as m, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
12
+ import { useMutation as h, useQuery as g } from "@apollo/client/react";
12
13
  //#region src/pages/SettingsPage.tsx
13
- function g({ title: e, description: t, icon: n, children: r }) {
14
- return /* @__PURE__ */ p("section", {
15
- className: "bg-bg-surface border border-border-default rounded-radius-lg p-card-padding space-y-4",
16
- children: [/* @__PURE__ */ p("div", {
17
- className: "flex items-start gap-3",
18
- children: [/* @__PURE__ */ f(n, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h2", {
19
- className: "font-heading-sm text-text-primary",
20
- children: e
21
- }), t ? /* @__PURE__ */ f("p", {
22
- className: "font-text-sm text-text-secondary mt-1",
23
- children: t
24
- }) : null] })]
25
- }), r]
14
+ function _({ id: e, title: t, description: n, icon: r, children: i, emphasis: a = !1 }) {
15
+ return /* @__PURE__ */ d(p, {
16
+ id: e,
17
+ treatment: a ? "glass" : "metric",
18
+ glow: a,
19
+ className: "scroll-mt-24 p-card-padding",
20
+ children: /* @__PURE__ */ f("div", {
21
+ className: "space-y-4",
22
+ children: [/* @__PURE__ */ f("div", {
23
+ className: "flex items-start gap-3",
24
+ children: [/* @__PURE__ */ d(r, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
25
+ className: "font-heading-sm text-text-primary",
26
+ children: t
27
+ }), n ? /* @__PURE__ */ d("p", {
28
+ className: "font-text-sm text-text-secondary mt-1",
29
+ children: n
30
+ }) : null] })]
31
+ }), i]
32
+ })
26
33
  });
27
34
  }
28
- function _(e) {
35
+ function v(e) {
29
36
  return e ? new Date(e).toLocaleString() : "—";
30
37
  }
31
- function v() {
32
- let { hasPermission: v, isLoading: y } = n(), b = t((e) => e.currentView), x = t((e) => e.selectedTimeZone), be = t((e) => e.setTimeZone), xe = t((e) => e.miniCalendarVisible), Se = t((e) => e.setMiniCalendarVisible), { t: S } = fe(), C = (e, t) => {
33
- let n = S(e);
38
+ function y() {
39
+ let { hasPermission: p, isLoading: y } = n(), b = t((e) => e.currentView), x = t((e) => e.selectedTimeZone), we = t((e) => e.setTimeZone), Te = t((e) => e.miniCalendarVisible), Ee = t((e) => e.setMiniCalendarVisible), { t: De } = me(), S = (e, t) => {
40
+ let n = De(e);
34
41
  return n === e ? t : n;
35
- }, w = {
36
- day: C("calendar.day", "Day"),
37
- week: C("calendar.week", "Week"),
38
- month: C("calendar.month", "Month"),
39
- year: C("calendar.year", "Year"),
40
- agenda: C("calendar.agenda", "Agenda"),
41
- timeline: C("calendar.timeline", "Timeline")
42
- }, [T, E] = d(""), [D, O] = d(""), [k, A] = d("user"), [j, M] = d("VIEW"), [N, P] = d({
42
+ }, C = {
43
+ day: S("calendar.day", "Day"),
44
+ week: S("calendar.week", "Week"),
45
+ month: S("calendar.month", "Month"),
46
+ year: S("calendar.year", "Year"),
47
+ agenda: S("calendar.agenda", "Agenda"),
48
+ timeline: S("calendar.timeline", "Timeline")
49
+ }, [w, T] = l(""), [E, D] = l(""), [O, Oe] = l("user"), [k, A] = l("VIEW"), [j, M] = l({
43
50
  dayOfWeek: "MONDAY",
44
51
  startTime: "09:00",
45
52
  endTime: "17:00",
@@ -48,11 +55,11 @@ function v() {
48
55
  slotIncrement: "30",
49
56
  minNotice: "60",
50
57
  maxNotice: "43200"
51
- }), [F, I] = d({
58
+ }), [N, P] = l({
52
59
  startDate: "",
53
60
  endDate: "",
54
61
  reason: ""
55
- }), [L, R] = d({
62
+ }), [F, I] = l({
56
63
  name: "",
57
64
  slug: "",
58
65
  pageType: "ONE_ON_ONE",
@@ -60,7 +67,7 @@ function v() {
60
67
  locationType: "ONLINE",
61
68
  maxAttendees: "1",
62
69
  requireApproval: !1
63
- }), [z, B] = d({
70
+ }), [L, R] = l({
64
71
  provider: "GOOGLE_CALENDAR",
65
72
  externalCalendarId: "",
66
73
  externalCalendarName: "",
@@ -68,233 +75,271 @@ function v() {
68
75
  refreshToken: "",
69
76
  syncFrequency: "300",
70
77
  direction: "TWO_WAY"
71
- }), { data: V, loading: Ce, refetch: we } = e({
78
+ }), { data: z, loading: ke, refetch: Ae } = e({
72
79
  variables: { pagination: { limit: 50 } },
73
80
  skip: y
74
- }), H = u(() => V?.calendars?.calendars ?? [], [V?.calendars?.calendars]), U = u(() => T || ((H.find((e) => e.isDefault) ?? H[0])?.id ?? ""), [H, T]), W = u(() => /* @__PURE__ */ new Date(), []), Te = u(() => new Date(W.getFullYear() - 1, W.getMonth(), W.getDate()).toISOString(), [W]), Ee = u(() => new Date(W.getFullYear() + 1, W.getMonth(), W.getDate()).toISOString(), [W]), { data: De, refetch: Oe } = h(ee, {
75
- variables: { id: U },
76
- skip: !U,
81
+ }), B = c(() => z?.calendars?.calendars ?? [], [z?.calendars?.calendars]), V = c(() => w || ((B.find((e) => e.isDefault) ?? B[0])?.id ?? ""), [B, w]), H = c(() => /* @__PURE__ */ new Date(), []), je = c(() => new Date(H.getFullYear() - 1, H.getMonth(), H.getDate()).toISOString(), [H]), Me = c(() => new Date(H.getFullYear() + 1, H.getMonth(), H.getDate()).toISOString(), [H]), { data: Ne, refetch: Pe } = g(a, {
82
+ variables: { id: V },
83
+ skip: !V,
77
84
  fetchPolicy: "cache-and-network"
78
- }), { data: ke, refetch: Ae } = h(r, {
79
- variables: { calendarId: U },
80
- skip: !U,
85
+ }), { data: Fe, refetch: Ie } = g(r, {
86
+ variables: { calendarId: V },
87
+ skip: !V,
81
88
  fetchPolicy: "cache-and-network"
82
- }), { data: je, refetch: Me } = h(i, {
89
+ }), { data: Le, refetch: Re } = g(i, {
83
90
  variables: {
84
- calendarId: U,
85
- startDate: Te,
86
- endDate: Ee
91
+ calendarId: V,
92
+ startDate: je,
93
+ endDate: Me
87
94
  },
88
- skip: !U,
95
+ skip: !V,
89
96
  fetchPolicy: "cache-and-network"
90
- }), { data: Ne, refetch: Pe } = h(le, {
91
- variables: { calendarId: U },
92
- skip: !U,
97
+ }), { data: ze, refetch: Be } = g(se, {
98
+ variables: { calendarId: V },
99
+ skip: !V,
93
100
  fetchPolicy: "cache-and-network"
94
- }), [Fe, { loading: G }] = m(s), [Ie] = m(o), [Le, { loading: K }] = m(ne), [Re] = m(ae), [ze, { loading: q }] = m(re), [Be] = m(oe), [Ve, { loading: J }] = m(ie), [He] = m(se), [Ue, { loading: Y }] = m(te), [We] = m(ue), [X] = m(a), [Ge] = m(c), [Ke] = m(ce), Z = De?.calendar, Q = Z?.shares ?? [], qe = Z?.bookingPages ?? [], Je = ke?.getAvailabilityRules ?? [], Ye = je?.getBlackoutDates ?? [], Xe = Ne?.getExternalCalendarSyncs ?? [], $ = async () => {
101
+ }), [Ve, { loading: U }] = h(ue), [He] = h(le), [Ue, { loading: W }] = h(te), [We] = h(re), [Ge, { loading: G }] = h(ne), [Ke] = h(ie), [qe, { loading: K }] = h(o), [Je] = h(ae), [Ye, { loading: q }] = h(ee), [Xe] = h(ce), [Ze] = h(s), [Qe] = h(de), [$e] = h(oe), J = Ne?.calendar, Y = J?.shares ?? [], X = J?.bookingPages ?? [], Z = Fe?.getAvailabilityRules ?? [], et = Le?.getBlackoutDates ?? [], Q = ze?.getExternalCalendarSyncs ?? [], $ = async () => {
95
102
  await Promise.all([
96
- we(),
97
- Oe(),
98
103
  Ae(),
99
- Me(),
100
- Pe()
104
+ Pe(),
105
+ Ie(),
106
+ Re(),
107
+ Be()
101
108
  ]);
102
109
  };
103
- return y || Ce ? /* @__PURE__ */ f("div", {
110
+ return y || ke ? /* @__PURE__ */ d("div", {
104
111
  className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
105
- children: /* @__PURE__ */ f("p", {
112
+ children: /* @__PURE__ */ d("p", {
106
113
  className: "font-text-md text-text-secondary",
107
- children: C("calendar.loading", "Loading...")
114
+ children: S("calendar.loading", "Loading...")
108
115
  })
109
- }) : v(l.CALENDAR_READ) ? /* @__PURE__ */ p("div", {
116
+ }) : p(fe.CALENDAR_READ) ? /* @__PURE__ */ f("div", {
110
117
  className: "@container min-h-screen bg-bg-canvas",
111
118
  children: [/* @__PURE__ */ f("header", {
112
- className: "border-b border-border-default bg-bg-surface px-page-padding py-element-padding",
113
- children: /* @__PURE__ */ p("div", {
119
+ className: "border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
120
+ children: [/* @__PURE__ */ f("div", {
114
121
  className: "flex items-center gap-inline-gap",
115
- children: [/* @__PURE__ */ f(_e, { className: "size-5 text-text-secondary" }), /* @__PURE__ */ f("h1", {
122
+ children: [/* @__PURE__ */ d(ve, { className: "size-5 text-text-secondary" }), /* @__PURE__ */ d("h1", {
116
123
  className: "font-heading-lg text-text-primary",
117
- children: C("calendar.calendarSettings", "Calendar Settings")
124
+ children: /* @__PURE__ */ d(xe, { children: S("calendar.calendarSettings", "Calendar Settings") })
118
125
  })]
119
- })
120
- }), /* @__PURE__ */ p("div", {
126
+ }), /* @__PURE__ */ d(Ce, {
127
+ className: "mt-stack-gap-sm max-w-3xl",
128
+ children: S("calendar.settingsPagePurpose", "The control room for a calendar. Pick the calendar to manage, set how it displays, share it with people or teams, define when you are bookable, publish Calendly-style booking pages, and connect Google, Outlook, or Apple so everything stays in sync.")
129
+ })]
130
+ }), /* @__PURE__ */ f("div", {
121
131
  className: "max-w-5xl mx-auto p-page-padding space-y-6",
122
132
  children: [
123
- /* @__PURE__ */ f(g, {
124
- title: C("calendar.activeCalendar", "Active calendar"),
125
- description: C("calendar.activeCalendarDescription", "Choose which calendar to manage for availability, shares, booking pages, and syncs."),
126
- icon: me,
127
- children: /* @__PURE__ */ f("select", {
128
- value: U,
129
- onChange: (e) => E(e.target.value),
133
+ /* @__PURE__ */ d(Se, {
134
+ storageKey: "calendar-settings",
135
+ steps: [
136
+ {
137
+ id: "set-availability",
138
+ label: S("calendar.nextStepAvailability", "Set your weekly availability"),
139
+ description: S("calendar.nextStepAvailabilityDesc", "Define the hours you are open for bookings, plus any blackout windows."),
140
+ href: "#settings-availability"
141
+ },
142
+ {
143
+ id: "create-booking-page",
144
+ label: S("calendar.nextStepBookingPage", "Publish a booking page"),
145
+ description: S("calendar.nextStepBookingPageDesc", "Let others self-schedule time with you, Calendly-style."),
146
+ href: "#settings-booking-pages"
147
+ },
148
+ {
149
+ id: "connect-external",
150
+ label: S("calendar.nextStepExternalSync", "Connect an external calendar"),
151
+ description: S("calendar.nextStepExternalSyncDesc", "Two-way sync with Google, Outlook, or Apple calendars."),
152
+ href: "#settings-external-sync"
153
+ },
154
+ {
155
+ id: "share-calendar",
156
+ label: S("calendar.nextStepShare", "Share this calendar"),
157
+ description: S("calendar.nextStepShareDesc", "Give teammates view, edit, or admin access."),
158
+ href: "#settings-sharing"
159
+ }
160
+ ]
161
+ }),
162
+ /* @__PURE__ */ d(_, {
163
+ id: "settings-active-calendar",
164
+ emphasis: !0,
165
+ title: S("calendar.activeCalendar", "Active calendar"),
166
+ description: S("calendar.activeCalendarDescription", "Choose which calendar to manage for availability, shares, booking pages, and syncs."),
167
+ icon: ge,
168
+ children: /* @__PURE__ */ d("select", {
169
+ value: V,
170
+ onChange: (e) => T(e.target.value),
130
171
  className: "w-full 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",
131
- children: H.map((e) => /* @__PURE__ */ f("option", {
172
+ children: B.map((e) => /* @__PURE__ */ d("option", {
132
173
  value: e.id,
133
174
  children: e.name
134
175
  }, e.id))
135
176
  })
136
177
  }),
137
- /* @__PURE__ */ p(g, {
138
- title: C("calendar.displayPreferences", "Display preferences"),
139
- description: C("calendar.displayPreferencesDescription", "Personalize your default view, sidebar visibility, and timezone rendering."),
140
- icon: he,
141
- children: [/* @__PURE__ */ p("div", {
178
+ /* @__PURE__ */ f(_, {
179
+ title: S("calendar.displayPreferences", "Display preferences"),
180
+ description: S("calendar.displayPreferencesDescription", "Personalize your default view, sidebar visibility, and timezone rendering."),
181
+ icon: u,
182
+ children: [/* @__PURE__ */ f("div", {
142
183
  className: "grid grid-cols-1 gap-4 @md:grid-cols-2",
143
- children: [/* @__PURE__ */ p("div", {
184
+ children: [/* @__PURE__ */ f("div", {
144
185
  className: "space-y-2",
145
- children: [/* @__PURE__ */ f("p", {
186
+ children: [/* @__PURE__ */ d("p", {
146
187
  className: "font-text-sm font-weight-medium text-text-primary",
147
- children: C("calendar.currentView", "Current view")
148
- }), /* @__PURE__ */ f("p", {
188
+ children: S("calendar.currentView", "Current view")
189
+ }), /* @__PURE__ */ d("p", {
149
190
  className: "font-text-sm text-text-secondary",
150
- children: w[b] ?? b
191
+ children: C[b] ?? b
151
192
  })]
152
- }), /* @__PURE__ */ p("div", {
193
+ }), /* @__PURE__ */ f("div", {
153
194
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle px-3 py-2 bg-bg-canvas",
154
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
195
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
155
196
  className: "font-text-sm font-weight-medium text-text-primary",
156
- children: C("calendar.showMiniCalendar", "Show mini calendar")
157
- }), /* @__PURE__ */ f("p", {
197
+ children: S("calendar.showMiniCalendar", "Show mini calendar")
198
+ }), /* @__PURE__ */ d("p", {
158
199
  className: "font-text-xs text-text-tertiary",
159
- children: C("calendar.showMiniCalendarDescription", "Display the mini calendar sidebar in calendar views.")
160
- })] }), /* @__PURE__ */ f("input", {
200
+ children: S("calendar.showMiniCalendarDescription", "Display the mini calendar sidebar in calendar views.")
201
+ })] }), /* @__PURE__ */ d("input", {
161
202
  type: "checkbox",
162
- checked: xe,
163
- onChange: (e) => Se(e.target.checked),
203
+ checked: Te,
204
+ onChange: (e) => Ee(e.target.checked),
164
205
  className: "size-4 rounded border-border-default",
165
- "aria-label": C("calendar.showMiniCalendar", "Show mini calendar")
206
+ "aria-label": S("calendar.showMiniCalendar", "Show mini calendar")
166
207
  })]
167
208
  })]
168
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
209
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
169
210
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
170
- children: C("calendar.timezone", "Timezone")
171
- }), /* @__PURE__ */ f("select", {
211
+ children: S("calendar.timezone", "Timezone")
212
+ }), /* @__PURE__ */ d("select", {
172
213
  value: x,
173
- onChange: (e) => be(e.target.value),
214
+ onChange: (e) => we(e.target.value),
174
215
  className: "w-full 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",
175
- children: Intl.supportedValuesOf("timeZone").map((e) => /* @__PURE__ */ f("option", {
216
+ children: Intl.supportedValuesOf("timeZone").map((e) => /* @__PURE__ */ d("option", {
176
217
  value: e,
177
218
  children: e
178
219
  }, e))
179
220
  })] })]
180
221
  }),
181
- /* @__PURE__ */ p(g, {
182
- title: C("calendar.sharingAndPermissions", "Sharing and permissions"),
183
- description: C("calendar.sharingAndPermissionsDescription", "Share calendars with users or teams using view, edit, or admin access."),
184
- icon: ye,
185
- children: [/* @__PURE__ */ p("form", {
222
+ /* @__PURE__ */ f(_, {
223
+ id: "settings-sharing",
224
+ title: S("calendar.sharingAndPermissions", "Sharing and permissions"),
225
+ description: S("calendar.sharingAndPermissionsDescription", "Share calendars with users or teams using view, edit, or admin access."),
226
+ icon: be,
227
+ children: [/* @__PURE__ */ f("form", {
186
228
  onSubmit: async (e) => {
187
- e.preventDefault(), !(!U || !D.trim()) && (await Fe({ variables: {
188
- calendarId: U,
189
- userId: k === "user" ? D.trim() : void 0,
190
- teamId: k === "team" ? D.trim() : void 0,
229
+ e.preventDefault(), !(!V || !E.trim()) && (await Ve({ variables: {
230
+ calendarId: V,
231
+ userId: O === "user" ? E.trim() : void 0,
232
+ teamId: O === "team" ? E.trim() : void 0,
191
233
  canView: !0,
192
- canEdit: j !== "VIEW",
193
- canManage: j === "ADMIN"
194
- } }), O(""), M("VIEW"), await $());
234
+ canEdit: k !== "VIEW",
235
+ canManage: k === "ADMIN"
236
+ } }), D(""), A("VIEW"), await $());
195
237
  },
196
238
  className: "grid grid-cols-1 gap-3 @md:grid-cols-4",
197
239
  children: [
198
- /* @__PURE__ */ p("select", {
199
- value: k,
200
- onChange: (e) => A(e.target.value),
240
+ /* @__PURE__ */ f("select", {
241
+ value: O,
242
+ onChange: (e) => Oe(e.target.value),
201
243
  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",
202
- children: [/* @__PURE__ */ f("option", {
244
+ children: [/* @__PURE__ */ d("option", {
203
245
  value: "user",
204
- children: C("calendar.shareWithUser", "User")
205
- }), /* @__PURE__ */ f("option", {
246
+ children: S("calendar.shareWithUser", "User")
247
+ }), /* @__PURE__ */ d("option", {
206
248
  value: "team",
207
- children: C("calendar.shareWithTeam", "Team")
249
+ children: S("calendar.shareWithTeam", "Team")
208
250
  })]
209
251
  }),
210
- /* @__PURE__ */ f("input", {
211
- value: D,
212
- onChange: (e) => O(e.target.value),
213
- placeholder: C("calendar.shareTargetPlaceholder", "User ID or team ID"),
214
- "aria-label": C("calendar.shareTarget", "Share target"),
252
+ /* @__PURE__ */ d("input", {
253
+ value: E,
254
+ onChange: (e) => D(e.target.value),
255
+ placeholder: S("calendar.shareTargetPlaceholder", "User ID or team ID"),
256
+ "aria-label": S("calendar.shareTarget", "Share target"),
215
257
  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"
216
258
  }),
217
- /* @__PURE__ */ p("select", {
218
- value: j,
219
- onChange: (e) => M(e.target.value),
259
+ /* @__PURE__ */ f("select", {
260
+ value: k,
261
+ onChange: (e) => A(e.target.value),
220
262
  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",
221
263
  children: [
222
- /* @__PURE__ */ f("option", {
264
+ /* @__PURE__ */ d("option", {
223
265
  value: "VIEW",
224
- children: C("calendar.permissionView", "View")
266
+ children: S("calendar.permissionView", "View")
225
267
  }),
226
- /* @__PURE__ */ f("option", {
268
+ /* @__PURE__ */ d("option", {
227
269
  value: "EDIT",
228
- children: C("calendar.permissionEdit", "Edit")
270
+ children: S("calendar.permissionEdit", "Edit")
229
271
  }),
230
- /* @__PURE__ */ f("option", {
272
+ /* @__PURE__ */ d("option", {
231
273
  value: "ADMIN",
232
- children: C("calendar.permissionAdmin", "Admin")
274
+ children: S("calendar.permissionAdmin", "Admin")
233
275
  })
234
276
  ]
235
277
  }),
236
- /* @__PURE__ */ f("button", {
278
+ /* @__PURE__ */ d("button", {
237
279
  type: "submit",
238
- disabled: !U || !D.trim() || G,
280
+ disabled: !V || !E.trim() || U,
239
281
  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",
240
- children: G ? C("calendar.sharing", "Sharing...") : C("calendar.shareCalendar", "Share calendar")
282
+ children: U ? S("calendar.sharing", "Sharing...") : S("calendar.shareCalendar", "Share calendar")
241
283
  })
242
284
  ]
243
- }), /* @__PURE__ */ f("div", {
285
+ }), /* @__PURE__ */ d("div", {
244
286
  className: "space-y-2",
245
- children: Q.length === 0 ? /* @__PURE__ */ f("p", {
246
- className: "font-text-sm text-text-secondary",
247
- children: C("calendar.noSharesConfigured", "No calendar shares configured yet.")
248
- }) : Q.map((e) => /* @__PURE__ */ p("div", {
287
+ children: Y.length === 0 ? /* @__PURE__ */ d(m, {
288
+ illustration: "empty-people",
289
+ className: "py-8",
290
+ title: S("calendar.noSharesConfigured", "No calendar shares configured yet."),
291
+ description: S("calendar.noSharesConfiguredDesc", "Use the form above to give a user or team view, edit, or admin access to this calendar.")
292
+ }) : Y.map((e) => /* @__PURE__ */ f("div", {
249
293
  className: "flex flex-col gap-2 rounded-radius-md border border-border-subtle bg-bg-canvas p-3 @md:flex-row @md:items-center @md:justify-between",
250
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
294
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
251
295
  className: "font-text-sm font-weight-medium text-text-primary",
252
- children: e.userId ?? e.teamId ?? C("calendar.unknownShareTarget", "Unknown target")
253
- }), /* @__PURE__ */ p("p", {
296
+ children: e.userId ?? e.teamId ?? S("calendar.unknownShareTarget", "Unknown target")
297
+ }), /* @__PURE__ */ f("p", {
254
298
  className: "font-text-xs text-text-tertiary",
255
299
  children: [
256
300
  e.canManage ? "ADMIN" : e.canEdit ? "EDIT" : "VIEW",
257
301
  " •",
258
302
  " ",
259
- _(e.createdAt)
303
+ v(e.createdAt)
260
304
  ]
261
- })] }), /* @__PURE__ */ f("button", {
305
+ })] }), /* @__PURE__ */ d("button", {
262
306
  type: "button",
263
307
  onClick: async () => {
264
- await Ie({ variables: { shareId: e.id } }), await $();
308
+ await He({ variables: { shareId: e.id } }), await $();
265
309
  },
266
310
  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",
267
- children: C("calendar.revokeShare", "Revoke")
311
+ children: S("calendar.revokeShare", "Revoke")
268
312
  })]
269
313
  }, e.id))
270
314
  })]
271
315
  }),
272
- /* @__PURE__ */ p(g, {
273
- title: C("calendar.availabilityAndBlocking", "Availability and blocking"),
274
- description: C("calendar.availabilityAndBlockingDescription", "Define recurring availability and create manual blackout windows for booking protection."),
275
- icon: pe,
316
+ /* @__PURE__ */ f(_, {
317
+ id: "settings-availability",
318
+ title: S("calendar.availabilityAndBlocking", "Availability and blocking"),
319
+ description: S("calendar.availabilityAndBlockingDescription", "Define recurring availability and create manual blackout windows for booking protection."),
320
+ icon: he,
276
321
  children: [
277
- /* @__PURE__ */ p("form", {
322
+ /* @__PURE__ */ f("form", {
278
323
  onSubmit: async (e) => {
279
- e.preventDefault(), U && (await Le({ variables: { input: {
280
- calendarId: U,
281
- dayOfWeek: N.dayOfWeek,
324
+ e.preventDefault(), V && (await Ue({ variables: { input: {
325
+ calendarId: V,
326
+ dayOfWeek: j.dayOfWeek,
282
327
  isAvailable: !0,
283
- startTime: N.startTime,
284
- endTime: N.endTime,
328
+ startTime: j.startTime,
329
+ endTime: j.endTime,
285
330
  timezone: x,
286
- bufferBefore: parseInt(N.bufferBefore, 10),
287
- bufferAfter: parseInt(N.bufferAfter, 10),
288
- slotIncrement: parseInt(N.slotIncrement, 10),
289
- minNotice: parseInt(N.minNotice, 10),
290
- maxNotice: parseInt(N.maxNotice, 10)
331
+ bufferBefore: parseInt(j.bufferBefore, 10),
332
+ bufferAfter: parseInt(j.bufferAfter, 10),
333
+ slotIncrement: parseInt(j.slotIncrement, 10),
334
+ minNotice: parseInt(j.minNotice, 10),
335
+ maxNotice: parseInt(j.maxNotice, 10)
291
336
  } } }), await $());
292
337
  },
293
338
  className: "grid grid-cols-1 gap-3 @md:grid-cols-4",
294
339
  children: [
295
- /* @__PURE__ */ f("select", {
296
- value: N.dayOfWeek,
297
- onChange: (e) => P((t) => ({
340
+ /* @__PURE__ */ d("select", {
341
+ value: j.dayOfWeek,
342
+ onChange: (e) => M((t) => ({
298
343
  ...t,
299
344
  dayOfWeek: e.target.value
300
345
  })),
@@ -307,44 +352,49 @@ function v() {
307
352
  "FRIDAY",
308
353
  "SATURDAY",
309
354
  "SUNDAY"
310
- ].map((e) => /* @__PURE__ */ f("option", {
355
+ ].map((e) => /* @__PURE__ */ d("option", {
311
356
  value: e,
312
357
  children: e
313
358
  }, e))
314
359
  }),
315
- /* @__PURE__ */ f("input", {
360
+ /* @__PURE__ */ d("input", {
316
361
  type: "time",
317
- value: N.startTime,
318
- onChange: (e) => P((t) => ({
362
+ value: j.startTime,
363
+ onChange: (e) => M((t) => ({
319
364
  ...t,
320
365
  startTime: e.target.value
321
366
  })),
322
367
  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",
323
- "aria-label": C("calendar.availabilityStart", "Availability start time")
368
+ "aria-label": S("calendar.availabilityStart", "Availability start time")
324
369
  }),
325
- /* @__PURE__ */ f("input", {
370
+ /* @__PURE__ */ d("input", {
326
371
  type: "time",
327
- value: N.endTime,
328
- onChange: (e) => P((t) => ({
372
+ value: j.endTime,
373
+ onChange: (e) => M((t) => ({
329
374
  ...t,
330
375
  endTime: e.target.value
331
376
  })),
332
377
  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",
333
- "aria-label": C("calendar.availabilityEnd", "Availability end time")
378
+ "aria-label": S("calendar.availabilityEnd", "Availability end time")
334
379
  }),
335
- /* @__PURE__ */ f("button", {
380
+ /* @__PURE__ */ d("button", {
336
381
  type: "submit",
337
- disabled: !U || K,
382
+ disabled: !V || W,
338
383
  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",
339
- children: K ? C("calendar.savingAvailability", "Saving...") : C("calendar.addAvailabilityRule", "Add availability rule")
384
+ children: W ? S("calendar.savingAvailability", "Saving...") : S("calendar.addAvailabilityRule", "Add availability rule")
340
385
  })
341
386
  ]
342
387
  }),
343
388
  /* @__PURE__ */ f("div", {
344
389
  className: "space-y-2",
345
- children: Je.map((e) => /* @__PURE__ */ p("div", {
390
+ children: [Z.length === 0 ? /* @__PURE__ */ d(m, {
391
+ illustration: "empty-data",
392
+ className: "py-8",
393
+ title: S("calendar.noAvailabilityRules", "No availability rules yet"),
394
+ description: S("calendar.noAvailabilityRulesDesc", "Add a weekly window above to tell booking pages when you can be scheduled.")
395
+ }) : null, Z.map((e) => /* @__PURE__ */ f("div", {
346
396
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle bg-bg-canvas p-3",
347
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
397
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
348
398
  className: "font-text-sm font-weight-medium text-text-primary",
349
399
  children: [
350
400
  e.dayOfWeek,
@@ -353,27 +403,27 @@ function v() {
353
403
  " - ",
354
404
  e.endTime
355
405
  ]
356
- }), /* @__PURE__ */ f("p", {
406
+ }), /* @__PURE__ */ d("p", {
357
407
  className: "font-text-xs text-text-tertiary",
358
408
  children: e.timezone
359
- })] }), /* @__PURE__ */ f("button", {
409
+ })] }), /* @__PURE__ */ d("button", {
360
410
  type: "button",
361
411
  onClick: async () => {
362
- await Re({ variables: { id: e.id } }), await $();
412
+ await We({ variables: { id: e.id } }), await $();
363
413
  },
364
414
  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",
365
- children: C("calendar.delete", "Delete")
415
+ children: S("calendar.delete", "Delete")
366
416
  })]
367
- }, e.id))
417
+ }, e.id))]
368
418
  }),
369
- /* @__PURE__ */ p("form", {
419
+ /* @__PURE__ */ f("form", {
370
420
  onSubmit: async (e) => {
371
- e.preventDefault(), !(!U || !F.startDate || !F.endDate) && (await ze({ variables: { input: {
372
- calendarId: U,
373
- startDate: new Date(F.startDate).toISOString(),
374
- endDate: new Date(F.endDate).toISOString(),
375
- reason: F.reason || void 0
376
- } } }), I({
421
+ e.preventDefault(), !(!V || !N.startDate || !N.endDate) && (await Ge({ variables: { input: {
422
+ calendarId: V,
423
+ startDate: new Date(N.startDate).toISOString(),
424
+ endDate: new Date(N.endDate).toISOString(),
425
+ reason: N.reason || void 0
426
+ } } }), P({
377
427
  startDate: "",
378
428
  endDate: "",
379
429
  reason: ""
@@ -381,88 +431,89 @@ function v() {
381
431
  },
382
432
  className: "grid grid-cols-1 gap-3 @md:grid-cols-4",
383
433
  children: [
384
- /* @__PURE__ */ f("input", {
434
+ /* @__PURE__ */ d("input", {
385
435
  type: "datetime-local",
386
- value: F.startDate,
387
- onChange: (e) => I((t) => ({
436
+ value: N.startDate,
437
+ onChange: (e) => P((t) => ({
388
438
  ...t,
389
439
  startDate: e.target.value
390
440
  })),
391
441
  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",
392
- "aria-label": C("calendar.blackoutStart", "Blackout start")
442
+ "aria-label": S("calendar.blackoutStart", "Blackout start")
393
443
  }),
394
- /* @__PURE__ */ f("input", {
444
+ /* @__PURE__ */ d("input", {
395
445
  type: "datetime-local",
396
- value: F.endDate,
397
- onChange: (e) => I((t) => ({
446
+ value: N.endDate,
447
+ onChange: (e) => P((t) => ({
398
448
  ...t,
399
449
  endDate: e.target.value
400
450
  })),
401
451
  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",
402
- "aria-label": C("calendar.blackoutEnd", "Blackout end")
452
+ "aria-label": S("calendar.blackoutEnd", "Blackout end")
403
453
  }),
404
- /* @__PURE__ */ f("input", {
405
- value: F.reason,
406
- onChange: (e) => I((t) => ({
454
+ /* @__PURE__ */ d("input", {
455
+ value: N.reason,
456
+ onChange: (e) => P((t) => ({
407
457
  ...t,
408
458
  reason: e.target.value
409
459
  })),
410
- placeholder: C("calendar.blackoutReason", "Reason for block"),
411
- "aria-label": C("calendar.blackoutReason", "Reason for block"),
460
+ placeholder: S("calendar.blackoutReason", "Reason for block"),
461
+ "aria-label": S("calendar.blackoutReason", "Reason for block"),
412
462
  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"
413
463
  }),
414
- /* @__PURE__ */ f("button", {
464
+ /* @__PURE__ */ d("button", {
415
465
  type: "submit",
416
- disabled: !U || q,
466
+ disabled: !V || G,
417
467
  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",
418
- children: q ? C("calendar.blocking", "Blocking...") : C("calendar.addBlackout", "Add block")
468
+ children: G ? S("calendar.blocking", "Blocking...") : S("calendar.addBlackout", "Add block")
419
469
  })
420
470
  ]
421
471
  }),
422
- /* @__PURE__ */ f("div", {
472
+ /* @__PURE__ */ d("div", {
423
473
  className: "space-y-2",
424
- children: Ye.map((e) => /* @__PURE__ */ p("div", {
474
+ children: et.map((e) => /* @__PURE__ */ f("div", {
425
475
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle bg-bg-canvas p-3",
426
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
476
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
427
477
  className: "font-text-sm font-weight-medium text-text-primary",
428
478
  children: [
429
- _(e.startDate),
479
+ v(e.startDate),
430
480
  " → ",
431
- _(e.endDate)
481
+ v(e.endDate)
432
482
  ]
433
- }), /* @__PURE__ */ f("p", {
483
+ }), /* @__PURE__ */ d("p", {
434
484
  className: "font-text-xs text-text-tertiary",
435
485
  children: e.reason ?? "—"
436
- })] }), /* @__PURE__ */ f("button", {
486
+ })] }), /* @__PURE__ */ d("button", {
437
487
  type: "button",
438
488
  onClick: async () => {
439
- await Be({ variables: { id: e.id } }), await $();
489
+ await Ke({ variables: { id: e.id } }), await $();
440
490
  },
441
491
  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",
442
- children: C("calendar.delete", "Delete")
492
+ children: S("calendar.delete", "Delete")
443
493
  })]
444
494
  }, e.id))
445
495
  })
446
496
  ]
447
497
  }),
448
- /* @__PURE__ */ p(g, {
449
- title: C("calendar.bookingPages", "Booking pages"),
450
- description: C("calendar.bookingPagesDescription", "Create Calendly-style booking pages for appointment scheduling from your calendar availability."),
451
- icon: ge,
452
- children: [/* @__PURE__ */ p("form", {
498
+ /* @__PURE__ */ f(_, {
499
+ id: "settings-booking-pages",
500
+ title: S("calendar.bookingPages", "Booking pages"),
501
+ description: S("calendar.bookingPagesDescription", "Create Calendly-style booking pages for appointment scheduling from your calendar availability."),
502
+ icon: _e,
503
+ children: [/* @__PURE__ */ f("form", {
453
504
  onSubmit: async (e) => {
454
- e.preventDefault(), !(!U || !L.name.trim() || !L.slug.trim()) && (await Ve({ variables: { input: {
455
- calendarId: U,
456
- name: L.name.trim(),
457
- slug: L.slug.trim(),
458
- pageType: L.pageType,
459
- eventDuration: parseInt(L.eventDuration, 10),
460
- locationType: L.locationType,
461
- maxAttendees: parseInt(L.maxAttendees, 10),
462
- requireApproval: L.requireApproval,
505
+ e.preventDefault(), !(!V || !F.name.trim() || !F.slug.trim()) && (await qe({ variables: { input: {
506
+ calendarId: V,
507
+ name: F.name.trim(),
508
+ slug: F.slug.trim(),
509
+ pageType: F.pageType,
510
+ eventDuration: parseInt(F.eventDuration, 10),
511
+ locationType: F.locationType,
512
+ maxAttendees: parseInt(F.maxAttendees, 10),
513
+ requireApproval: F.requireApproval,
463
514
  isActive: !0,
464
515
  isPublic: !0
465
- } } }), R({
516
+ } } }), I({
466
517
  name: "",
467
518
  slug: "",
468
519
  pageType: "ONE_ON_ONE",
@@ -474,41 +525,41 @@ function v() {
474
525
  },
475
526
  className: "grid grid-cols-1 gap-3 @md:grid-cols-3",
476
527
  children: [
477
- /* @__PURE__ */ f("input", {
478
- "aria-label": C("calendar.bookingPageName", "Booking page name"),
479
- value: L.name,
480
- onChange: (e) => R((t) => ({
528
+ /* @__PURE__ */ d("input", {
529
+ "aria-label": S("calendar.bookingPageName", "Booking page name"),
530
+ value: F.name,
531
+ onChange: (e) => I((t) => ({
481
532
  ...t,
482
533
  name: e.target.value
483
534
  })),
484
- placeholder: C("calendar.bookingPageName", "Booking page name"),
535
+ placeholder: S("calendar.bookingPageName", "Booking page name"),
485
536
  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"
486
537
  }),
487
- /* @__PURE__ */ f("input", {
488
- "aria-label": C("calendar.bookingPageSlugLabel", "Booking page slug"),
489
- value: L.slug,
490
- onChange: (e) => R((t) => ({
538
+ /* @__PURE__ */ d("input", {
539
+ "aria-label": S("calendar.bookingPageSlugLabel", "Booking page slug"),
540
+ value: F.slug,
541
+ onChange: (e) => I((t) => ({
491
542
  ...t,
492
543
  slug: e.target.value
493
544
  })),
494
- placeholder: C("calendar.bookingPageSlug", "booking-page-slug"),
545
+ placeholder: S("calendar.bookingPageSlug", "booking-page-slug"),
495
546
  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"
496
547
  }),
497
- /* @__PURE__ */ f("input", {
498
- "aria-label": C("calendar.bookingPageDuration", "Event duration in minutes"),
548
+ /* @__PURE__ */ d("input", {
549
+ "aria-label": S("calendar.bookingPageDuration", "Event duration in minutes"),
499
550
  type: "number",
500
551
  min: "15",
501
552
  step: "15",
502
- value: L.eventDuration,
503
- onChange: (e) => R((t) => ({
553
+ value: F.eventDuration,
554
+ onChange: (e) => I((t) => ({
504
555
  ...t,
505
556
  eventDuration: e.target.value
506
557
  })),
507
558
  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"
508
559
  }),
509
- /* @__PURE__ */ f("select", {
510
- value: L.pageType,
511
- onChange: (e) => R((t) => ({
560
+ /* @__PURE__ */ d("select", {
561
+ value: F.pageType,
562
+ onChange: (e) => I((t) => ({
512
563
  ...t,
513
564
  pageType: e.target.value
514
565
  })),
@@ -518,14 +569,14 @@ function v() {
518
569
  "GROUP",
519
570
  "ROUND_ROBIN",
520
571
  "COLLECTIVE"
521
- ].map((e) => /* @__PURE__ */ f("option", {
572
+ ].map((e) => /* @__PURE__ */ d("option", {
522
573
  value: e,
523
574
  children: e
524
575
  }, e))
525
576
  }),
526
- /* @__PURE__ */ f("select", {
527
- value: L.locationType,
528
- onChange: (e) => R((t) => ({
577
+ /* @__PURE__ */ d("select", {
578
+ value: F.locationType,
579
+ onChange: (e) => I((t) => ({
529
580
  ...t,
530
581
  locationType: e.target.value
531
582
  })),
@@ -535,48 +586,53 @@ function v() {
535
586
  "PHYSICAL",
536
587
  "HYBRID",
537
588
  "TBD"
538
- ].map((e) => /* @__PURE__ */ f("option", {
589
+ ].map((e) => /* @__PURE__ */ d("option", {
539
590
  value: e,
540
591
  children: e
541
592
  }, e))
542
593
  }),
543
- /* @__PURE__ */ p("div", {
594
+ /* @__PURE__ */ f("div", {
544
595
  className: "flex items-center gap-3 rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2",
545
- children: [/* @__PURE__ */ f("input", {
596
+ children: [/* @__PURE__ */ d("input", {
546
597
  id: "booking-page-approval",
547
- "aria-label": C("calendar.requireApproval", "Require approval"),
598
+ "aria-label": S("calendar.requireApproval", "Require approval"),
548
599
  type: "checkbox",
549
- checked: L.requireApproval,
550
- onChange: (e) => R((t) => ({
600
+ checked: F.requireApproval,
601
+ onChange: (e) => I((t) => ({
551
602
  ...t,
552
603
  requireApproval: e.target.checked
553
604
  })),
554
605
  className: "size-4 rounded border-border-default"
555
- }), /* @__PURE__ */ f("label", {
606
+ }), /* @__PURE__ */ d("label", {
556
607
  htmlFor: "booking-page-approval",
557
608
  className: "font-text-sm text-text-primary",
558
- children: C("calendar.requireApproval", "Require approval")
609
+ children: S("calendar.requireApproval", "Require approval")
559
610
  })]
560
611
  }),
561
- /* @__PURE__ */ f("button", {
612
+ /* @__PURE__ */ d("button", {
562
613
  type: "submit",
563
- disabled: !U || J,
614
+ disabled: !V || K,
564
615
  className: "@md:col-span-3 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",
565
- children: J ? C("calendar.creating", "Creating...") : C("calendar.createBookingPage", "Create booking page")
616
+ children: K ? S("calendar.creating", "Creating...") : S("calendar.createBookingPage", "Create booking page")
566
617
  })
567
618
  ]
568
619
  }), /* @__PURE__ */ f("div", {
569
620
  className: "space-y-2",
570
- children: qe.map((e) => /* @__PURE__ */ p("div", {
621
+ children: [X.length === 0 ? /* @__PURE__ */ d(m, {
622
+ illustration: "empty-data",
623
+ className: "py-8",
624
+ title: S("calendar.noBookingPages", "No booking pages yet"),
625
+ description: S("calendar.noBookingPagesDesc", "Create a booking page above to let others self-schedule time with you.")
626
+ }) : null, X.map((e) => /* @__PURE__ */ f("div", {
571
627
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle bg-bg-canvas p-3",
572
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
628
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
573
629
  className: "font-text-sm font-weight-medium text-text-primary",
574
630
  children: [
575
631
  e.name,
576
632
  " • ",
577
633
  e.pageType
578
634
  ]
579
- }), /* @__PURE__ */ p("p", {
635
+ }), /* @__PURE__ */ f("p", {
580
636
  className: "font-text-xs text-text-tertiary",
581
637
  children: [
582
638
  "/book/",
@@ -587,33 +643,34 @@ function v() {
587
643
  " ",
588
644
  e.isActive ? "ACTIVE" : "INACTIVE"
589
645
  ]
590
- })] }), /* @__PURE__ */ f("button", {
646
+ })] }), /* @__PURE__ */ d("button", {
591
647
  type: "button",
592
648
  onClick: async () => {
593
- await He({ variables: { id: e.id } }), await $();
649
+ await Je({ variables: { id: e.id } }), await $();
594
650
  },
595
651
  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",
596
- children: C("calendar.delete", "Delete")
652
+ children: S("calendar.delete", "Delete")
597
653
  })]
598
- }, e.id))
654
+ }, e.id))]
599
655
  })]
600
656
  }),
601
- /* @__PURE__ */ p(g, {
602
- title: C("calendar.externalCalendarSync", "External calendar sync"),
603
- description: C("calendar.externalCalendarSyncDescription", "Configure Google, Outlook, and Apple-compatible sync connections and trigger synchronization cycles."),
604
- icon: ve,
605
- children: [/* @__PURE__ */ p("form", {
657
+ /* @__PURE__ */ f(_, {
658
+ id: "settings-external-sync",
659
+ title: S("calendar.externalCalendarSync", "External calendar sync"),
660
+ description: S("calendar.externalCalendarSyncDescription", "Configure Google, Outlook, and Apple-compatible sync connections and trigger synchronization cycles."),
661
+ icon: ye,
662
+ children: [/* @__PURE__ */ f("form", {
606
663
  onSubmit: async (e) => {
607
- e.preventDefault(), !(!U || !z.externalCalendarId.trim() || !z.accessToken.trim()) && (await Ue({ variables: { input: {
608
- calendarId: U,
609
- provider: z.provider,
610
- externalCalendarId: z.externalCalendarId.trim(),
611
- externalCalendarName: z.externalCalendarName.trim() || void 0,
612
- accessToken: z.accessToken.trim(),
613
- refreshToken: z.refreshToken.trim() || void 0,
614
- syncFrequency: parseInt(z.syncFrequency, 10),
615
- direction: z.direction
616
- } } }), B({
664
+ e.preventDefault(), !(!V || !L.externalCalendarId.trim() || !L.accessToken.trim()) && (await Ye({ variables: { input: {
665
+ calendarId: V,
666
+ provider: L.provider,
667
+ externalCalendarId: L.externalCalendarId.trim(),
668
+ externalCalendarName: L.externalCalendarName.trim() || void 0,
669
+ accessToken: L.accessToken.trim(),
670
+ refreshToken: L.refreshToken.trim() || void 0,
671
+ syncFrequency: parseInt(L.syncFrequency, 10),
672
+ direction: L.direction
673
+ } } }), R({
617
674
  provider: "GOOGLE_CALENDAR",
618
675
  externalCalendarId: "",
619
676
  externalCalendarName: "",
@@ -625,119 +682,124 @@ function v() {
625
682
  },
626
683
  className: "grid grid-cols-1 gap-3 @md:grid-cols-3",
627
684
  children: [
628
- /* @__PURE__ */ p("select", {
629
- value: z.provider,
630
- onChange: (e) => B((t) => ({
685
+ /* @__PURE__ */ f("select", {
686
+ value: L.provider,
687
+ onChange: (e) => R((t) => ({
631
688
  ...t,
632
689
  provider: e.target.value
633
690
  })),
634
691
  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",
635
692
  children: [
636
- /* @__PURE__ */ f("option", {
693
+ /* @__PURE__ */ d("option", {
637
694
  value: "GOOGLE_CALENDAR",
638
695
  children: "Google Calendar"
639
696
  }),
640
- /* @__PURE__ */ f("option", {
697
+ /* @__PURE__ */ d("option", {
641
698
  value: "OUTLOOK_CALENDAR",
642
699
  children: "Outlook Calendar"
643
700
  }),
644
- /* @__PURE__ */ f("option", {
701
+ /* @__PURE__ */ d("option", {
645
702
  value: "APPLE_ICAL",
646
703
  children: "Apple Calendar"
647
704
  }),
648
- /* @__PURE__ */ f("option", {
705
+ /* @__PURE__ */ d("option", {
649
706
  value: "CALDAV",
650
707
  children: "CalDAV"
651
708
  })
652
709
  ]
653
710
  }),
654
- /* @__PURE__ */ f("input", {
655
- "aria-label": C("calendar.externalCalendarId", "External calendar ID"),
656
- value: z.externalCalendarId,
657
- onChange: (e) => B((t) => ({
711
+ /* @__PURE__ */ d("input", {
712
+ "aria-label": S("calendar.externalCalendarId", "External calendar ID"),
713
+ value: L.externalCalendarId,
714
+ onChange: (e) => R((t) => ({
658
715
  ...t,
659
716
  externalCalendarId: e.target.value
660
717
  })),
661
- placeholder: C("calendar.externalCalendarId", "External calendar ID"),
718
+ placeholder: S("calendar.externalCalendarId", "External calendar ID"),
662
719
  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"
663
720
  }),
664
- /* @__PURE__ */ f("input", {
665
- "aria-label": C("calendar.externalCalendarName", "External calendar name"),
666
- value: z.externalCalendarName,
667
- onChange: (e) => B((t) => ({
721
+ /* @__PURE__ */ d("input", {
722
+ "aria-label": S("calendar.externalCalendarName", "External calendar name"),
723
+ value: L.externalCalendarName,
724
+ onChange: (e) => R((t) => ({
668
725
  ...t,
669
726
  externalCalendarName: e.target.value
670
727
  })),
671
- placeholder: C("calendar.externalCalendarName", "External calendar name"),
728
+ placeholder: S("calendar.externalCalendarName", "External calendar name"),
672
729
  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"
673
730
  }),
674
- /* @__PURE__ */ f("input", {
675
- "aria-label": C("calendar.accessToken", "Access token"),
676
- value: z.accessToken,
677
- onChange: (e) => B((t) => ({
731
+ /* @__PURE__ */ d("input", {
732
+ "aria-label": S("calendar.accessToken", "Access token"),
733
+ value: L.accessToken,
734
+ onChange: (e) => R((t) => ({
678
735
  ...t,
679
736
  accessToken: e.target.value
680
737
  })),
681
- placeholder: C("calendar.accessToken", "Access token"),
738
+ placeholder: S("calendar.accessToken", "Access token"),
682
739
  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"
683
740
  }),
684
- /* @__PURE__ */ f("input", {
685
- "aria-label": C("calendar.refreshToken", "Refresh token (optional)"),
686
- value: z.refreshToken,
687
- onChange: (e) => B((t) => ({
741
+ /* @__PURE__ */ d("input", {
742
+ "aria-label": S("calendar.refreshToken", "Refresh token (optional)"),
743
+ value: L.refreshToken,
744
+ onChange: (e) => R((t) => ({
688
745
  ...t,
689
746
  refreshToken: e.target.value
690
747
  })),
691
- placeholder: C("calendar.refreshToken", "Refresh token (optional)"),
748
+ placeholder: S("calendar.refreshToken", "Refresh token (optional)"),
692
749
  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"
693
750
  }),
694
- /* @__PURE__ */ f("input", {
695
- "aria-label": C("calendar.syncFrequencyLabel", "Sync frequency in seconds"),
751
+ /* @__PURE__ */ d("input", {
752
+ "aria-label": S("calendar.syncFrequencyLabel", "Sync frequency in seconds"),
696
753
  type: "number",
697
754
  min: "60",
698
755
  step: "60",
699
- value: z.syncFrequency,
700
- onChange: (e) => B((t) => ({
756
+ value: L.syncFrequency,
757
+ onChange: (e) => R((t) => ({
701
758
  ...t,
702
759
  syncFrequency: e.target.value
703
760
  })),
704
761
  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"
705
762
  }),
706
- /* @__PURE__ */ p("select", {
707
- value: z.direction,
708
- onChange: (e) => B((t) => ({
763
+ /* @__PURE__ */ f("select", {
764
+ value: L.direction,
765
+ onChange: (e) => R((t) => ({
709
766
  ...t,
710
767
  direction: e.target.value
711
768
  })),
712
769
  className: "@md:col-span-2 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",
713
770
  children: [
714
- /* @__PURE__ */ f("option", {
771
+ /* @__PURE__ */ d("option", {
715
772
  value: "TWO_WAY",
716
- children: C("calendar.twoWaySync", "Two-way sync")
773
+ children: S("calendar.twoWaySync", "Two-way sync")
717
774
  }),
718
- /* @__PURE__ */ f("option", {
775
+ /* @__PURE__ */ d("option", {
719
776
  value: "ONE_WAY_TO_EXTERNAL",
720
- children: C("calendar.oneWayToExternal", "One-way to external")
777
+ children: S("calendar.oneWayToExternal", "One-way to external")
721
778
  }),
722
- /* @__PURE__ */ f("option", {
779
+ /* @__PURE__ */ d("option", {
723
780
  value: "ONE_WAY_FROM_EXTERNAL",
724
- children: C("calendar.oneWayFromExternal", "One-way from external")
781
+ children: S("calendar.oneWayFromExternal", "One-way from external")
725
782
  })
726
783
  ]
727
784
  }),
728
- /* @__PURE__ */ f("button", {
785
+ /* @__PURE__ */ d("button", {
729
786
  type: "submit",
730
- disabled: !U || Y,
787
+ disabled: !V || q,
731
788
  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",
732
- children: Y ? C("calendar.connecting", "Connecting...") : C("calendar.connectExternalCalendar", "Connect external calendar")
789
+ children: q ? S("calendar.connecting", "Connecting...") : S("calendar.connectExternalCalendar", "Connect external calendar")
733
790
  })
734
791
  ]
735
792
  }), /* @__PURE__ */ f("div", {
736
793
  className: "space-y-3",
737
- children: Xe.map((e) => /* @__PURE__ */ p("div", {
794
+ children: [Q.length === 0 ? /* @__PURE__ */ d(m, {
795
+ illustration: "empty-generic",
796
+ className: "py-8",
797
+ title: S("calendar.noExternalSyncs", "No external calendars connected"),
798
+ description: S("calendar.noExternalSyncsDesc", "Connect Google, Outlook, or Apple above to keep events in sync both ways.")
799
+ }) : null, Q.map((e) => /* @__PURE__ */ f("div", {
738
800
  className: "rounded-radius-md border border-border-subtle bg-bg-canvas p-3 space-y-3",
739
- children: [/* @__PURE__ */ p("div", { children: [
740
- /* @__PURE__ */ p("p", {
801
+ children: [/* @__PURE__ */ f("div", { children: [
802
+ /* @__PURE__ */ f("p", {
741
803
  className: "font-text-sm font-weight-medium text-text-primary",
742
804
  children: [
743
805
  e.provider,
@@ -745,70 +807,70 @@ function v() {
745
807
  e.externalCalendarName ?? e.externalCalendarId
746
808
  ]
747
809
  }),
748
- /* @__PURE__ */ p("p", {
810
+ /* @__PURE__ */ f("p", {
749
811
  className: "font-text-xs text-text-tertiary",
750
812
  children: [
751
813
  e.status,
752
814
  " •",
753
815
  " ",
754
- C("calendar.everySeconds", "Every {value} seconds").replace("{value}", String(e.syncFrequency))
816
+ S("calendar.everySeconds", "Every {value} seconds").replace("{value}", String(e.syncFrequency))
755
817
  ]
756
818
  }),
757
- /* @__PURE__ */ p("p", {
819
+ /* @__PURE__ */ f("p", {
758
820
  className: "font-text-xs text-text-tertiary",
759
821
  children: [
760
- C("calendar.lastSync", "Last sync"),
822
+ S("calendar.lastSync", "Last sync"),
761
823
  ": ",
762
- _(e.lastSyncAt),
824
+ v(e.lastSyncAt),
763
825
  " •",
764
826
  " ",
765
827
  e.lastSyncStatus ?? "—"
766
828
  ]
767
829
  }),
768
- e.lastSyncError ? /* @__PURE__ */ f("p", {
830
+ e.lastSyncError ? /* @__PURE__ */ d("p", {
769
831
  className: "font-text-xs text-text-secondary",
770
832
  children: e.lastSyncError
771
833
  }) : null
772
- ] }), /* @__PURE__ */ p("div", {
834
+ ] }), /* @__PURE__ */ f("div", {
773
835
  className: "flex flex-wrap gap-2",
774
836
  children: [
775
- /* @__PURE__ */ f("button", {
837
+ /* @__PURE__ */ d("button", {
776
838
  type: "button",
777
839
  onClick: async () => {
778
- await Ge({ variables: { syncId: e.id } }), await $();
840
+ await Qe({ variables: { syncId: e.id } }), await $();
779
841
  },
780
842
  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",
781
- children: C("calendar.triggerSync", "Trigger sync")
843
+ children: S("calendar.triggerSync", "Trigger sync")
782
844
  }),
783
- /* @__PURE__ */ f("button", {
845
+ /* @__PURE__ */ d("button", {
784
846
  type: "button",
785
847
  onClick: async () => {
786
- e.syncEnabled ? await We({ variables: { syncId: e.id } }) : await X({ variables: { syncId: e.id } }), await $();
848
+ e.syncEnabled ? await Xe({ variables: { syncId: e.id } }) : await Ze({ variables: { syncId: e.id } }), await $();
787
849
  },
788
850
  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",
789
- children: e.syncEnabled ? C("calendar.pauseSync", "Pause") : C("calendar.resumeSync", "Resume")
851
+ children: e.syncEnabled ? S("calendar.pauseSync", "Pause") : S("calendar.resumeSync", "Resume")
790
852
  }),
791
- /* @__PURE__ */ f("button", {
853
+ /* @__PURE__ */ d("button", {
792
854
  type: "button",
793
855
  onClick: async () => {
794
- await Ke({ variables: { syncId: e.id } }), await $();
856
+ await $e({ variables: { syncId: e.id } }), await $();
795
857
  },
796
858
  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",
797
- children: C("calendar.disconnect", "Disconnect")
859
+ children: S("calendar.disconnect", "Disconnect")
798
860
  })
799
861
  ]
800
862
  })]
801
- }, e.id))
863
+ }, e.id))]
802
864
  })]
803
865
  })
804
866
  ]
805
867
  })]
806
- }) : /* @__PURE__ */ f(de, {
807
- title: C("calendar.accessDenied", "Access Denied"),
808
- description: C("calendar.noPermissionViewSettings", "You don't have permission to view calendar settings.")
868
+ }) : /* @__PURE__ */ d(pe, {
869
+ title: S("calendar.accessDenied", "Access Denied"),
870
+ description: S("calendar.noPermissionViewSettings", "You don't have permission to view calendar settings.")
809
871
  });
810
872
  }
811
873
  //#endregion
812
- export { v as SettingsPage };
874
+ export { y as SettingsPage };
813
875
 
814
876
  //# sourceMappingURL=SettingsPage.js.map