@burdenoff/microfe-support 2026.608.1 → 2026.624.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.
Files changed (69) hide show
  1. package/dist/support/components/PageLayout.js +8 -8
  2. package/dist/support/components/PageLayout.js.map +1 -1
  3. package/dist/support/components/analytics/CategoryBreakdown.js +2 -2
  4. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  5. package/dist/support/components/analytics/PriorityBreakdown.js +1 -1
  6. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  7. package/dist/support/components/analytics/SLAReport.js +5 -5
  8. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  9. package/dist/support/components/analytics/SatisfactionDistribution.js +6 -6
  10. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  11. package/dist/support/components/analytics/TopAgents.js +3 -3
  12. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  13. package/dist/support/components/analytics/TrendChart.js +2 -2
  14. package/dist/support/components/analytics/TrendChart.js.map +1 -1
  15. package/dist/support/components/kb/ArticleForm.js +23 -23
  16. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  17. package/dist/support/components/settings/CannedResponsesSettings.js +10 -10
  18. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  19. package/dist/support/components/settings/SLAPoliciesSettings.js +10 -10
  20. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  21. package/dist/support/components/settings/TicketCategoriesSettings.js +37 -37
  22. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  23. package/dist/support/components/tickets/AttachmentList.js +4 -4
  24. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  25. package/dist/support/components/tickets/MessageComposer.js +12 -12
  26. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  27. package/dist/support/components/tickets/MessageThread.js +6 -6
  28. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  29. package/dist/support/components/tickets/TicketDetailHeader.js +4 -4
  30. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  31. package/dist/support/components/tickets/TicketHeader.js +6 -6
  32. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  33. package/dist/support/components/tickets/TicketSidebar.js +44 -44
  34. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  35. package/dist/support/pages/AnalyticsPage.js +2 -2
  36. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  37. package/dist/support/pages/ArticleDetailAdminPage.js +11 -11
  38. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  39. package/dist/support/pages/ArticleDetailUserPage.js +7 -7
  40. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  41. package/dist/support/pages/ContactInquiriesPage.js +5 -5
  42. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  43. package/dist/support/pages/ContactInquiryDetailPage.js +2 -2
  44. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  45. package/dist/support/pages/CreateArticlePage.js +4 -4
  46. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  47. package/dist/support/pages/CreateTicketPage.js +18 -18
  48. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  49. package/dist/support/pages/EditArticlePage.js +5 -5
  50. package/dist/support/pages/EditArticlePage.js.map +1 -1
  51. package/dist/support/pages/JobApplicationsPage.js +5 -5
  52. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  53. package/dist/support/pages/KnowledgeBaseAdminPage.js +16 -16
  54. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  55. package/dist/support/pages/KnowledgeBaseUserPage.js +15 -15
  56. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  57. package/dist/support/pages/SettingsPage.js +3 -3
  58. package/dist/support/pages/SettingsPage.js.map +1 -1
  59. package/dist/support/pages/TicketDetailAdminPage.js +8 -8
  60. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  61. package/dist/support/pages/TicketDetailUserPage.js +17 -17
  62. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  63. package/dist/support/pages/TicketListPage.js +18 -18
  64. package/dist/support/pages/TicketListPage.js.map +1 -1
  65. package/dist/support/utils/categoryColors.js +1 -1
  66. package/dist/support/utils/categoryColors.js.map +1 -1
  67. package/dist/support/utils/uiTokens.js +1 -1
  68. package/dist/support/utils/uiTokens.js.map +1 -1
  69. package/package.json +1 -1
@@ -84,7 +84,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
84
84
  className: "text-status-success-text"
85
85
  }) : /* @__PURE__ */ v(o, {
86
86
  size: 20,
87
- className: "text-destructive"
87
+ className: "text-status-error-text"
88
88
  }), /* @__PURE__ */ v("span", {
89
89
  className: "font-medium",
90
90
  children: I.message
@@ -96,17 +96,17 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
96
96
  "aria-modal": "true",
97
97
  "aria-labelledby": "ticket-category-modal-title",
98
98
  children: /* @__PURE__ */ y("div", {
99
- className: "bg-background rounded-xl p-6 w-full max-w-lg mx-4 shadow-2xl border max-h-[90vh] overflow-y-auto",
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
100
  children: [/* @__PURE__ */ y("div", {
101
101
  className: "flex items-center justify-between mb-6",
102
102
  children: [/* @__PURE__ */ v("h3", {
103
103
  id: "ticket-category-modal-title",
104
- className: "text-xl font-semibold text-foreground",
104
+ className: "text-xl font-semibold text-text-primary",
105
105
  children: O ? "Edit Category" : "Create Category"
106
106
  }), /* @__PURE__ */ v("button", {
107
107
  type: "button",
108
108
  onClick: H,
109
- className: "min-h-11 min-w-11 p-2 rounded-lg hover:bg-muted text-muted-foreground",
109
+ className: "min-h-11 min-w-11 p-2 rounded-lg hover:bg-bg-sunken text-text-secondary",
110
110
  "aria-label": "Close category dialog",
111
111
  children: /* @__PURE__ */ v(g, { size: 20 })
112
112
  })]
@@ -116,9 +116,9 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
116
116
  children: [
117
117
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
118
118
  htmlFor: "ticket-category-name",
119
- className: "block text-sm font-medium text-foreground mb-2",
119
+ className: "block text-sm font-medium text-text-primary mb-2",
120
120
  children: ["Category Name ", /* @__PURE__ */ v("span", {
121
- className: "text-destructive",
121
+ className: "text-status-error-text",
122
122
  children: "*"
123
123
  })]
124
124
  }), /* @__PURE__ */ v("input", {
@@ -128,15 +128,15 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
128
128
  value: A.name,
129
129
  onChange: (e) => U(e.target.value),
130
130
  placeholder: "e.g., Technical Support",
131
- className: "w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
131
+ 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
132
  required: !0
133
133
  })] }),
134
134
  /* @__PURE__ */ y("div", { children: [
135
135
  /* @__PURE__ */ y("label", {
136
136
  htmlFor: "ticket-category-slug",
137
- className: "block text-sm font-medium text-foreground mb-2",
137
+ className: "block text-sm font-medium text-text-primary mb-2",
138
138
  children: ["Slug ", /* @__PURE__ */ v("span", {
139
- className: "text-destructive",
139
+ className: "text-status-error-text",
140
140
  children: "*"
141
141
  })]
142
142
  }),
@@ -150,16 +150,16 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
150
150
  slug: e.target.value
151
151
  }),
152
152
  placeholder: "technical-support",
153
- className: "w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
153
+ 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
154
  required: !0
155
155
  }),
156
156
  /* @__PURE__ */ v("p", {
157
- className: "text-xs text-muted-foreground mt-1",
157
+ className: "text-xs text-text-secondary mt-1",
158
158
  children: "URL-friendly identifier (auto-generated from name)"
159
159
  })
160
160
  ] }),
161
161
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
162
- className: "block text-sm font-medium text-foreground mb-2",
162
+ className: "block text-sm font-medium text-text-primary mb-2",
163
163
  htmlFor: "ticketcategoriessettings-description-0",
164
164
  children: "Description"
165
165
  }), /* @__PURE__ */ v("textarea", {
@@ -172,11 +172,11 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
172
172
  }),
173
173
  placeholder: "Brief description of this category...",
174
174
  rows: 3,
175
- className: "w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
175
+ 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
176
  })] }),
177
177
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
178
178
  id: "ticket-category-color-heading",
179
- className: "block text-sm font-medium text-foreground mb-2",
179
+ className: "block text-sm font-medium text-text-primary mb-2",
180
180
  children: "Color"
181
181
  }), /* @__PURE__ */ y("div", {
182
182
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
@@ -188,7 +188,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
188
188
  ...A,
189
189
  color: e.value
190
190
  }),
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 hover:scale-105"}`,
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"}`,
192
192
  "aria-label": `Use ${e.label} category color`
193
193
  }, e.value))
194
194
  }), /* @__PURE__ */ v("select", {
@@ -198,7 +198,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
198
198
  ...A,
199
199
  color: e.target.value
200
200
  }),
201
- className: "min-h-11 rounded-lg border border-input bg-background px-3 text-sm text-foreground",
201
+ className: "min-h-11 rounded-lg border border-border-default bg-bg-surface px-3 text-sm text-text-primary",
202
202
  children: e.map((e) => /* @__PURE__ */ v("option", {
203
203
  value: e.value,
204
204
  children: e.label
@@ -206,7 +206,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
206
206
  })]
207
207
  })] }),
208
208
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
209
- className: "block text-sm font-medium text-foreground mb-2",
209
+ className: "block text-sm font-medium text-text-primary mb-2",
210
210
  htmlFor: "ticketcategoriessettings-icon-emoji-2",
211
211
  children: "Icon (emoji)"
212
212
  }), /* @__PURE__ */ v("input", {
@@ -219,7 +219,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
219
219
  icon: e.target.value
220
220
  }),
221
221
  placeholder: "e.g., 🛠️",
222
- className: "w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
222
+ 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
223
  maxLength: 4
224
224
  })] }),
225
225
  /* @__PURE__ */ y("label", {
@@ -232,9 +232,9 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
232
232
  ...A,
233
233
  isActive: e.target.checked
234
234
  }),
235
- className: "size-4 rounded border-input text-primary focus:ring-primary"
235
+ className: "size-4 rounded border-border-default text-primary focus:ring-primary"
236
236
  }), /* @__PURE__ */ v("span", {
237
- className: "text-sm text-foreground",
237
+ className: "text-sm text-text-primary",
238
238
  children: "Active"
239
239
  })]
240
240
  }),
@@ -243,7 +243,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
243
243
  children: [/* @__PURE__ */ v("button", {
244
244
  type: "submit",
245
245
  disabled: M || !A.name.trim() || !A.slug.trim(),
246
- className: "min-h-11 flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
246
+ 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
247
  children: M ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(d, {
248
248
  size: 18,
249
249
  className: "animate-spin"
@@ -251,7 +251,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
251
251
  }), /* @__PURE__ */ v("button", {
252
252
  type: "button",
253
253
  onClick: H,
254
- className: "min-h-11 px-4 py-2.5 rounded-lg border border-input hover:bg-muted transition-colors",
254
+ className: "min-h-11 px-4 py-2.5 rounded-lg border border-border-default hover:bg-bg-sunken transition-colors",
255
255
  children: "Cancel"
256
256
  })]
257
257
  })
@@ -262,25 +262,25 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
262
262
  /* @__PURE__ */ y("div", {
263
263
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
264
264
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
265
- className: "text-xl font-semibold mb-2 text-foreground",
265
+ className: "text-xl font-semibold mb-2 text-text-primary",
266
266
  children: "Ticket Categories"
267
267
  }), /* @__PURE__ */ v("p", {
268
- className: "text-sm text-muted-foreground",
268
+ className: "text-sm text-text-secondary",
269
269
  children: "Organize tickets and knowledge base articles by category"
270
270
  })] }), /* @__PURE__ */ y("button", {
271
271
  type: "button",
272
272
  onClick: B,
273
- className: "min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg transition-colors bg-primary text-primary-foreground hover:bg-primary/90",
273
+ 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
274
  children: [/* @__PURE__ */ v(f, { size: 20 }), "New Category"]
275
275
  })]
276
276
  }),
277
277
  /* @__PURE__ */ y("div", {
278
278
  className: "space-y-2",
279
279
  children: [q.map((e) => /* @__PURE__ */ y("div", {
280
- className: `p-4 rounded-lg border bg-background flex flex-col gap-4 sm:flex-row sm:items-center ${e.isActive === !1 ? "border-border/50 opacity-60" : "border-border"}`,
280
+ 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
281
  children: [
282
282
  /* @__PURE__ */ v("div", {
283
- className: "text-muted-foreground cursor-grab",
283
+ className: "text-text-secondary cursor-grab",
284
284
  children: /* @__PURE__ */ v(u, { size: 20 })
285
285
  }),
286
286
  /* @__PURE__ */ v("div", {
@@ -293,15 +293,15 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
293
293
  /* @__PURE__ */ y("div", {
294
294
  className: "flex items-center gap-2",
295
295
  children: [/* @__PURE__ */ v("h3", {
296
- className: "font-semibold text-foreground",
296
+ className: "font-semibold text-text-primary",
297
297
  children: e.name
298
298
  }), e.isActive === !1 && /* @__PURE__ */ v("span", {
299
- className: "text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",
299
+ className: "text-xs px-2 py-0.5 rounded bg-bg-sunken text-text-secondary",
300
300
  children: "Inactive"
301
301
  })]
302
302
  }),
303
303
  /* @__PURE__ */ y("p", {
304
- className: "text-sm text-muted-foreground",
304
+ className: "text-sm text-text-secondary",
305
305
  children: [
306
306
  "/",
307
307
  e.slug,
@@ -311,7 +311,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
311
311
  ]
312
312
  }),
313
313
  e.description && /* @__PURE__ */ v("p", {
314
- className: "text-xs text-muted-foreground mt-1 line-clamp-1",
314
+ className: "text-xs text-text-secondary mt-1 line-clamp-1",
315
315
  children: e.description
316
316
  })
317
317
  ]
@@ -322,7 +322,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
322
322
  /* @__PURE__ */ v("button", {
323
323
  type: "button",
324
324
  onClick: () => K(e),
325
- className: "min-h-11 min-w-11 p-2 rounded hover:bg-muted text-muted-foreground transition-colors",
325
+ className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors",
326
326
  title: e.isActive ? "Deactivate" : "Activate",
327
327
  "aria-label": e.isActive ? "Deactivate category" : "Activate category",
328
328
  children: e.isActive ? /* @__PURE__ */ v(m, {
@@ -333,7 +333,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
333
333
  /* @__PURE__ */ v("button", {
334
334
  type: "button",
335
335
  onClick: () => V(e),
336
- className: "min-h-11 min-w-11 p-2 rounded hover:bg-muted text-muted-foreground transition-colors",
336
+ className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors",
337
337
  title: "Edit category",
338
338
  "aria-label": "Edit category",
339
339
  children: /* @__PURE__ */ v(c, { size: 18 })
@@ -342,7 +342,7 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
342
342
  type: "button",
343
343
  onClick: () => e.id && G(e.id, e.articleCount ?? 0),
344
344
  disabled: P === e.id,
345
- className: "min-h-11 min-w-11 p-2 rounded hover:bg-muted text-status-error-text transition-colors disabled:opacity-50",
345
+ className: "min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-status-error-text transition-colors disabled:opacity-50",
346
346
  title: "Delete category",
347
347
  "aria-label": "Delete category",
348
348
  children: P === e.id ? /* @__PURE__ */ v(d, {
@@ -354,14 +354,14 @@ function S({ categories: S, onCreate: C, onUpdate: w, onDelete: T }) {
354
354
  })
355
355
  ]
356
356
  }, e.id)), S.length === 0 && /* @__PURE__ */ y("div", {
357
- className: "text-center py-12 border border-dashed border-border rounded-lg",
357
+ className: "text-center py-12 border border-dashed border-border-subtle rounded-lg",
358
358
  children: [
359
359
  /* @__PURE__ */ v(l, {
360
360
  size: 48,
361
- className: "text-muted-foreground mx-auto"
361
+ className: "text-text-secondary mx-auto"
362
362
  }),
363
363
  /* @__PURE__ */ v("p", {
364
- className: "mt-4 text-muted-foreground",
364
+ className: "mt-4 text-text-secondary",
365
365
  children: "No categories configured"
366
366
  }),
367
367
  /* @__PURE__ */ v("button", {
@@ -1 +1 @@
1
- {"version":3,"file":"TicketCategoriesSettings.js","names":[],"sources":["../../../../src/support/components/settings/TicketCategoriesSettings.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport {\n FolderOpen,\n Plus,\n Edit2,\n Trash2,\n X,\n Loader2,\n AlertCircle,\n CheckCircle,\n ToggleLeft,\n ToggleRight,\n GripVertical,\n} from 'lucide-react';\nimport {\n CATEGORY_COLOR_OPTIONS,\n getCategoryColorOption,\n getCategorySwatchClass,\n} from '../../utils/categoryColors';\n\ninterface TicketCategory {\n id?: string;\n name: string;\n slug: string;\n description?: string;\n color?: string;\n icon?: string;\n displayOrder?: number;\n isActive?: boolean;\n articleCount?: number;\n parentId?: string;\n}\n\ninterface TicketCategoriesSettingsProps {\n categories: TicketCategory[];\n onCreate: (\n input: Omit<TicketCategory, 'id' | 'articleCount'>\n ) => Promise<TicketCategory | null | undefined>;\n onUpdate: (\n id: string,\n input: Partial<TicketCategory>\n ) => Promise<TicketCategory | null | undefined>;\n onDelete: (id: string) => Promise<boolean | null | undefined>;\n}\n\nconst generateSlug = (name: string): string => {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/(^-|-$)/g, '');\n};\n\nconst initialFormData: Omit<TicketCategory, 'id' | 'articleCount'> = {\n name: '',\n slug: '',\n description: '',\n color: CATEGORY_COLOR_OPTIONS[0].value,\n icon: '',\n isActive: true,\n};\n\nexport function TicketCategoriesSettings({\n categories,\n onCreate,\n onUpdate,\n onDelete,\n}: TicketCategoriesSettingsProps) {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [editingCategory, setEditingCategory] = useState<TicketCategory | null>(null);\n const [formData, setFormData] =\n useState<Omit<TicketCategory, 'id' | 'articleCount'>>(initialFormData);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [isDeleting, setIsDeleting] = useState<string | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const notificationTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n };\n }, []);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n notificationTimerRef.current = setTimeout(() => setNotification(null), 3000);\n };\n\n const openCreateModal = () => {\n setEditingCategory(null);\n setFormData(initialFormData);\n setIsModalOpen(true);\n };\n\n const openEditModal = (category: TicketCategory) => {\n setEditingCategory(category);\n setFormData({\n name: category.name,\n slug: category.slug,\n description: category.description || '',\n color: getCategoryColorOption(category.color).value,\n icon: category.icon || '',\n isActive: category.isActive ?? true,\n parentId: category.parentId,\n });\n setIsModalOpen(true);\n };\n\n const closeModal = () => {\n setIsModalOpen(false);\n setEditingCategory(null);\n setFormData(initialFormData);\n };\n\n const handleNameChange = (name: string) => {\n setFormData({\n ...formData,\n name,\n slug: editingCategory ? formData.slug : generateSlug(name),\n });\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!formData.name.trim() || !formData.slug.trim()) return;\n\n setIsSubmitting(true);\n try {\n if (editingCategory?.id) {\n await onUpdate(editingCategory.id, formData);\n showNotification('success', 'Category updated successfully!');\n } else {\n await onCreate(formData);\n showNotification('success', 'Category created successfully!');\n }\n closeModal();\n } catch {\n showNotification('error', `Failed to ${editingCategory ? 'update' : 'create'} category.`);\n } finally {\n setIsSubmitting(false);\n }\n };\n\n const handleDelete = async (id: string, articleCount: number) => {\n if (articleCount > 0) {\n showNotification(\n 'error',\n `Cannot delete category with ${articleCount} articles. Move articles first.`\n );\n return;\n }\n if (!confirm('Are you sure you want to delete this category?')) return;\n\n setIsDeleting(id);\n try {\n await onDelete(id);\n showNotification('success', 'Category deleted successfully!');\n } catch {\n showNotification('error', 'Failed to delete category.');\n } finally {\n setIsDeleting(null);\n }\n };\n\n const handleToggleActive = async (category: TicketCategory) => {\n if (!category.id) return;\n try {\n await onUpdate(category.id, { isActive: !category.isActive });\n showNotification(\n 'success',\n `Category ${category.isActive ? 'deactivated' : 'activated'} successfully!`\n );\n } catch {\n showNotification('error', 'Failed to update category status.');\n }\n };\n\n // Sort categories by displayOrder\n const sortedCategories = [...categories].sort(\n (a, b) => (a.displayOrder ?? 0) - (b.displayOrder ?? 0)\n );\n\n return (\n <div className=\"space-y-6\">\n {/* Notification */}\n {notification && (\n <div\n 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 ${\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-subtle'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-subtle'\n }`}\n >\n {notification.type === 'success' ? (\n <CheckCircle size={20} className=\"text-status-success-text\" />\n ) : (\n <AlertCircle size={20} className=\"text-destructive\" />\n )}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {/* Modal */}\n {isModalOpen && (\n <dialog\n open\n 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\"\n aria-modal=\"true\"\n aria-labelledby=\"ticket-category-modal-title\"\n >\n <div className=\"bg-background rounded-xl p-6 w-full max-w-lg mx-4 shadow-2xl border max-h-[90vh] overflow-y-auto\">\n <div className=\"flex items-center justify-between mb-6\">\n <h3\n id=\"ticket-category-modal-title\"\n className=\"text-xl font-semibold text-foreground\"\n >\n {editingCategory ? 'Edit Category' : 'Create Category'}\n </h3>\n <button\n type=\"button\"\n onClick={closeModal}\n className=\"min-h-11 min-w-11 p-2 rounded-lg hover:bg-muted text-muted-foreground\"\n aria-label=\"Close category dialog\"\n >\n <X size={20} />\n </button>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-5\">\n {/* Name */}\n <div>\n <label\n htmlFor=\"ticket-category-name\"\n className=\"block text-sm font-medium text-foreground mb-2\"\n >\n Category Name <span className=\"text-destructive\">*</span>\n </label>\n <input\n id=\"ticket-category-name\"\n type=\"text\"\n aria-label=\"Category Name\"\n value={formData.name}\n onChange={(e) => handleNameChange(e.target.value)}\n placeholder=\"e.g., Technical Support\"\n className=\"w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n required\n />\n </div>\n\n {/* Slug */}\n <div>\n <label\n htmlFor=\"ticket-category-slug\"\n className=\"block text-sm font-medium text-foreground mb-2\"\n >\n Slug <span className=\"text-destructive\">*</span>\n </label>\n <input\n id=\"ticket-category-slug\"\n type=\"text\"\n aria-label=\"Slug\"\n value={formData.slug}\n onChange={(e) => setFormData({ ...formData, slug: e.target.value })}\n placeholder=\"technical-support\"\n className=\"w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n required\n />\n <p className=\"text-xs text-muted-foreground mt-1\">\n URL-friendly identifier (auto-generated from name)\n </p>\n </div>\n\n {/* Description */}\n <div>\n <label\n className=\"block text-sm font-medium text-foreground mb-2\"\n htmlFor=\"ticketcategoriessettings-description-0\"\n >\n Description\n </label>\n <textarea\n id=\"ticketcategoriessettings-description-0\"\n aria-label=\"Description\"\n value={formData.description}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n placeholder=\"Brief description of this category...\"\n rows={3}\n className=\"w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none\"\n />\n </div>\n\n {/* Color */}\n <div>\n <span\n id=\"ticket-category-color-heading\"\n className=\"block text-sm font-medium text-foreground mb-2\"\n >\n Color\n </span>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center\">\n <div className=\"flex flex-wrap gap-2\">\n {CATEGORY_COLOR_OPTIONS.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n onClick={() => setFormData({ ...formData, color: option.value })}\n className={`min-h-11 min-w-11 rounded-full border-2 transition-all ${option.swatchClass} ${\n formData.color === option.value\n ? 'border-foreground scale-110'\n : 'border-transparent hover:scale-105'\n }`}\n aria-label={`Use ${option.label} category color`}\n />\n ))}\n </div>\n <select\n aria-labelledby=\"ticket-category-color-heading\"\n value={formData.color}\n onChange={(e) => setFormData({ ...formData, color: e.target.value })}\n className=\"min-h-11 rounded-lg border border-input bg-background px-3 text-sm text-foreground\"\n >\n {CATEGORY_COLOR_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n\n {/* Icon */}\n <div>\n <label\n className=\"block text-sm font-medium text-foreground mb-2\"\n htmlFor=\"ticketcategoriessettings-icon-emoji-2\"\n >\n Icon (emoji)\n </label>\n <input\n id=\"ticketcategoriessettings-icon-emoji-2\"\n type=\"text\"\n aria-label=\"Icon (emoji)\"\n value={formData.icon}\n onChange={(e) => setFormData({ ...formData, icon: e.target.value })}\n placeholder=\"e.g., 🛠️\"\n className=\"w-full px-4 py-2.5 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n maxLength={4}\n />\n </div>\n\n {/* Active Toggle */}\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n aria-label=\"Active\"\n checked={formData.isActive}\n onChange={(e) => setFormData({ ...formData, isActive: e.target.checked })}\n className=\"size-4 rounded border-input text-primary focus:ring-primary\"\n />\n <span className=\"text-sm text-foreground\">Active</span>\n </label>\n\n {/* Actions */}\n <div className=\"flex flex-col gap-3 pt-4 sm:flex-row\">\n <button\n type=\"submit\"\n disabled={isSubmitting || !formData.name.trim() || !formData.slug.trim()}\n className=\"min-h-11 flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n {isSubmitting ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n {editingCategory ? 'Updating...' : 'Creating...'}\n </>\n ) : (\n <>{editingCategory ? 'Update Category' : 'Create Category'}</>\n )}\n </button>\n <button\n type=\"button\"\n onClick={closeModal}\n className=\"min-h-11 px-4 py-2.5 rounded-lg border border-input hover:bg-muted transition-colors\"\n >\n Cancel\n </button>\n </div>\n </form>\n </div>\n </dialog>\n )}\n\n {/* Header */}\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h2 className=\"text-xl font-semibold mb-2 text-foreground\">Ticket Categories</h2>\n <p className=\"text-sm text-muted-foreground\">\n Organize tickets and knowledge base articles by category\n </p>\n </div>\n <button\n type=\"button\"\n onClick={openCreateModal}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg transition-colors bg-primary text-primary-foreground hover:bg-primary/90\"\n >\n <Plus size={20} />\n New Category\n </button>\n </div>\n\n {/* Categories List */}\n <div className=\"space-y-2\">\n {sortedCategories.map((category) => (\n <div\n key={category.id}\n className={`p-4 rounded-lg border bg-background flex flex-col gap-4 sm:flex-row sm:items-center ${\n category.isActive === false ? 'border-border/50 opacity-60' : 'border-border'\n }`}\n >\n {/* Drag Handle (visual only for now) */}\n <div className=\"text-muted-foreground cursor-grab\">\n <GripVertical size={20} />\n </div>\n\n {/* Color & Icon */}\n <div\n className={`size-10 rounded-lg flex items-center justify-center text-on-accent text-xl flex-shrink-0 ${getCategorySwatchClass(category.color)}`}\n >\n {category.icon || <FolderOpen size={20} />}\n </div>\n\n {/* Info */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-foreground\">{category.name}</h3>\n {category.isActive === false && (\n <span className=\"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground\">\n Inactive\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground\">\n /{category.slug} • {category.articleCount ?? 0} articles\n </p>\n {category.description && (\n <p className=\"text-xs text-muted-foreground mt-1 line-clamp-1\">\n {category.description}\n </p>\n )}\n </div>\n\n {/* Actions */}\n <div className=\"flex w-full items-center justify-end gap-1 sm:w-auto\">\n <button\n type=\"button\"\n onClick={() => handleToggleActive(category)}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-muted text-muted-foreground transition-colors\"\n title={category.isActive ? 'Deactivate' : 'Activate'}\n aria-label={category.isActive ? 'Deactivate category' : 'Activate category'}\n >\n {category.isActive ? (\n <ToggleRight size={20} className=\"text-status-success-text\" />\n ) : (\n <ToggleLeft size={20} />\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => openEditModal(category)}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-muted text-muted-foreground transition-colors\"\n title=\"Edit category\"\n aria-label=\"Edit category\"\n >\n <Edit2 size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => category.id && handleDelete(category.id, category.articleCount ?? 0)}\n disabled={isDeleting === category.id}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-muted text-status-error-text transition-colors disabled:opacity-50\"\n title=\"Delete category\"\n aria-label=\"Delete category\"\n >\n {isDeleting === category.id ? (\n <Loader2 size={18} className=\"animate-spin\" />\n ) : (\n <Trash2 size={18} />\n )}\n </button>\n </div>\n </div>\n ))}\n\n {categories.length === 0 && (\n <div className=\"text-center py-12 border border-dashed border-border rounded-lg\">\n <FolderOpen size={48} className=\"text-muted-foreground mx-auto\" />\n <p className=\"mt-4 text-muted-foreground\">No categories configured</p>\n <button\n type=\"button\"\n onClick={openCreateModal}\n className=\"mt-4 text-primary hover:underline\"\n >\n Create your first category\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AA6CA,IAAM,KAAgB,MACb,EACJ,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,EAGtB,IAA+D;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO,EAAuB,GAAG;CACjC,MAAM;CACN,UAAU;CACX;AAED,SAAgB,EAAyB,EACvC,eACA,aACA,aACA,eACgC;CAChC,IAAM,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAiB,KAAsB,EAAgC,KAAK,EAC7E,CAAC,GAAU,KACf,EAAsD,EAAgB,EAClE,CAAC,GAAc,KAAmB,EAAS,GAAM,EACjD,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAC3D,CAAC,GAAc,KAAmB,EAG9B,KAAK,EACT,IAAuB,EAA6C,KAAK;AAE/E,eACe;AACX,EAAI,EAAqB,WAAS,aAAa,EAAqB,QAAQ;IAE7E,EAAE,CAAC;CAEN,IAAM,KAAoB,GAA2B,MAAoB;AAGvE,EAFA,EAAgB;GAAE;GAAM;GAAS,CAAC,EAC9B,EAAqB,WAAS,aAAa,EAAqB,QAAQ,EAC5E,EAAqB,UAAU,iBAAiB,EAAgB,KAAK,EAAE,IAAK;IAGxE,UAAwB;AAG5B,EAFA,EAAmB,KAAK,EACxB,EAAY,EAAgB,EAC5B,EAAe,GAAK;IAGhB,KAAiB,MAA6B;AAWlD,EAVA,EAAmB,EAAS,EAC5B,EAAY;GACV,MAAM,EAAS;GACf,MAAM,EAAS;GACf,aAAa,EAAS,eAAe;G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AS,IAAI,EAAS,gBAAgB,EAAE;SACnF,UAAU,MAAe,EAAS;SAClC,WAAU;SACV,OAAM;SACN,cAAW;mBAEV,MAAe,EAAS,KACvB,kBAAC,GAAD;UAAS,MAAM;UAAI,WAAU;UAAiB,CAAA,GAE9C,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAEf,CAAA;QACL;;MACF;OA5EC,EAAS,GA4EV,CACN,EAED,EAAW,WAAW,KACrB,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD;OAAY,MAAM;OAAI,WAAU;OAAkC,CAAA;MAClE,kBAAC,KAAD;OAAG,WAAU;iBAA6B;OAA4B,CAAA;MACtE,kBAAC,UAAD;OACE,MAAK;OACL,SAAS;OACT,WAAU;iBACX;OAEQ,CAAA;MACL;OAEJ;;GACF"}
1
+ {"version":3,"file":"TicketCategoriesSettings.js","names":[],"sources":["../../../../src/support/components/settings/TicketCategoriesSettings.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport {\n FolderOpen,\n Plus,\n Edit2,\n Trash2,\n X,\n Loader2,\n AlertCircle,\n CheckCircle,\n ToggleLeft,\n ToggleRight,\n GripVertical,\n} from 'lucide-react';\nimport {\n CATEGORY_COLOR_OPTIONS,\n getCategoryColorOption,\n getCategorySwatchClass,\n} from '../../utils/categoryColors';\n\ninterface TicketCategory {\n id?: string;\n name: string;\n slug: string;\n description?: string;\n color?: string;\n icon?: string;\n displayOrder?: number;\n isActive?: boolean;\n articleCount?: number;\n parentId?: string;\n}\n\ninterface TicketCategoriesSettingsProps {\n categories: TicketCategory[];\n onCreate: (\n input: Omit<TicketCategory, 'id' | 'articleCount'>\n ) => Promise<TicketCategory | null | undefined>;\n onUpdate: (\n id: string,\n input: Partial<TicketCategory>\n ) => Promise<TicketCategory | null | undefined>;\n onDelete: (id: string) => Promise<boolean | null | undefined>;\n}\n\nconst generateSlug = (name: string): string => {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/(^-|-$)/g, '');\n};\n\nconst initialFormData: Omit<TicketCategory, 'id' | 'articleCount'> = {\n name: '',\n slug: '',\n description: '',\n color: CATEGORY_COLOR_OPTIONS[0].value,\n icon: '',\n isActive: true,\n};\n\nexport function TicketCategoriesSettings({\n categories,\n onCreate,\n onUpdate,\n onDelete,\n}: TicketCategoriesSettingsProps) {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [editingCategory, setEditingCategory] = useState<TicketCategory | null>(null);\n const [formData, setFormData] =\n useState<Omit<TicketCategory, 'id' | 'articleCount'>>(initialFormData);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [isDeleting, setIsDeleting] = useState<string | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const notificationTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n };\n }, []);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n notificationTimerRef.current = setTimeout(() => setNotification(null), 3000);\n };\n\n const openCreateModal = () => {\n setEditingCategory(null);\n setFormData(initialFormData);\n setIsModalOpen(true);\n };\n\n const openEditModal = (category: TicketCategory) => {\n setEditingCategory(category);\n setFormData({\n name: category.name,\n slug: category.slug,\n description: category.description || '',\n color: getCategoryColorOption(category.color).value,\n icon: category.icon || '',\n isActive: category.isActive ?? true,\n parentId: category.parentId,\n });\n setIsModalOpen(true);\n };\n\n const closeModal = () => {\n setIsModalOpen(false);\n setEditingCategory(null);\n setFormData(initialFormData);\n };\n\n const handleNameChange = (name: string) => {\n setFormData({\n ...formData,\n name,\n slug: editingCategory ? formData.slug : generateSlug(name),\n });\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!formData.name.trim() || !formData.slug.trim()) return;\n\n setIsSubmitting(true);\n try {\n if (editingCategory?.id) {\n await onUpdate(editingCategory.id, formData);\n showNotification('success', 'Category updated successfully!');\n } else {\n await onCreate(formData);\n showNotification('success', 'Category created successfully!');\n }\n closeModal();\n } catch {\n showNotification('error', `Failed to ${editingCategory ? 'update' : 'create'} category.`);\n } finally {\n setIsSubmitting(false);\n }\n };\n\n const handleDelete = async (id: string, articleCount: number) => {\n if (articleCount > 0) {\n showNotification(\n 'error',\n `Cannot delete category with ${articleCount} articles. Move articles first.`\n );\n return;\n }\n if (!confirm('Are you sure you want to delete this category?')) return;\n\n setIsDeleting(id);\n try {\n await onDelete(id);\n showNotification('success', 'Category deleted successfully!');\n } catch {\n showNotification('error', 'Failed to delete category.');\n } finally {\n setIsDeleting(null);\n }\n };\n\n const handleToggleActive = async (category: TicketCategory) => {\n if (!category.id) return;\n try {\n await onUpdate(category.id, { isActive: !category.isActive });\n showNotification(\n 'success',\n `Category ${category.isActive ? 'deactivated' : 'activated'} successfully!`\n );\n } catch {\n showNotification('error', 'Failed to update category status.');\n }\n };\n\n // Sort categories by displayOrder\n const sortedCategories = [...categories].sort(\n (a, b) => (a.displayOrder ?? 0) - (b.displayOrder ?? 0)\n );\n\n return (\n <div className=\"space-y-6\">\n {/* Notification */}\n {notification && (\n <div\n 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 ${\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-subtle'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-subtle'\n }`}\n >\n {notification.type === 'success' ? (\n <CheckCircle size={20} className=\"text-status-success-text\" />\n ) : (\n <AlertCircle size={20} className=\"text-status-error-text\" />\n )}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {/* Modal */}\n {isModalOpen && (\n <dialog\n open\n 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\"\n aria-modal=\"true\"\n aria-labelledby=\"ticket-category-modal-title\"\n >\n <div className=\"bg-bg-surface rounded-xl p-6 w-full max-w-lg mx-4 shadow-2xl border max-h-[90vh] overflow-y-auto\">\n <div className=\"flex items-center justify-between mb-6\">\n <h3\n id=\"ticket-category-modal-title\"\n className=\"text-xl font-semibold text-text-primary\"\n >\n {editingCategory ? 'Edit Category' : 'Create Category'}\n </h3>\n <button\n type=\"button\"\n onClick={closeModal}\n className=\"min-h-11 min-w-11 p-2 rounded-lg hover:bg-bg-sunken text-text-secondary\"\n aria-label=\"Close category dialog\"\n >\n <X size={20} />\n </button>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-5\">\n {/* Name */}\n <div>\n <label\n htmlFor=\"ticket-category-name\"\n className=\"block text-sm font-medium text-text-primary mb-2\"\n >\n Category Name <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"ticket-category-name\"\n type=\"text\"\n aria-label=\"Category Name\"\n value={formData.name}\n onChange={(e) => handleNameChange(e.target.value)}\n placeholder=\"e.g., Technical Support\"\n 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\"\n required\n />\n </div>\n\n {/* Slug */}\n <div>\n <label\n htmlFor=\"ticket-category-slug\"\n className=\"block text-sm font-medium text-text-primary mb-2\"\n >\n Slug <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"ticket-category-slug\"\n type=\"text\"\n aria-label=\"Slug\"\n value={formData.slug}\n onChange={(e) => setFormData({ ...formData, slug: e.target.value })}\n placeholder=\"technical-support\"\n 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\"\n required\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n URL-friendly identifier (auto-generated from name)\n </p>\n </div>\n\n {/* Description */}\n <div>\n <label\n className=\"block text-sm font-medium text-text-primary mb-2\"\n htmlFor=\"ticketcategoriessettings-description-0\"\n >\n Description\n </label>\n <textarea\n id=\"ticketcategoriessettings-description-0\"\n aria-label=\"Description\"\n value={formData.description}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n placeholder=\"Brief description of this category...\"\n rows={3}\n 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\"\n />\n </div>\n\n {/* Color */}\n <div>\n <span\n id=\"ticket-category-color-heading\"\n className=\"block text-sm font-medium text-text-primary mb-2\"\n >\n Color\n </span>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center\">\n <div className=\"flex flex-wrap gap-2\">\n {CATEGORY_COLOR_OPTIONS.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n onClick={() => setFormData({ ...formData, color: option.value })}\n className={`min-h-11 min-w-11 rounded-full border-2 transition-all ${option.swatchClass} ${\n formData.color === option.value\n ? 'border-foreground scale-110'\n : 'border-transparent'\n }`}\n aria-label={`Use ${option.label} category color`}\n />\n ))}\n </div>\n <select\n aria-labelledby=\"ticket-category-color-heading\"\n value={formData.color}\n onChange={(e) => setFormData({ ...formData, color: e.target.value })}\n className=\"min-h-11 rounded-lg border border-border-default bg-bg-surface px-3 text-sm text-text-primary\"\n >\n {CATEGORY_COLOR_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n\n {/* Icon */}\n <div>\n <label\n className=\"block text-sm font-medium text-text-primary mb-2\"\n htmlFor=\"ticketcategoriessettings-icon-emoji-2\"\n >\n Icon (emoji)\n </label>\n <input\n id=\"ticketcategoriessettings-icon-emoji-2\"\n type=\"text\"\n aria-label=\"Icon (emoji)\"\n value={formData.icon}\n onChange={(e) => setFormData({ ...formData, icon: e.target.value })}\n placeholder=\"e.g., 🛠️\"\n 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\"\n maxLength={4}\n />\n </div>\n\n {/* Active Toggle */}\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n aria-label=\"Active\"\n checked={formData.isActive}\n onChange={(e) => setFormData({ ...formData, isActive: e.target.checked })}\n className=\"size-4 rounded border-border-default text-primary focus:ring-primary\"\n />\n <span className=\"text-sm text-text-primary\">Active</span>\n </label>\n\n {/* Actions */}\n <div className=\"flex flex-col gap-3 pt-4 sm:flex-row\">\n <button\n type=\"submit\"\n disabled={isSubmitting || !formData.name.trim() || !formData.slug.trim()}\n 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\"\n >\n {isSubmitting ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n {editingCategory ? 'Updating...' : 'Creating...'}\n </>\n ) : (\n <>{editingCategory ? 'Update Category' : 'Create Category'}</>\n )}\n </button>\n <button\n type=\"button\"\n onClick={closeModal}\n className=\"min-h-11 px-4 py-2.5 rounded-lg border border-border-default hover:bg-bg-sunken transition-colors\"\n >\n Cancel\n </button>\n </div>\n </form>\n </div>\n </dialog>\n )}\n\n {/* Header */}\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h2 className=\"text-xl font-semibold mb-2 text-text-primary\">Ticket Categories</h2>\n <p className=\"text-sm text-text-secondary\">\n Organize tickets and knowledge base articles by category\n </p>\n </div>\n <button\n type=\"button\"\n onClick={openCreateModal}\n 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\"\n >\n <Plus size={20} />\n New Category\n </button>\n </div>\n\n {/* Categories List */}\n <div className=\"space-y-2\">\n {sortedCategories.map((category) => (\n <div\n key={category.id}\n className={`p-4 rounded-lg border bg-bg-surface flex flex-col gap-4 sm:flex-row sm:items-center ${\n category.isActive === false ? 'border-border-subtle/50 opacity-60' : 'border-border-subtle'\n }`}\n >\n {/* Drag Handle (visual only for now) */}\n <div className=\"text-text-secondary cursor-grab\">\n <GripVertical size={20} />\n </div>\n\n {/* Color & Icon */}\n <div\n className={`size-10 rounded-lg flex items-center justify-center text-on-accent text-xl flex-shrink-0 ${getCategorySwatchClass(category.color)}`}\n >\n {category.icon || <FolderOpen size={20} />}\n </div>\n\n {/* Info */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-text-primary\">{category.name}</h3>\n {category.isActive === false && (\n <span className=\"text-xs px-2 py-0.5 rounded bg-bg-sunken text-text-secondary\">\n Inactive\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary\">\n /{category.slug} • {category.articleCount ?? 0} articles\n </p>\n {category.description && (\n <p className=\"text-xs text-text-secondary mt-1 line-clamp-1\">\n {category.description}\n </p>\n )}\n </div>\n\n {/* Actions */}\n <div className=\"flex w-full items-center justify-end gap-1 sm:w-auto\">\n <button\n type=\"button\"\n onClick={() => handleToggleActive(category)}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors\"\n title={category.isActive ? 'Deactivate' : 'Activate'}\n aria-label={category.isActive ? 'Deactivate category' : 'Activate category'}\n >\n {category.isActive ? (\n <ToggleRight size={20} className=\"text-status-success-text\" />\n ) : (\n <ToggleLeft size={20} />\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => openEditModal(category)}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-text-secondary transition-colors\"\n title=\"Edit category\"\n aria-label=\"Edit category\"\n >\n <Edit2 size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => category.id && handleDelete(category.id, category.articleCount ?? 0)}\n disabled={isDeleting === category.id}\n className=\"min-h-11 min-w-11 p-2 rounded hover:bg-bg-sunken text-status-error-text transition-colors disabled:opacity-50\"\n title=\"Delete category\"\n aria-label=\"Delete category\"\n >\n {isDeleting === category.id ? (\n <Loader2 size={18} className=\"animate-spin\" />\n ) : (\n <Trash2 size={18} />\n )}\n </button>\n </div>\n </div>\n ))}\n\n {categories.length === 0 && (\n <div className=\"text-center py-12 border border-dashed border-border-subtle rounded-lg\">\n <FolderOpen size={48} className=\"text-text-secondary mx-auto\" />\n <p className=\"mt-4 text-text-secondary\">No categories configured</p>\n <button\n type=\"button\"\n onClick={openCreateModal}\n className=\"mt-4 text-primary hover:underline\"\n >\n Create your first category\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AA6CA,IAAM,KAAgB,MACb,EACJ,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,EAGtB,IAA+D;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO,EAAuB,GAAG;CACjC,MAAM;CACN,UAAU;CACX;AAED,SAAgB,EAAyB,EACvC,eACA,aACA,aACA,eACgC;CAChC,IAAM,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAiB,KAAsB,EAAgC,KAAK,EAC7E,CAAC,GAAU,KACf,EAAsD,EAAgB,EAClE,CAAC,GAAc,KAAmB,EAAS,GAAM,EACjD,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAC3D,CAAC,GAAc,KAAmB,EAG9B,KAAK,EACT,IAAuB,EAA6C,KAAK;AAE/E,eACe;AACX,EAAI,EAAqB,WAAS,aAAa,EAAqB,QAAQ;IAE7E,EAAE,CAAC;CAEN,IAAM,KAAoB,GAA2B,MAAoB;AAGvE,EAFA,EAAgB;GAAE;GAAM;GAAS,CAAC,EAC9B,EAAqB,WAAS,aAAa,EAAqB,QAAQ,EAC5E,EAAqB,UAAU,iBAAiB,EAAgB,KAAK,EAAE,IAAK;IAGxE,UAAwB;AAG5B,EAFA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L,eAAe,EAAc,EAAS;SACtC,WAAU;SACV,OAAM;SACN,cAAW;mBAEX,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;SACZ,CAAA;QACT,kBAAC,UAAD;SACE,MAAK;SACL,eAAe,EAAS,MAAM,EAAa,EAAS,IAAI,EAAS,gBAAgB,EAAE;SACnF,UAAU,MAAe,EAAS;SAClC,WAAU;SACV,OAAM;SACN,cAAW;mBAEV,MAAe,EAAS,KACvB,kBAAC,GAAD;UAAS,MAAM;UAAI,WAAU;UAAiB,CAAA,GAE9C,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAEf,CAAA;QACL;;MACF;OA5EC,EAAS,GA4EV,CACN,EAED,EAAW,WAAW,KACrB,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD;OAAY,MAAM;OAAI,WAAU;OAAgC,CAAA;MAChE,kBAAC,KAAD;OAAG,WAAU;iBAA2B;OAA4B,CAAA;MACpE,kBAAC,UAAD;OACE,MAAK;OACL,SAAS;OACT,WAAU;iBACX;OAEQ,CAAA;MACL;OAEJ;;GACF"}
@@ -8,7 +8,7 @@ var o = ({ fileIds: o, ticketId: s }) => {
8
8
  ticketId: s
9
9
  });
10
10
  return o.length === 0 ? null : l ? /* @__PURE__ */ a("div", {
11
- className: "flex items-center gap-2 text-sm text-muted-foreground",
11
+ className: "flex items-center gap-2 text-sm text-text-secondary",
12
12
  children: [/* @__PURE__ */ i(n, {
13
13
  size: 16,
14
14
  className: "animate-spin"
@@ -18,7 +18,7 @@ var o = ({ fileIds: o, ticketId: s }) => {
18
18
  children: c.map((e) => {
19
19
  let n = e.mimeType.startsWith("image/");
20
20
  return /* @__PURE__ */ a("div", {
21
- className: "rounded-lg border border-border bg-muted/30 p-3",
21
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3",
22
22
  children: [/* @__PURE__ */ a("div", {
23
23
  className: "flex items-center gap-2 text-sm",
24
24
  children: [
@@ -31,7 +31,7 @@ var o = ({ fileIds: o, ticketId: s }) => {
31
31
  children: e.name
32
32
  }),
33
33
  /* @__PURE__ */ a("span", {
34
- className: "text-muted-foreground",
34
+ className: "text-text-secondary",
35
35
  children: [
36
36
  "(",
37
37
  e.mimeType,
@@ -42,7 +42,7 @@ var o = ({ fileIds: o, ticketId: s }) => {
42
42
  }), n && e.downloadUrl !== "#" && /* @__PURE__ */ i("img", {
43
43
  src: e.downloadUrl,
44
44
  alt: e.name,
45
- className: "mt-3 max-h-64 rounded-lg border border-border object-contain"
45
+ className: "mt-3 max-h-64 rounded-lg border border-border-subtle object-contain"
46
46
  })]
47
47
  }, e.id);
48
48
  })
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentList.js","names":[],"sources":["../../../../src/support/components/tickets/AttachmentList.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ImageIcon, Loader2, Paperclip } from 'lucide-react';\n\nimport { useSupportAttachments } from '../../hooks/useSupportAttachments';\n\ninterface AttachmentListProps {\n fileIds: string[];\n ticketId: string;\n}\n\nexport const AttachmentList: FC<AttachmentListProps> = ({ fileIds, ticketId }) => {\n const { attachments, isLoading } = useSupportAttachments({ fileIds, ticketId });\n\n if (fileIds.length === 0) {\n return null;\n }\n\n if (isLoading) {\n return (\n <div className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <Loader2 size={16} className=\"animate-spin\" />\n Loading attachments…\n </div>\n );\n }\n\n return (\n <div className=\"space-y-3\">\n {attachments.map((attachment) => {\n const isImage = attachment.mimeType.startsWith('image/');\n\n return (\n <div key={attachment.id} className=\"rounded-lg border border-border bg-muted/30 p-3\">\n <div className=\"flex items-center gap-2 text-sm\">\n {isImage ? <ImageIcon size={16} /> : <Paperclip size={16} />}\n <a\n href={attachment.downloadUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"font-medium text-primary hover:underline\"\n >\n {attachment.name}\n </a>\n <span className=\"text-muted-foreground\">({attachment.mimeType})</span>\n </div>\n\n {isImage && attachment.downloadUrl !== '#' && (\n <img\n src={attachment.downloadUrl}\n alt={attachment.name}\n className=\"mt-3 max-h-64 rounded-lg border border-border object-contain\"\n />\n )}\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;AAUA,IAAa,KAA2C,EAAE,YAAS,kBAAe;CAChF,IAAM,EAAE,gBAAa,iBAAc,EAAsB;EAAE;EAAS;EAAU,CAAC;AAe/E,QAbI,EAAQ,WAAW,IACd,OAGL,IAEA,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAS,MAAM;GAAI,WAAU;GAAiB,CAAA,EAAA,uBAE1C;MAKR,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAY,KAAK,MAAe;GAC/B,IAAM,IAAU,EAAW,SAAS,WAAW,SAAS;AAExD,UACE,kBAAC,OAAD;IAAyB,WAAU;cAAnC,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACa,EAAV,IAAW,IAA0B,GAA3B,EAAW,MAAM,IAAM,CAA0B;MAC5D,kBAAC,KAAD;OACE,MAAM,EAAW;OACjB,QAAO;OACP,KAAI;OACJ,WAAU;iBAET,EAAW;OACV,CAAA;MACJ,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QAAwC;QAAE,EAAW;QAAS;QAAQ;;MAClE;QAEL,KAAW,EAAW,gBAAgB,OACrC,kBAAC,OAAD;KACE,KAAK,EAAW;KAChB,KAAK,EAAW;KAChB,WAAU;KACV,CAAA,CAEA;MArBI,EAAW,GAqBf;IAER;EACE,CAAA"}
1
+ {"version":3,"file":"AttachmentList.js","names":[],"sources":["../../../../src/support/components/tickets/AttachmentList.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ImageIcon, Loader2, Paperclip } from 'lucide-react';\n\nimport { useSupportAttachments } from '../../hooks/useSupportAttachments';\n\ninterface AttachmentListProps {\n fileIds: string[];\n ticketId: string;\n}\n\nexport const AttachmentList: FC<AttachmentListProps> = ({ fileIds, ticketId }) => {\n const { attachments, isLoading } = useSupportAttachments({ fileIds, ticketId });\n\n if (fileIds.length === 0) {\n return null;\n }\n\n if (isLoading) {\n return (\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 size={16} className=\"animate-spin\" />\n Loading attachments…\n </div>\n );\n }\n\n return (\n <div className=\"space-y-3\">\n {attachments.map((attachment) => {\n const isImage = attachment.mimeType.startsWith('image/');\n\n return (\n <div key={attachment.id} className=\"rounded-lg border border-border-subtle bg-bg-sunken/30 p-3\">\n <div className=\"flex items-center gap-2 text-sm\">\n {isImage ? <ImageIcon size={16} /> : <Paperclip size={16} />}\n <a\n href={attachment.downloadUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"font-medium text-primary hover:underline\"\n >\n {attachment.name}\n </a>\n <span className=\"text-text-secondary\">({attachment.mimeType})</span>\n </div>\n\n {isImage && attachment.downloadUrl !== '#' && (\n <img\n src={attachment.downloadUrl}\n alt={attachment.name}\n className=\"mt-3 max-h-64 rounded-lg border border-border-subtle object-contain\"\n />\n )}\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;AAUA,IAAa,KAA2C,EAAE,YAAS,kBAAe;CAChF,IAAM,EAAE,gBAAa,iBAAc,EAAsB;EAAE;EAAS;EAAU,CAAC;AAe/E,QAbI,EAAQ,WAAW,IACd,OAGL,IAEA,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAS,MAAM;GAAI,WAAU;GAAiB,CAAA,EAAA,uBAE1C;MAKR,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAY,KAAK,MAAe;GAC/B,IAAM,IAAU,EAAW,SAAS,WAAW,SAAS;AAExD,UACE,kBAAC,OAAD;IAAyB,WAAU;cAAnC,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACa,EAAV,IAAW,IAA0B,GAA3B,EAAW,MAAM,IAAM,CAA0B;MAC5D,kBAAC,KAAD;OACE,MAAM,EAAW;OACjB,QAAO;OACP,KAAI;OACJ,WAAU;iBAET,EAAW;OACV,CAAA;MACJ,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QAAsC;QAAE,EAAW;QAAS;QAAQ;;MAChE;QAEL,KAAW,EAAW,gBAAgB,OACrC,kBAAC,OAAD;KACE,KAAK,EAAW;KAChB,KAAK,EAAW;KAChB,WAAU;KACV,CAAA,CAEA;MArBI,EAAW,GAqBf;IAER;EACE,CAAA"}
@@ -41,7 +41,7 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
41
41
  };
42
42
  return /* @__PURE__ */ f("div", {
43
43
  "data-tour": "support-ticket-message-composer",
44
- className: "shrink-0 border-t border-border bg-background",
44
+ className: "shrink-0 border-t border-border-subtle bg-bg-surface",
45
45
  children: /* @__PURE__ */ p("form", {
46
46
  onSubmit: I,
47
47
  className: "p-4",
@@ -55,10 +55,10 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
55
55
  "aria-label": "Internal note",
56
56
  checked: E,
57
57
  onChange: (e) => D(e.target.checked),
58
- className: "rounded border-border",
58
+ className: "rounded border-border-subtle",
59
59
  disabled: y
60
60
  }), /* @__PURE__ */ p("span", {
61
- className: "text-sm flex items-center gap-1 text-muted-foreground",
61
+ className: "text-sm flex items-center gap-1 text-text-secondary",
62
62
  children: [/* @__PURE__ */ f(c, { size: 14 }), e(C, "support.messageComposer.internalNote", "Internal Note (not visible to customer)")]
63
63
  })]
64
64
  })
@@ -67,14 +67,14 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
67
67
  className: "mb-3 flex flex-col gap-1 sm:max-w-sm",
68
68
  children: [/* @__PURE__ */ f("label", {
69
69
  htmlFor: "support-canned-response",
70
- className: "text-sm font-medium text-foreground",
70
+ className: "text-sm font-medium text-text-primary",
71
71
  children: e(C, "support.messageComposer.cannedResponses", "Canned responses")
72
72
  }), /* @__PURE__ */ p("select", {
73
73
  id: "support-canned-response",
74
74
  value: "",
75
75
  onChange: (e) => V(e.target.value),
76
76
  disabled: y || O || S || x.length === 0,
77
- className: "rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground transition-colors focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50",
77
+ className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50",
78
78
  children: [/* @__PURE__ */ f("option", {
79
79
  value: "",
80
80
  children: S ? e(C, "support.messageComposer.loadingCannedResponses", "Loading saved replies...") : x.length > 0 ? e(C, "support.messageComposer.selectCannedResponse", "Insert a saved reply") : e(C, "support.messageComposer.noCannedResponses", "No saved replies available")
@@ -96,7 +96,7 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
96
96
  placeholder: e(C, "support.messageComposer.placeholder", v),
97
97
  disabled: y || O,
98
98
  rows: 1,
99
- className: `auto-resize w-full px-4 py-3 rounded-lg border resize-none transition-colors ${E ? "border-status-warning-bg bg-status-warning-bg-subtle" : "border-border bg-background"} text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary`
99
+ className: `auto-resize w-full px-4 py-3 rounded-lg border resize-none transition-colors ${E ? "border-status-warning-bg bg-status-warning-bg-subtle" : "border-border-subtle bg-bg-surface"} text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary`
100
100
  }),
101
101
  /* @__PURE__ */ f("input", {
102
102
  ref: F,
@@ -115,7 +115,7 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
115
115
  A.length > 0 && /* @__PURE__ */ f("div", {
116
116
  className: "flex flex-wrap gap-2 mt-2",
117
117
  children: A.map((e, t) => /* @__PURE__ */ p("div", {
118
- className: "flex items-center gap-2 px-3 py-1 rounded-lg bg-muted text-sm",
118
+ className: "flex items-center gap-2 px-3 py-1 rounded-lg bg-bg-sunken text-sm",
119
119
  children: [
120
120
  /* @__PURE__ */ f(l, { size: 14 }),
121
121
  /* @__PURE__ */ f("span", {
@@ -125,7 +125,7 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
125
125
  /* @__PURE__ */ f("button", {
126
126
  type: "button",
127
127
  onClick: () => B(t),
128
- className: "flex min-h-11 min-w-11 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground",
128
+ className: "flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary transition-colors hover:text-text-primary",
129
129
  "aria-label": `Remove attachment ${e.name}`,
130
130
  children: "×"
131
131
  })
@@ -137,7 +137,7 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
137
137
  children: [/* @__PURE__ */ p("button", {
138
138
  type: "button",
139
139
  onClick: R,
140
- className: "min-h-11 inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-colors text-muted-foreground hover:bg-muted",
140
+ className: "min-h-11 inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-colors text-text-secondary hover:bg-bg-sunken",
141
141
  disabled: y || O,
142
142
  children: [
143
143
  /* @__PURE__ */ f(l, { size: 18 }),
@@ -146,19 +146,19 @@ var h = [], g = ({ ticketId: g, onSendMessage: _, placeholder: v = "Type your me
146
146
  children: e(C, "support.messageComposer.attachFiles", "Attach files")
147
147
  }),
148
148
  A.length > 0 && /* @__PURE__ */ f("span", {
149
- className: "text-xs bg-primary text-primary-foreground rounded-full px-2 py-0.5",
149
+ className: "text-xs bg-action-primary-bg text-action-primary-text rounded-full px-2 py-0.5",
150
150
  children: A.length
151
151
  })
152
152
  ]
153
153
  }), /* @__PURE__ */ p("div", {
154
154
  className: "flex items-center gap-2",
155
155
  children: [/* @__PURE__ */ f("span", {
156
- className: "text-xs text-muted-foreground hidden sm:inline",
156
+ className: "text-xs text-text-secondary hidden sm:inline",
157
157
  children: e(C, "support.messageComposer.hint", "Markdown supported. Press Enter to send, Shift+Enter for new line")
158
158
  }), /* @__PURE__ */ f("button", {
159
159
  type: "submit",
160
160
  disabled: !w.trim() && A.length === 0 || y || O,
161
- className: `min-h-11 inline-flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${E ? "bg-status-warning-bg hover:bg-status-warning-bg/90 text-on-accent" : "bg-primary hover:bg-primary/90 text-primary-foreground"}`,
161
+ className: `min-h-11 inline-flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${E ? "bg-status-warning-bg hover:bg-status-warning-bg/90 text-on-accent" : "bg-action-primary-bg hover:bg-action-primary-bg/90 text-action-primary-text"}`,
162
162
  children: O ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, {
163
163
  size: 18,
164
164
  className: "animate-spin"