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