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