@burdenoff/microfe-calendar 2026.625.1 → 2026.626.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,10 +7,10 @@ import { useCallback as c, useMemo as l, useState as u } from "react";
7
7
  import { AccessDenied as d } from "@burdenoff/fe-libs/shared/components";
8
8
  import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
9
  import { Car as p, DoorOpen as m, MapPin as h, Monitor as g, Package as _, Plus as v, Users as y, X as b } from "lucide-react";
10
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
11
- import { GlassCard as C, GradientText as w, IllustratedEmptyState as T } from "@burdenoff/fe-libs/ui";
10
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
11
+ import { EmphasisPanel as w, GlassCard as T, GradientText as E, IllustratedEmptyState as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/pages/ResourcesPage.tsx
13
- var E = {
13
+ var k = {
14
14
  ROOM: m,
15
15
  EQUIPMENT: g,
16
16
  VEHICLE: p,
@@ -18,14 +18,14 @@ var E = {
18
18
  PARKING_SPOT: p,
19
19
  OTHER: _
20
20
  };
21
- function D() {
22
- let { hasPermission: p, isLoading: m } = r(), { t: g } = f(), D = c((e, t) => {
23
- let n = g(e);
21
+ function A() {
22
+ let { hasPermission: p, isLoading: g } = r(), { t: A } = f(), j = c((e, t) => {
23
+ let n = A(e);
24
24
  return n === e ? t : n;
25
- }, [g]), [O, k] = u(!1), [A, j] = u(null), M = p(i.CALENDAR_RESOURCE_READ), { data: N, loading: P, error: F, refetch: I } = n({
25
+ }, [A]), [M, N] = u(!1), [P, F] = u(null), I = p(i.CALENDAR_RESOURCE_READ), { data: L, loading: R, error: z, refetch: B } = n({
26
26
  fetchPolicy: "cache-and-network",
27
- skip: m || !M
28
- }), L = N?.getCalendarResources ?? [], [R, { loading: z, error: B }] = e(), [V, { loading: H }] = t(), [U, W] = u({
27
+ skip: g || !I
28
+ }), V = L?.getCalendarResources ?? [], [H, { loading: U, error: W }] = e(), [G, { loading: K }] = t(), [q, J] = u({
29
29
  name: "",
30
30
  description: "",
31
31
  resourceType: "ROOM",
@@ -35,168 +35,185 @@ function D() {
35
35
  floor: "",
36
36
  room: "",
37
37
  requireApproval: !1
38
- }), G = l(() => ({
39
- ROOM: D("calendar.room", "Room"),
40
- EQUIPMENT: D("calendar.equipment", "Equipment"),
41
- VEHICLE: D("calendar.vehicle", "Vehicle"),
42
- DESK: D("calendar.desk", "Desk"),
43
- PARKING_SPOT: D("calendar.parkingSpot", "Parking Spot"),
44
- OTHER: D("calendar.other", "Other")
45
- }), [D]), K = (e, t) => {
46
- W((n) => ({
38
+ }), Y = l(() => ({
39
+ ROOM: j("calendar.room", "Room"),
40
+ EQUIPMENT: j("calendar.equipment", "Equipment"),
41
+ VEHICLE: j("calendar.vehicle", "Vehicle"),
42
+ DESK: j("calendar.desk", "Desk"),
43
+ PARKING_SPOT: j("calendar.parkingSpot", "Parking Spot"),
44
+ OTHER: j("calendar.other", "Other")
45
+ }), [j]), X = (e, t) => {
46
+ J((n) => ({
47
47
  ...n,
48
48
  [e]: t
49
49
  }));
50
50
  };
51
- return m || P && !N ? /* @__PURE__ */ x("div", {
51
+ return g || R && !L ? /* @__PURE__ */ S("div", {
52
52
  className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
53
- children: /* @__PURE__ */ x("p", {
53
+ children: /* @__PURE__ */ S("p", {
54
54
  className: "font-text-md text-text-secondary",
55
- children: D("calendar.loading", "Loading...")
55
+ children: j("calendar.loading", "Loading...")
56
56
  })
57
- }) : M ? /* @__PURE__ */ S("div", {
57
+ }) : I ? /* @__PURE__ */ C("div", {
58
58
  className: "@container min-h-screen bg-bg-canvas",
59
59
  children: [
60
- /* @__PURE__ */ x("header", {
60
+ /* @__PURE__ */ S("header", {
61
61
  className: "border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
62
- children: /* @__PURE__ */ S("div", {
62
+ children: /* @__PURE__ */ C("div", {
63
63
  className: "flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap",
64
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
64
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
65
65
  className: "font-heading-lg text-text-primary mb-stack-gap-sm",
66
- children: /* @__PURE__ */ x(w, { children: D("calendar.resources", "Resources") })
67
- }), /* @__PURE__ */ x("p", {
68
- className: "font-text-md text-text-secondary",
69
- children: D("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources")
70
- })] }), p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ S("button", {
66
+ children: /* @__PURE__ */ S(E, { children: j("calendar.resources", "Resources") })
67
+ }), /* @__PURE__ */ S(O, {
68
+ className: "max-w-2xl",
69
+ children: j("calendar.resourcesPagePurpose", "A shared inventory of bookable rooms, equipment, vehicles, and desks. Add a resource here, then attach it to an event so it is reserved for that time — capacity, location, and approval rules keep double-bookings out.")
70
+ })] }), p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
71
71
  type: "button",
72
- onClick: () => k(!0),
72
+ onClick: () => N(!0),
73
73
  className: "inline-flex items-center gap-inline-gap-sm 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",
74
- children: [/* @__PURE__ */ x(v, { className: "size-4" }), D("calendar.addResource", "Add Resource")]
74
+ children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addResource", "Add Resource")]
75
75
  }) : null]
76
76
  })
77
77
  }),
78
- /* @__PURE__ */ S("div", {
78
+ /* @__PURE__ */ C("div", {
79
79
  className: "p-page-padding",
80
80
  children: [
81
- P && L.length === 0 && /* @__PURE__ */ x("div", {
81
+ R && V.length === 0 && /* @__PURE__ */ S("div", {
82
82
  className: "text-center py-12",
83
- children: /* @__PURE__ */ x("p", {
83
+ children: /* @__PURE__ */ S("p", {
84
84
  className: "font-text-md text-text-secondary",
85
- children: D("calendar.loadingResources", "Loading resources...")
85
+ children: j("calendar.loadingResources", "Loading resources...")
86
86
  })
87
87
  }),
88
- F && /* @__PURE__ */ x("div", {
88
+ z && /* @__PURE__ */ S("div", {
89
89
  className: "text-center py-12",
90
- children: /* @__PURE__ */ S("p", {
90
+ children: /* @__PURE__ */ C("p", {
91
91
  className: "font-text-md text-red-600 dark:text-red-400",
92
92
  children: [
93
- D("calendar.failedToLoadResources", "Failed to load resources:"),
93
+ j("calendar.failedToLoadResources", "Failed to load resources:"),
94
94
  " ",
95
- F.message
95
+ z.message
96
96
  ]
97
97
  })
98
98
  }),
99
- !P && !F && L.length === 0 && /* @__PURE__ */ x(T, {
99
+ !R && !z && V.length === 0 && /* @__PURE__ */ S(D, {
100
100
  illustration: "empty-data",
101
- title: D("calendar.noResourcesYet", "No resources yet"),
102
- description: D("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources"),
103
- action: p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ S("button", {
101
+ title: j("calendar.noResourcesYet", "No resources yet"),
102
+ description: j("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources"),
103
+ action: p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
104
104
  type: "button",
105
- onClick: () => k(!0),
105
+ onClick: () => N(!0),
106
106
  className: "inline-flex min-h-11 items-center gap-inline-gap-sm 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
107
- children: [/* @__PURE__ */ x(v, { className: "size-4" }), D("calendar.addYourFirstResource", "Add your first resource")]
107
+ children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addYourFirstResource", "Add your first resource")]
108
108
  }) : void 0
109
109
  }),
110
- L.length > 0 && /* @__PURE__ */ x("div", {
110
+ V.length > 0 && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(w, {
111
+ className: "mb-section-gap flex flex-wrap items-center justify-between gap-stack-gap",
112
+ children: [/* @__PURE__ */ C("div", {
113
+ className: "flex items-start gap-3",
114
+ children: [/* @__PURE__ */ S(m, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
115
+ className: "font-text-sm font-weight-semibold text-text-primary mb-0.5",
116
+ children: j("calendar.bookableResources", "Bookable resources")
117
+ }), /* @__PURE__ */ S("p", {
118
+ className: "font-text-sm text-text-secondary",
119
+ children: j("calendar.resourcesSummary", "{count} resources ready to attach to your events. Open an event and add a resource to reserve it.").replace("{count}", String(V.length))
120
+ })] })]
121
+ }), p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
122
+ type: "button",
123
+ onClick: () => N(!0),
124
+ className: "inline-flex items-center gap-inline-gap-sm 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
125
+ children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addResource", "Add Resource")]
126
+ }) : null]
127
+ }), /* @__PURE__ */ S("div", {
111
128
  className: "grid gap-grid-gap",
112
129
  style: { gridTemplateColumns: "repeat(auto-fit, minmax(18rem, 1fr))" },
113
- children: L.map((e) => /* @__PURE__ */ x(C, {
130
+ children: V.map((e) => /* @__PURE__ */ S(T, {
114
131
  treatment: "metric",
115
132
  className: "@container p-card-padding",
116
- children: /* @__PURE__ */ S("div", {
133
+ children: /* @__PURE__ */ C("div", {
117
134
  className: "flex items-start gap-inline-gap",
118
- children: [/* @__PURE__ */ x("div", {
135
+ children: [/* @__PURE__ */ S("div", {
119
136
  className: "size-10 inline-flex items-center justify-center rounded-radius-md bg-bg-neutral text-text-secondary shrink-0",
120
- children: /* @__PURE__ */ x(E[e.resourceType] ?? _, { className: "size-5" })
121
- }), /* @__PURE__ */ S("div", {
137
+ children: /* @__PURE__ */ S(k[e.resourceType] ?? _, { className: "size-5" })
138
+ }), /* @__PURE__ */ C("div", {
122
139
  className: "min-w-0 flex-1",
123
140
  children: [
124
- /* @__PURE__ */ S("div", {
141
+ /* @__PURE__ */ C("div", {
125
142
  className: "flex items-start justify-between",
126
- children: [/* @__PURE__ */ x("h3", {
143
+ children: [/* @__PURE__ */ S("h3", {
127
144
  className: "font-heading-sm text-text-primary mb-1",
128
145
  children: e.name
129
- }), p(i.CALENDAR_RESOURCE_DELETE) && /* @__PURE__ */ x("button", {
146
+ }), p(i.CALENDAR_RESOURCE_DELETE) && /* @__PURE__ */ S("button", {
130
147
  type: "button",
131
- onClick: () => j({
148
+ onClick: () => F({
132
149
  id: e.id,
133
150
  name: e.name
134
151
  }),
135
152
  className: "size-6 inline-flex items-center justify-center rounded-radius-sm hover:bg-red-50 dark:hover:bg-red-950/20 text-text-tertiary hover:text-red-600 transition-colors shrink-0",
136
- "aria-label": `${D("calendar.deleteResource", "Delete Resource")} ${e.name}`,
137
- children: /* @__PURE__ */ x(b, { className: "size-3.5" })
153
+ "aria-label": `${j("calendar.deleteResource", "Delete Resource")} ${e.name}`,
154
+ children: /* @__PURE__ */ S(b, { className: "size-3.5" })
138
155
  })]
139
156
  }),
140
- e.description && /* @__PURE__ */ x("p", {
157
+ e.description && /* @__PURE__ */ S("p", {
141
158
  className: "font-text-sm text-text-secondary mb-2 line-clamp-2",
142
159
  children: e.description
143
160
  }),
144
- /* @__PURE__ */ S("div", {
161
+ /* @__PURE__ */ C("div", {
145
162
  className: "flex flex-wrap items-center gap-2",
146
163
  children: [
147
- /* @__PURE__ */ x("span", {
164
+ /* @__PURE__ */ S("span", {
148
165
  className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary",
149
- children: G[e.resourceType] ?? e.resourceType
166
+ children: Y[e.resourceType] ?? e.resourceType
150
167
  }),
151
- e.capacity && /* @__PURE__ */ S("span", {
168
+ e.capacity && /* @__PURE__ */ C("span", {
152
169
  className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
153
- children: [/* @__PURE__ */ x(y, { className: "size-3" }), e.capacity]
170
+ children: [/* @__PURE__ */ S(y, { className: "size-3" }), e.capacity]
154
171
  }),
155
- e.location && /* @__PURE__ */ S("span", {
172
+ e.location && /* @__PURE__ */ C("span", {
156
173
  className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
157
- children: [/* @__PURE__ */ x(h, { className: "size-3" }), e.location]
174
+ children: [/* @__PURE__ */ S(h, { className: "size-3" }), e.location]
158
175
  })
159
176
  ]
160
177
  }),
161
- /* @__PURE__ */ S("div", {
178
+ /* @__PURE__ */ C("div", {
162
179
  className: "mt-2 flex items-center gap-2",
163
- children: [/* @__PURE__ */ x("span", {
180
+ children: [/* @__PURE__ */ S("span", {
164
181
  className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.isActive ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
165
- children: e.isActive ? D("calendar.active", "Active") : D("calendar.inactive", "Inactive")
166
- }), e.requireApproval && /* @__PURE__ */ x("span", {
182
+ children: e.isActive ? j("calendar.active", "Active") : j("calendar.inactive", "Inactive")
183
+ }), e.requireApproval && /* @__PURE__ */ S("span", {
167
184
  className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300",
168
- children: D("calendar.requiresApproval", "Requires Approval")
185
+ children: j("calendar.requiresApproval", "Requires Approval")
169
186
  })]
170
187
  })
171
188
  ]
172
189
  })]
173
190
  })
174
191
  }, e.id))
175
- })
192
+ })] })
176
193
  ]
177
194
  }),
178
- O && /* @__PURE__ */ S("dialog", {
195
+ M && /* @__PURE__ */ C("dialog", {
179
196
  open: !0,
180
197
  className: "fixed inset-0 z-50 m-auto rounded-radius-lg border border-border-default bg-bg-surface shadow-lg backdrop:bg-black/50 max-w-lg w-full p-0",
181
198
  style: { position: "fixed" },
182
- children: [/* @__PURE__ */ x("button", {
199
+ children: [/* @__PURE__ */ S("button", {
183
200
  type: "button",
184
- "aria-label": D("calendar.closeDialog", "Close dialog"),
201
+ "aria-label": j("calendar.closeDialog", "Close dialog"),
185
202
  className: "fixed inset-0 bg-black/50",
186
- onClick: () => k(!1)
187
- }), /* @__PURE__ */ S("form", {
203
+ onClick: () => N(!1)
204
+ }), /* @__PURE__ */ C("form", {
188
205
  onSubmit: async (e) => {
189
- e.preventDefault(), U.name.trim() && (await R({ variables: { input: {
190
- name: U.name,
191
- description: U.description || void 0,
192
- resourceType: U.resourceType,
193
- capacity: U.capacity ? parseInt(U.capacity, 10) : void 0,
194
- location: U.location || void 0,
195
- building: U.building || void 0,
196
- floor: U.floor || void 0,
197
- room: U.room || void 0,
198
- requireApproval: U.requireApproval
199
- } } }), W({
206
+ e.preventDefault(), q.name.trim() && (await H({ variables: { input: {
207
+ name: q.name,
208
+ description: q.description || void 0,
209
+ resourceType: q.resourceType,
210
+ capacity: q.capacity ? parseInt(q.capacity, 10) : void 0,
211
+ location: q.location || void 0,
212
+ building: q.building || void 0,
213
+ floor: q.floor || void 0,
214
+ room: q.room || void 0,
215
+ requireApproval: q.requireApproval
216
+ } } }), J({
200
217
  name: "",
201
218
  description: "",
202
219
  resourceType: "ROOM",
@@ -206,193 +223,193 @@ function D() {
206
223
  floor: "",
207
224
  room: "",
208
225
  requireApproval: !1
209
- }), k(!1), I());
226
+ }), N(!1), B());
210
227
  },
211
228
  className: "relative z-10 bg-bg-surface rounded-radius-lg p-6 max-w-lg w-full mx-auto mt-20 border border-border-default shadow-lg",
212
229
  children: [
213
- /* @__PURE__ */ S("div", {
230
+ /* @__PURE__ */ C("div", {
214
231
  className: "flex items-center justify-between mb-6",
215
- children: [/* @__PURE__ */ x("h2", {
232
+ children: [/* @__PURE__ */ S("h2", {
216
233
  className: "font-heading-md text-text-primary",
217
- children: D("calendar.addResource", "Add Resource")
218
- }), /* @__PURE__ */ x("button", {
234
+ children: j("calendar.addResource", "Add Resource")
235
+ }), /* @__PURE__ */ S("button", {
219
236
  type: "button",
220
- onClick: () => k(!1),
237
+ onClick: () => N(!1),
221
238
  className: "size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary",
222
- children: /* @__PURE__ */ x(b, { className: "size-5" })
239
+ children: /* @__PURE__ */ S(b, { className: "size-5" })
223
240
  })]
224
241
  }),
225
- B && /* @__PURE__ */ x("div", {
242
+ W && /* @__PURE__ */ S("div", {
226
243
  className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
227
- children: /* @__PURE__ */ x("p", {
244
+ children: /* @__PURE__ */ S("p", {
228
245
  className: "font-text-sm text-red-700 dark:text-red-300",
229
- children: B.message
246
+ children: W.message
230
247
  })
231
248
  }),
232
- /* @__PURE__ */ S("div", {
249
+ /* @__PURE__ */ C("div", {
233
250
  className: "space-y-4",
234
251
  children: [
235
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
252
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
236
253
  htmlFor: "resource-name",
237
254
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
238
255
  children: [
239
- D("calendar.name", "Name"),
256
+ j("calendar.name", "Name"),
240
257
  " ",
241
- /* @__PURE__ */ x("span", {
258
+ /* @__PURE__ */ S("span", {
242
259
  className: "text-red-500",
243
260
  children: "*"
244
261
  })
245
262
  ]
246
- }), /* @__PURE__ */ x("input", {
263
+ }), /* @__PURE__ */ S("input", {
247
264
  id: "resource-name",
248
265
  type: "text",
249
266
  required: !0,
250
- value: U.name,
251
- onChange: (e) => K("name", e.target.value),
252
- placeholder: D("calendar.resourceNameExample", "e.g. Conference Room A"),
267
+ value: q.name,
268
+ onChange: (e) => X("name", e.target.value),
269
+ placeholder: j("calendar.resourceNameExample", "e.g. Conference Room A"),
253
270
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
254
- "aria-label": D("calendar.name", "Name")
271
+ "aria-label": j("calendar.name", "Name")
255
272
  })] }),
256
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
273
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
257
274
  htmlFor: "resource-type",
258
275
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
259
- children: D("calendar.type", "Type")
260
- }), /* @__PURE__ */ S("select", {
276
+ children: j("calendar.type", "Type")
277
+ }), /* @__PURE__ */ C("select", {
261
278
  id: "resource-type",
262
- value: U.resourceType,
263
- onChange: (e) => K("resourceType", e.target.value),
279
+ value: q.resourceType,
280
+ onChange: (e) => X("resourceType", e.target.value),
264
281
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
265
282
  children: [
266
- /* @__PURE__ */ x("option", {
283
+ /* @__PURE__ */ S("option", {
267
284
  value: "ROOM",
268
- children: D("calendar.room", "Room")
285
+ children: j("calendar.room", "Room")
269
286
  }),
270
- /* @__PURE__ */ x("option", {
287
+ /* @__PURE__ */ S("option", {
271
288
  value: "EQUIPMENT",
272
- children: D("calendar.equipment", "Equipment")
289
+ children: j("calendar.equipment", "Equipment")
273
290
  }),
274
- /* @__PURE__ */ x("option", {
291
+ /* @__PURE__ */ S("option", {
275
292
  value: "DESK",
276
- children: D("calendar.desk", "Desk")
293
+ children: j("calendar.desk", "Desk")
277
294
  }),
278
- /* @__PURE__ */ x("option", {
295
+ /* @__PURE__ */ S("option", {
279
296
  value: "VEHICLE",
280
- children: D("calendar.vehicle", "Vehicle")
297
+ children: j("calendar.vehicle", "Vehicle")
281
298
  }),
282
- /* @__PURE__ */ x("option", {
299
+ /* @__PURE__ */ S("option", {
283
300
  value: "PARKING_SPOT",
284
- children: D("calendar.parkingSpot", "Parking Spot")
301
+ children: j("calendar.parkingSpot", "Parking Spot")
285
302
  }),
286
- /* @__PURE__ */ x("option", {
303
+ /* @__PURE__ */ S("option", {
287
304
  value: "OTHER",
288
- children: D("calendar.other", "Other")
305
+ children: j("calendar.other", "Other")
289
306
  })
290
307
  ]
291
308
  })] }),
292
- /* @__PURE__ */ S("div", {
309
+ /* @__PURE__ */ C("div", {
293
310
  className: "grid grid-cols-2 gap-3",
294
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
311
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
295
312
  htmlFor: "resource-capacity",
296
313
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
297
- children: D("calendar.capacity", "Capacity")
298
- }), /* @__PURE__ */ x("input", {
314
+ children: j("calendar.capacity", "Capacity")
315
+ }), /* @__PURE__ */ S("input", {
299
316
  id: "resource-capacity",
300
317
  type: "number",
301
318
  min: "1",
302
- value: U.capacity,
303
- onChange: (e) => K("capacity", e.target.value),
304
- placeholder: D("calendar.resourceCapacityExample", "e.g. 12"),
319
+ value: q.capacity,
320
+ onChange: (e) => X("capacity", e.target.value),
321
+ placeholder: j("calendar.resourceCapacityExample", "e.g. 12"),
305
322
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
306
- "aria-label": D("calendar.capacity", "Capacity")
307
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
323
+ "aria-label": j("calendar.capacity", "Capacity")
324
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
308
325
  htmlFor: "resource-location",
309
326
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
310
- children: D("calendar.location", "Location")
311
- }), /* @__PURE__ */ x("input", {
327
+ children: j("calendar.location", "Location")
328
+ }), /* @__PURE__ */ S("input", {
312
329
  id: "resource-location",
313
330
  type: "text",
314
- value: U.location,
315
- onChange: (e) => K("location", e.target.value),
316
- placeholder: D("calendar.resourceLocationExample", "e.g. Building A"),
317
- "aria-label": D("calendar.location", "Location"),
331
+ value: q.location,
332
+ onChange: (e) => X("location", e.target.value),
333
+ placeholder: j("calendar.resourceLocationExample", "e.g. Building A"),
334
+ "aria-label": j("calendar.location", "Location"),
318
335
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
319
336
  })] })]
320
337
  }),
321
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
338
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
322
339
  htmlFor: "resource-description",
323
340
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
324
- children: D("calendar.description", "Description")
325
- }), /* @__PURE__ */ x("textarea", {
341
+ children: j("calendar.description", "Description")
342
+ }), /* @__PURE__ */ S("textarea", {
326
343
  id: "resource-description",
327
- value: U.description,
328
- onChange: (e) => K("description", e.target.value),
329
- placeholder: D("calendar.addDescription", "Add a description"),
344
+ value: q.description,
345
+ onChange: (e) => X("description", e.target.value),
346
+ placeholder: j("calendar.addDescription", "Add a description"),
330
347
  rows: 2,
331
- "aria-label": D("calendar.description", "Description"),
348
+ "aria-label": j("calendar.description", "Description"),
332
349
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none"
333
350
  })] }),
334
- /* @__PURE__ */ S("div", {
351
+ /* @__PURE__ */ C("div", {
335
352
  className: "flex items-center gap-3",
336
- children: [/* @__PURE__ */ x("input", {
353
+ children: [/* @__PURE__ */ S("input", {
337
354
  id: "resource-approval",
338
355
  type: "checkbox",
339
- checked: U.requireApproval,
340
- onChange: (e) => K("requireApproval", e.target.checked),
356
+ checked: q.requireApproval,
357
+ onChange: (e) => X("requireApproval", e.target.checked),
341
358
  className: "size-4 rounded border-border-default",
342
- "aria-label": D("calendar.requireApprovalForBookings", "Require approval for bookings")
343
- }), /* @__PURE__ */ x("label", {
359
+ "aria-label": j("calendar.requireApprovalForBookings", "Require approval for bookings")
360
+ }), /* @__PURE__ */ S("label", {
344
361
  htmlFor: "resource-approval",
345
362
  className: "font-text-sm text-text-primary",
346
- children: D("calendar.requireApprovalForBookings", "Require approval for bookings")
363
+ children: j("calendar.requireApprovalForBookings", "Require approval for bookings")
347
364
  })]
348
365
  })
349
366
  ]
350
367
  }),
351
- /* @__PURE__ */ S("div", {
368
+ /* @__PURE__ */ C("div", {
352
369
  className: "mt-6 flex justify-end gap-3",
353
- children: [/* @__PURE__ */ x("button", {
370
+ children: [/* @__PURE__ */ S("button", {
354
371
  type: "button",
355
- onClick: () => k(!1),
356
- disabled: z,
372
+ onClick: () => N(!1),
373
+ disabled: U,
357
374
  className: "px-4 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors disabled:opacity-50",
358
- children: D("calendar.cancel", "Cancel")
359
- }), /* @__PURE__ */ x("button", {
375
+ children: j("calendar.cancel", "Cancel")
376
+ }), /* @__PURE__ */ S("button", {
360
377
  type: "submit",
361
- disabled: z || !U.name.trim(),
378
+ disabled: U || !q.name.trim(),
362
379
  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 transition-colors disabled:opacity-50",
363
- children: z ? D("calendar.creating", "Creating...") : D("calendar.createResource", "Create Resource")
380
+ children: U ? j("calendar.creating", "Creating...") : j("calendar.createResource", "Create Resource")
364
381
  })]
365
382
  })
366
383
  ]
367
384
  })]
368
385
  }),
369
- /* @__PURE__ */ x(a, {
370
- open: !!A,
371
- title: D("calendar.deleteResource", "Delete Resource"),
372
- message: D("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", A?.name ?? ""),
373
- confirmLabel: D("calendar.delete", "Delete"),
386
+ /* @__PURE__ */ S(a, {
387
+ open: !!P,
388
+ title: j("calendar.deleteResource", "Delete Resource"),
389
+ message: j("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", P?.name ?? ""),
390
+ confirmLabel: j("calendar.delete", "Delete"),
374
391
  variant: "danger",
375
- loading: H,
392
+ loading: K,
376
393
  onConfirm: async () => {
377
- if (A && await o({
378
- title: D("calendar.deleteResource", "Delete Resource"),
379
- message: D("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", A.name),
380
- okButtonTitle: D("calendar.delete", "Delete")
394
+ if (P && await o({
395
+ title: j("calendar.deleteResource", "Delete Resource"),
396
+ message: j("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", P.name),
397
+ okButtonTitle: j("calendar.delete", "Delete")
381
398
  }) !== !1) try {
382
- await V({ variables: { id: A.id } }), s("success"), j(null), I();
399
+ await G({ variables: { id: P.id } }), s("success"), F(null), B();
383
400
  } catch (e) {
384
401
  throw s("error"), e;
385
402
  }
386
403
  },
387
- onCancel: () => j(null)
404
+ onCancel: () => F(null)
388
405
  })
389
406
  ]
390
- }) : /* @__PURE__ */ x(d, {
391
- title: D("calendar.accessDenied", "Access Denied"),
392
- description: D("calendar.noPermissionViewResources", "You don't have permission to view resources.")
407
+ }) : /* @__PURE__ */ S(d, {
408
+ title: j("calendar.accessDenied", "Access Denied"),
409
+ description: j("calendar.noPermissionViewResources", "You don't have permission to view resources.")
393
410
  });
394
411
  }
395
412
  //#endregion
396
- export { D as ResourcesPage };
413
+ export { A as ResourcesPage };
397
414
 
398
415
  //# sourceMappingURL=ResourcesPage.js.map