@burdenoff/microfe-support 2026.624.1 → 2026.624.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.
Files changed (31) hide show
  1. package/dist/support/components/NotificationToast.js +1 -1
  2. package/dist/support/components/NotificationToast.js.map +1 -1
  3. package/dist/support/components/PageLayout.js +2 -2
  4. package/dist/support/components/PageLayout.js.map +1 -1
  5. package/dist/support/components/analytics/CategoryBreakdown.js +1 -1
  6. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  7. package/dist/support/components/analytics/MetricCard.js +1 -1
  8. package/dist/support/components/analytics/MetricCard.js.map +1 -1
  9. package/dist/support/components/analytics/PriorityBreakdown.js +2 -2
  10. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  11. package/dist/support/components/analytics/SLAReport.js +2 -2
  12. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  13. package/dist/support/components/analytics/SatisfactionDistribution.js +3 -3
  14. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  15. package/dist/support/components/settings/CannedResponsesSettings.js +2 -2
  16. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  17. package/dist/support/components/settings/SLAPoliciesSettings.js +2 -2
  18. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  19. package/dist/support/components/settings/TicketCategoriesSettings.js +153 -152
  20. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  21. package/dist/support/pages/ArticleDetailAdminPage.js +167 -173
  22. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  23. package/dist/support/pages/ContactInquiryDetailPage.js +2 -2
  24. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  25. package/dist/support/pages/CreateArticlePage.js +1 -1
  26. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  27. package/dist/support/pages/EditArticlePage.js +1 -1
  28. package/dist/support/pages/EditArticlePage.js.map +1 -1
  29. package/dist/support/pages/JobApplicationDetailPage.js +3 -3
  30. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  31. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import { CATEGORY_COLOR_OPTIONS as e, getCategoryColorOption as t, getCategorySwatchClass as n } from "../../utils/categoryColors.js";
2
- import { useEffect as r, useRef as i, useState as a } from "react";
3
- import { AlertCircle as o, CheckCircle as s, Edit2 as c, FolderOpen as l, GripVertical as u, Loader2 as d, Plus as f, ToggleLeft as p, ToggleRight as m, Trash2 as h, X as g } from "lucide-react";
4
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
2
+ import { useEffect as r, useRef as ee, useState as i } from "react";
3
+ import { AlertCircle as a, CheckCircle as o, Edit2 as s, FolderOpen as c, GripVertical as l, Loader2 as u, Plus as d, ToggleLeft as f, ToggleRight as p, Trash2 as m } from "lucide-react";
4
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
5
+ import { AlertDialog as v, AlertDialogAction as y, AlertDialogCancel as b, AlertDialogContent as x, AlertDialogDescription as S, AlertDialogFooter as te, AlertDialogHeader as C, AlertDialogTitle as w, ResponsiveDialog as T, ResponsiveDialogContent as E, ResponsiveDialogHeader as D, ResponsiveDialogTitle as O } from "@burdenoff/fe-libs/ui";
5
6
  //#region src/support/components/settings/TicketCategoriesSettings.tsx
6
- var b = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, ""), x = {
7
+ var k = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, ""), A = {
7
8
  name: "",
8
9
  slug: "",
9
10
  description: "",
@@ -11,20 +12,20 @@ var b = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "
11
12
  icon: "",
12
13
  isActive: !0
13
14
  };
14
- function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
15
- let [E, D] = a(!1), [O, k] = a(null), [A, j] = a(x), [M, N] = a(!1), [P, F] = a(null), [I, L] = a(null), R = i(null);
15
+ function j({ categories: j, onCreate: M, onUpdate: N, onDelete: P }) {
16
+ let [F, I] = i(!1), [L, R] = i(null), [z, B] = i(A), [V, H] = i(!1), [U, W] = i(null), [G, K] = i(null), [q, J] = i(null), Y = ee(null);
16
17
  r(() => () => {
17
- R.current && clearTimeout(R.current);
18
+ Y.current && clearTimeout(Y.current);
18
19
  }, []);
19
- let z = (e, t) => {
20
- L({
20
+ let X = (e, t) => {
21
+ J({
21
22
  type: e,
22
23
  message: t
23
- }), R.current && clearTimeout(R.current), R.current = setTimeout(() => L(null), 3e3);
24
- }, B = () => {
25
- k(null), j(x), D(!0);
26
- }, V = (e) => {
27
- k(e), j({
24
+ }), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => J(null), 3e3);
25
+ }, Z = () => {
26
+ R(null), B(A), I(!0);
27
+ }, Q = (e) => {
28
+ R(e), B({
28
29
  name: e.name,
29
30
  slug: e.slug,
30
31
  description: e.description || "",
@@ -32,225 +33,215 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
32
33
  icon: e.icon || "",
33
34
  isActive: e.isActive ?? !0,
34
35
  parentId: e.parentId
35
- }), D(!0);
36
- }, H = () => {
37
- D(!1), k(null), j(x);
38
- }, U = (e) => {
39
- j({
40
- ...A,
36
+ }), I(!0);
37
+ }, $ = () => {
38
+ I(!1), R(null), B(A);
39
+ }, ne = (e) => {
40
+ B({
41
+ ...z,
41
42
  name: e,
42
- slug: O ? A.slug : b(e)
43
+ slug: L ? z.slug : k(e)
43
44
  });
44
- }, W = async (e) => {
45
- if (e.preventDefault(), !(!A.name.trim() || !A.slug.trim())) {
46
- N(!0);
45
+ }, re = async (e) => {
46
+ if (e.preventDefault(), !(!z.name.trim() || !z.slug.trim())) {
47
+ H(!0);
47
48
  try {
48
- O?.id ? (await w(O.id, A), z("success", "Category updated successfully!")) : (await C(A), z("success", "Category created successfully!")), H();
49
+ L?.id ? (await N(L.id, z), X("success", "Category updated successfully!")) : (await M(z), X("success", "Category created successfully!")), $();
49
50
  } catch {
50
- z("error", `Failed to ${O ? "update" : "create"} category.`);
51
+ X("error", `Failed to ${L ? "update" : "create"} category.`);
51
52
  } finally {
52
- N(!1);
53
+ H(!1);
53
54
  }
54
55
  }
55
- }, G = async (e, t) => {
56
+ }, ie = (e, t) => {
56
57
  if (t > 0) {
57
- z("error", `Cannot delete category with ${t} articles. Move articles first.`);
58
+ X("error", `Cannot delete category with ${t} articles. Move articles first.`);
58
59
  return;
59
60
  }
60
- if (confirm("Are you sure you want to delete this category?")) {
61
- F(e);
61
+ K(e);
62
+ }, ae = async () => {
63
+ let e = G;
64
+ if (e) {
65
+ K(null), W(e);
62
66
  try {
63
- await T(e), z("success", "Category deleted successfully!");
67
+ await P(e), X("success", "Category deleted successfully!");
64
68
  } catch {
65
- z("error", "Failed to delete category.");
69
+ X("error", "Failed to delete category.");
66
70
  } finally {
67
- F(null);
71
+ W(null);
68
72
  }
69
73
  }
70
- }, K = async (e) => {
74
+ }, oe = async (e) => {
71
75
  if (e.id) try {
72
- await w(e.id, { isActive: !e.isActive }), z("success", `Category ${e.isActive ? "deactivated" : "activated"} successfully!`);
76
+ await N(e.id, { isActive: !e.isActive }), X("success", `Category ${e.isActive ? "deactivated" : "activated"} successfully!`);
73
77
  } catch {
74
- z("error", "Failed to update category status.");
78
+ X("error", "Failed to update category status.");
75
79
  }
76
- }, q = [...S].sort((e, t) => (e.displayOrder ?? 0) - (t.displayOrder ?? 0));
77
- return /* @__PURE__ */ y("div", {
80
+ }, se = [...j].sort((e, t) => (e.displayOrder ?? 0) - (t.displayOrder ?? 0));
81
+ return /* @__PURE__ */ _("div", {
78
82
  className: "space-y-6",
79
83
  children: [
80
- I && /* @__PURE__ */ y("div", {
81
- className: `fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-300 ${I.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-subtle" : "bg-status-error-bg-subtle text-status-error-text border-border-subtle"}`,
82
- children: [I.type === "success" ? /* @__PURE__ */ v(s, {
84
+ q && /* @__PURE__ */ _("div", {
85
+ className: `fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${q.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-subtle" : "bg-status-error-bg-subtle text-status-error-text border-border-subtle"}`,
86
+ children: [q.type === "success" ? /* @__PURE__ */ g(o, {
83
87
  size: 20,
84
88
  className: "text-status-success-text"
85
- }) : /* @__PURE__ */ v(o, {
89
+ }) : /* @__PURE__ */ g(a, {
86
90
  size: 20,
87
91
  className: "text-status-error-text"
88
- }), /* @__PURE__ */ v("span", {
92
+ }), /* @__PURE__ */ g("span", {
89
93
  className: "font-medium",
90
- children: I.message
94
+ children: q.message
91
95
  })]
92
96
  }),
93
- E && /* @__PURE__ */ v("dialog", {
94
- open: !0,
95
- className: "fixed inset-0 z-50 flex items-center justify-center bg-overlay m-0 max-w-none max-h-none w-full h-full",
96
- "aria-modal": "true",
97
- "aria-labelledby": "ticket-category-modal-title",
98
- children: /* @__PURE__ */ y("div", {
99
- className: "bg-bg-surface rounded-xl p-6 w-full max-w-lg mx-4 shadow-2xl border max-h-[90vh] overflow-y-auto",
100
- children: [/* @__PURE__ */ y("div", {
101
- className: "flex items-center justify-between mb-6",
102
- children: [/* @__PURE__ */ v("h3", {
103
- id: "ticket-category-modal-title",
104
- className: "text-xl font-semibold text-text-primary",
105
- children: O ? "Edit Category" : "Create Category"
106
- }), /* @__PURE__ */ v("button", {
107
- type: "button",
108
- onClick: H,
109
- className: "min-h-11 min-w-11 p-2 rounded-lg hover:bg-bg-sunken text-text-secondary",
110
- "aria-label": "Close category dialog",
111
- children: /* @__PURE__ */ v(g, { size: 20 })
112
- })]
113
- }), /* @__PURE__ */ y("form", {
114
- onSubmit: W,
97
+ /* @__PURE__ */ g(T, {
98
+ open: F,
99
+ onOpenChange: (e) => {
100
+ e || $();
101
+ },
102
+ children: /* @__PURE__ */ _(E, {
103
+ className: "w-full max-w-lg max-h-[90vh] overflow-y-auto",
104
+ children: [/* @__PURE__ */ g(D, { children: /* @__PURE__ */ g(O, { children: L ? "Edit Category" : "Create Category" }) }), /* @__PURE__ */ _("form", {
105
+ onSubmit: re,
115
106
  className: "space-y-5",
116
107
  children: [
117
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
108
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
118
109
  htmlFor: "ticket-category-name",
119
110
  className: "block text-sm font-medium text-text-primary mb-2",
120
- children: ["Category Name ", /* @__PURE__ */ v("span", {
111
+ children: ["Category Name ", /* @__PURE__ */ g("span", {
121
112
  className: "text-status-error-text",
122
113
  children: "*"
123
114
  })]
124
- }), /* @__PURE__ */ v("input", {
115
+ }), /* @__PURE__ */ g("input", {
125
116
  id: "ticket-category-name",
126
117
  type: "text",
127
118
  "aria-label": "Category Name",
128
- value: A.name,
129
- onChange: (e) => U(e.target.value),
119
+ value: z.name,
120
+ onChange: (e) => ne(e.target.value),
130
121
  placeholder: "e.g., Technical Support",
131
122
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
132
123
  required: !0
133
124
  })] }),
134
- /* @__PURE__ */ y("div", { children: [
135
- /* @__PURE__ */ y("label", {
125
+ /* @__PURE__ */ _("div", { children: [
126
+ /* @__PURE__ */ _("label", {
136
127
  htmlFor: "ticket-category-slug",
137
128
  className: "block text-sm font-medium text-text-primary mb-2",
138
- children: ["Slug ", /* @__PURE__ */ v("span", {
129
+ children: ["Slug ", /* @__PURE__ */ g("span", {
139
130
  className: "text-status-error-text",
140
131
  children: "*"
141
132
  })]
142
133
  }),
143
- /* @__PURE__ */ v("input", {
134
+ /* @__PURE__ */ g("input", {
144
135
  id: "ticket-category-slug",
145
136
  type: "text",
146
137
  "aria-label": "Slug",
147
- value: A.slug,
148
- onChange: (e) => j({
149
- ...A,
138
+ value: z.slug,
139
+ onChange: (e) => B({
140
+ ...z,
150
141
  slug: e.target.value
151
142
  }),
152
143
  placeholder: "technical-support",
153
144
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
154
145
  required: !0
155
146
  }),
156
- /* @__PURE__ */ v("p", {
147
+ /* @__PURE__ */ g("p", {
157
148
  className: "text-xs text-text-secondary mt-1",
158
149
  children: "URL-friendly identifier (auto-generated from name)"
159
150
  })
160
151
  ] }),
161
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
152
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
162
153
  className: "block text-sm font-medium text-text-primary mb-2",
163
154
  htmlFor: "ticketcategoriessettings-description-0",
164
155
  children: "Description"
165
- }), /* @__PURE__ */ v("textarea", {
156
+ }), /* @__PURE__ */ g("textarea", {
166
157
  id: "ticketcategoriessettings-description-0",
167
158
  "aria-label": "Description",
168
- value: A.description,
169
- onChange: (e) => j({
170
- ...A,
159
+ value: z.description,
160
+ onChange: (e) => B({
161
+ ...z,
171
162
  description: e.target.value
172
163
  }),
173
164
  placeholder: "Brief description of this category...",
174
165
  rows: 3,
175
166
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
176
167
  })] }),
177
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
168
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("span", {
178
169
  id: "ticket-category-color-heading",
179
170
  className: "block text-sm font-medium text-text-primary mb-2",
180
171
  children: "Color"
181
- }), /* @__PURE__ */ y("div", {
172
+ }), /* @__PURE__ */ _("div", {
182
173
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
183
- children: [/* @__PURE__ */ v("div", {
174
+ children: [/* @__PURE__ */ g("div", {
184
175
  className: "flex flex-wrap gap-2",
185
- children: e.map((e) => /* @__PURE__ */ v("button", {
176
+ children: e.map((e) => /* @__PURE__ */ g("button", {
186
177
  type: "button",
187
- onClick: () => j({
188
- ...A,
178
+ onClick: () => B({
179
+ ...z,
189
180
  color: e.value
190
181
  }),
191
- className: `min-h-11 min-w-11 rounded-full border-2 transition-all ${e.swatchClass} ${A.color === e.value ? "border-foreground scale-110" : "border-transparent"}`,
182
+ className: `min-h-11 min-w-11 rounded-full border-2 transition-all ${e.swatchClass} ${z.color === e.value ? "border-foreground scale-110" : "border-transparent"}`,
192
183
  "aria-label": `Use ${e.label} category color`
193
184
  }, e.value))
194
- }), /* @__PURE__ */ v("select", {
185
+ }), /* @__PURE__ */ g("select", {
195
186
  "aria-labelledby": "ticket-category-color-heading",
196
- value: A.color,
197
- onChange: (e) => j({
198
- ...A,
187
+ value: z.color,
188
+ onChange: (e) => B({
189
+ ...z,
199
190
  color: e.target.value
200
191
  }),
201
192
  className: "min-h-11 rounded-lg border border-border-default bg-bg-surface px-3 text-sm text-text-primary",
202
- children: e.map((e) => /* @__PURE__ */ v("option", {
193
+ children: e.map((e) => /* @__PURE__ */ g("option", {
203
194
  value: e.value,
204
195
  children: e.label
205
196
  }, e.value))
206
197
  })]
207
198
  })] }),
208
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
199
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
209
200
  className: "block text-sm font-medium text-text-primary mb-2",
210
201
  htmlFor: "ticketcategoriessettings-icon-emoji-2",
211
202
  children: "Icon (emoji)"
212
- }), /* @__PURE__ */ v("input", {
203
+ }), /* @__PURE__ */ g("input", {
213
204
  id: "ticketcategoriessettings-icon-emoji-2",
214
205
  type: "text",
215
206
  "aria-label": "Icon (emoji)",
216
- value: A.icon,
217
- onChange: (e) => j({
218
- ...A,
207
+ value: z.icon,
208
+ onChange: (e) => B({
209
+ ...z,
219
210
  icon: e.target.value
220
211
  }),
221
212
  placeholder: "e.g., 🛠️",
222
213
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
223
214
  maxLength: 4
224
215
  })] }),
225
- /* @__PURE__ */ y("label", {
216
+ /* @__PURE__ */ _("label", {
226
217
  className: "flex items-center gap-3 cursor-pointer",
227
- children: [/* @__PURE__ */ v("input", {
218
+ children: [/* @__PURE__ */ g("input", {
228
219
  type: "checkbox",
229
220
  "aria-label": "Active",
230
- checked: A.isActive,
231
- onChange: (e) => j({
232
- ...A,
221
+ checked: z.isActive,
222
+ onChange: (e) => B({
223
+ ...z,
233
224
  isActive: e.target.checked
234
225
  }),
235
226
  className: "size-4 rounded border-border-default text-primary focus:ring-primary"
236
- }), /* @__PURE__ */ v("span", {
227
+ }), /* @__PURE__ */ g("span", {
237
228
  className: "text-sm text-text-primary",
238
229
  children: "Active"
239
230
  })]
240
231
  }),
241
- /* @__PURE__ */ y("div", {
232
+ /* @__PURE__ */ _("div", {
242
233
  className: "flex flex-col gap-3 pt-4 sm:flex-row",
243
- children: [/* @__PURE__ */ v("button", {
234
+ children: [/* @__PURE__ */ g("button", {
244
235
  type: "submit",
245
- disabled: M || !A.name.trim() || !A.slug.trim(),
236
+ disabled: V || !z.name.trim() || !z.slug.trim(),
246
237
  className: "min-h-11 flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
247
- children: M ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(d, {
238
+ children: V ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, {
248
239
  size: 18,
249
240
  className: "animate-spin"
250
- }), O ? "Updating..." : "Creating..."] }) : /* @__PURE__ */ v(_, { children: O ? "Update Category" : "Create Category" })
251
- }), /* @__PURE__ */ v("button", {
241
+ }), L ? "Updating..." : "Creating..."] }) : /* @__PURE__ */ g(h, { children: L ? "Update Category" : "Create Category" })
242
+ }), /* @__PURE__ */ g("button", {
252
243
  type: "button",
253
- onClick: H,
244
+ onClick: $,
254
245
  className: "min-h-11 px-4 py-2.5 rounded-lg border border-border-default hover:bg-bg-sunken transition-colors",
255
246
  children: "Cancel"
256
247
  })]
@@ -259,48 +250,48 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
259
250
  })]
260
251
  })
261
252
  }),
262
- /* @__PURE__ */ y("div", {
253
+ /* @__PURE__ */ _("div", {
263
254
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
264
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
255
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h2", {
265
256
  className: "text-xl font-semibold mb-2 text-text-primary",
266
257
  children: "Ticket Categories"
267
- }), /* @__PURE__ */ v("p", {
258
+ }), /* @__PURE__ */ g("p", {
268
259
  className: "text-sm text-text-secondary",
269
260
  children: "Organize tickets and knowledge base articles by category"
270
- })] }), /* @__PURE__ */ y("button", {
261
+ })] }), /* @__PURE__ */ _("button", {
271
262
  type: "button",
272
- onClick: B,
263
+ onClick: Z,
273
264
  className: "min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg transition-colors bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90",
274
- children: [/* @__PURE__ */ v(f, { size: 20 }), "New Category"]
265
+ children: [/* @__PURE__ */ g(d, { size: 20 }), "New Category"]
275
266
  })]
276
267
  }),
277
- /* @__PURE__ */ y("div", {
268
+ /* @__PURE__ */ _("div", {
278
269
  className: "space-y-2",
279
- children: [q.map((e) => /* @__PURE__ */ y("div", {
270
+ children: [se.map((e) => /* @__PURE__ */ _("div", {
280
271
  className: `p-4 rounded-lg border bg-bg-surface flex flex-col gap-4 sm:flex-row sm:items-center ${e.isActive === !1 ? "border-border-subtle/50 opacity-60" : "border-border-subtle"}`,
281
272
  children: [
282
- /* @__PURE__ */ v("div", {
273
+ /* @__PURE__ */ g("div", {
283
274
  className: "text-text-secondary cursor-grab",
284
- children: /* @__PURE__ */ v(u, { size: 20 })
275
+ children: /* @__PURE__ */ g(l, { size: 20 })
285
276
  }),
286
- /* @__PURE__ */ v("div", {
277
+ /* @__PURE__ */ g("div", {
287
278
  className: `size-10 rounded-lg flex items-center justify-center text-on-accent text-xl flex-shrink-0 ${n(e.color)}`,
288
- children: e.icon || /* @__PURE__ */ v(l, { size: 20 })
279
+ children: e.icon || /* @__PURE__ */ g(c, { size: 20 })
289
280
  }),
290
- /* @__PURE__ */ y("div", {
281
+ /* @__PURE__ */ _("div", {
291
282
  className: "flex-1 min-w-0",
292
283
  children: [
293
- /* @__PURE__ */ y("div", {
284
+ /* @__PURE__ */ _("div", {
294
285
  className: "flex items-center gap-2",
295
- children: [/* @__PURE__ */ v("h3", {
286
+ children: [/* @__PURE__ */ g("h3", {
296
287
  className: "font-semibold text-text-primary",
297
288
  children: e.name
298
- }), e.isActive === !1 && /* @__PURE__ */ v("span", {
289
+ }), e.isActive === !1 && /* @__PURE__ */ g("span", {
299
290
  className: "text-xs px-2 py-0.5 rounded bg-bg-sunken text-text-secondary",
300
291
  children: "Inactive"
301
292
  })]
302
293
  }),
303
- /* @__PURE__ */ y("p", {
294
+ /* @__PURE__ */ _("p", {
304
295
  className: "text-sm text-text-secondary",
305
296
  children: [
306
297
  "/",
@@ -310,73 +301,83 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
310
301
  " articles"
311
302
  ]
312
303
  }),
313
- e.description && /* @__PURE__ */ v("p", {
304
+ e.description && /* @__PURE__ */ g("p", {
314
305
  className: "text-xs text-text-secondary mt-1 line-clamp-1",
315
306
  children: e.description
316
307
  })
317
308
  ]
318
309
  }),
319
- /* @__PURE__ */ y("div", {
310
+ /* @__PURE__ */ _("div", {
320
311
  className: "flex w-full items-center justify-end gap-1 sm:w-auto",
321
312
  children: [
322
- /* @__PURE__ */ v("button", {
313
+ /* @__PURE__ */ g("button", {
323
314
  type: "button",
324
- onClick: () => K(e),
315
+ onClick: () => oe(e),
325
316
  className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors",
326
317
  title: e.isActive ? "Deactivate" : "Activate",
327
318
  "aria-label": e.isActive ? "Deactivate category" : "Activate category",
328
- children: e.isActive ? /* @__PURE__ */ v(m, {
319
+ children: e.isActive ? /* @__PURE__ */ g(p, {
329
320
  size: 20,
330
321
  className: "text-status-success-text"
331
- }) : /* @__PURE__ */ v(p, { size: 20 })
322
+ }) : /* @__PURE__ */ g(f, { size: 20 })
332
323
  }),
333
- /* @__PURE__ */ v("button", {
324
+ /* @__PURE__ */ g("button", {
334
325
  type: "button",
335
- onClick: () => V(e),
326
+ onClick: () => Q(e),
336
327
  className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors",
337
328
  title: "Edit category",
338
329
  "aria-label": "Edit category",
339
- children: /* @__PURE__ */ v(c, { size: 18 })
330
+ children: /* @__PURE__ */ g(s, { size: 18 })
340
331
  }),
341
- /* @__PURE__ */ v("button", {
332
+ /* @__PURE__ */ g("button", {
342
333
  type: "button",
343
- onClick: () => e.id && G(e.id, e.articleCount ?? 0),
344
- disabled: P === e.id,
334
+ onClick: () => e.id && ie(e.id, e.articleCount ?? 0),
335
+ disabled: U === e.id,
345
336
  className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-status-error-text transition-colors disabled:opacity-50",
346
337
  title: "Delete category",
347
338
  "aria-label": "Delete category",
348
- children: P === e.id ? /* @__PURE__ */ v(d, {
339
+ children: U === e.id ? /* @__PURE__ */ g(u, {
349
340
  size: 18,
350
341
  className: "animate-spin"
351
- }) : /* @__PURE__ */ v(h, { size: 18 })
342
+ }) : /* @__PURE__ */ g(m, { size: 18 })
352
343
  })
353
344
  ]
354
345
  })
355
346
  ]
356
- }, e.id)), S.length === 0 && /* @__PURE__ */ y("div", {
347
+ }, e.id)), j.length === 0 && /* @__PURE__ */ _("div", {
357
348
  className: "text-center py-12 border border-dashed border-border-subtle rounded-lg",
358
349
  children: [
359
- /* @__PURE__ */ v(l, {
350
+ /* @__PURE__ */ g(c, {
360
351
  size: 48,
361
352
  className: "text-text-secondary mx-auto"
362
353
  }),
363
- /* @__PURE__ */ v("p", {
354
+ /* @__PURE__ */ g("p", {
364
355
  className: "mt-4 text-text-secondary",
365
356
  children: "No categories configured"
366
357
  }),
367
- /* @__PURE__ */ v("button", {
358
+ /* @__PURE__ */ g("button", {
368
359
  type: "button",
369
- onClick: B,
360
+ onClick: Z,
370
361
  className: "mt-4 text-primary hover:underline",
371
362
  children: "Create your first category"
372
363
  })
373
364
  ]
374
365
  })]
366
+ }),
367
+ /* @__PURE__ */ g(v, {
368
+ open: G !== null,
369
+ onOpenChange: (e) => {
370
+ e || K(null);
371
+ },
372
+ children: /* @__PURE__ */ _(x, { children: [/* @__PURE__ */ _(C, { children: [/* @__PURE__ */ g(w, { children: "Delete category?" }), /* @__PURE__ */ g(S, { children: "Are you sure you want to delete this category? This action cannot be undone." })] }), /* @__PURE__ */ _(te, { children: [/* @__PURE__ */ g(b, { children: "Cancel" }), /* @__PURE__ */ g(y, {
373
+ onClick: ae,
374
+ children: "Delete"
375
+ })] })] })
375
376
  })
376
377
  ]
377
378
  });
378
379
  }
379
380
  //#endregion
380
- export { S as TicketCategoriesSettings };
381
+ export { j as TicketCategoriesSettings };
381
382
 
382
383
  //# sourceMappingURL=TicketCategoriesSettings.js.map