@burdenoff/microfe-support 2026.511.1 → 2026.511.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 (44) hide show
  1. package/dist/generated/global-operations.js +177 -93
  2. package/dist/generated/global-operations.js.map +1 -1
  3. package/dist/generated/global-types.js.map +1 -1
  4. package/dist/support/SupportAdminRoutes.js +15 -12
  5. package/dist/support/SupportAdminRoutes.js.map +1 -1
  6. package/dist/support/components/settings/CannedResponsesSettings.js +204 -71
  7. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  8. package/dist/support/components/tickets/MessageComposer.js +137 -107
  9. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  10. package/dist/support/components/tickets/MessageThread.js +11 -11
  11. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  12. package/dist/support/components/tickets/TicketHeader.js +55 -45
  13. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  14. package/dist/support/components/tickets/TicketSidebar.js +105 -114
  15. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  16. package/dist/support/hooks/useKnowledgeBaseOperations.js +79 -76
  17. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  18. package/dist/support/hooks/useSettingsOperations.js +15 -9
  19. package/dist/support/hooks/useSettingsOperations.js.map +1 -1
  20. package/dist/support/hooks/useTicketOperations.js +130 -86
  21. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  22. package/dist/support/pages/AnalyticsPage.js +41 -45
  23. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  24. package/dist/support/pages/ArticleDetailAdminPage.js +148 -147
  25. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  26. package/dist/support/pages/ArticleDetailUserPage.js +71 -70
  27. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  28. package/dist/support/pages/CreateTicketPage.js +120 -138
  29. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  30. package/dist/support/pages/KnowledgeBaseAdminPage.js +27 -24
  31. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  32. package/dist/support/pages/KnowledgeBaseUserPage.js +27 -24
  33. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  34. package/dist/support/pages/SettingsPage.js +3 -1
  35. package/dist/support/pages/SettingsPage.js.map +1 -1
  36. package/dist/support/pages/TicketDetailAdminPage.js +121 -94
  37. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  38. package/dist/support/pages/TicketListPage.js +168 -157
  39. package/dist/support/pages/TicketListPage.js.map +1 -1
  40. package/dist/support/utils/index.js +19 -14
  41. package/dist/support/utils/index.js.map +1 -1
  42. package/dist/support/utils/supportFiles.js +27 -24
  43. package/dist/support/utils/supportFiles.js.map +1 -1
  44. package/package.json +1 -1
@@ -1,30 +1,38 @@
1
1
  import { useSupport as e } from "../providers/SupportProvider.js";
2
- import { Badge as t, Button as n, Input as r } from "../components/ui.js";
3
- import { useSupportStore as i } from "../store/supportStore.js";
4
- import { useTicketOperations as a } from "../hooks/useTicketOperations.js";
5
- import { EmptyState as o, LoadingState as s, PageLayout as c } from "../components/PageLayout.js";
6
- import { tWithFallback as l } from "../utils/i18n.js";
7
- import { useState as u } from "react";
8
- import { AlertCircle as d, Filter as f, Grid as p, List as m, Loader2 as h, Plus as g, Search as _, Ticket as v } from "lucide-react";
9
- import { useNavigate as y } from "react-router-dom";
10
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
11
- import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
+ import { isAdminRole as t } from "../utils/index.js";
3
+ import { Badge as n, Button as r, Input as i } from "../components/ui.js";
4
+ import { useSupportStore as a } from "../store/supportStore.js";
5
+ import { useGetTicketCategoriesQuery as o } from "../../generated/global-operations.js";
6
+ import { useTicketOperations as s } from "../hooks/useTicketOperations.js";
7
+ import { EmptyState as c, LoadingState as l, PageLayout as u } from "../components/PageLayout.js";
8
+ import { tWithFallback as d } from "../utils/i18n.js";
9
+ import { useState as f } from "react";
10
+ import { AlertCircle as p, Filter as m, Grid as h, List as g, Loader2 as _, Plus as v, Search as y, Ticket as b } from "lucide-react";
11
+ import { useNavigate as x } from "react-router-dom";
12
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
13
+ import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
14
  //#region src/support/pages/TicketListPage.tsx
13
- var w = {
15
+ function E(e) {
16
+ return e ? e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()) : null;
17
+ }
18
+ function D(e, t, n) {
19
+ return e.ticketCategory?.name ?? t.find((t) => t.id === e.categoryId)?.name ?? E(e.category) ?? n;
20
+ }
21
+ var O = {
14
22
  NEW: "bg-accent/10 text-accent",
15
23
  IN_PROGRESS: "bg-warning/10 text-warning",
16
24
  WAITING_CUSTOMER: "bg-accent-purple-subtle text-accent-purple",
17
25
  RESOLVED: "bg-success/10 text-success",
18
26
  CLOSED: "bg-muted text-tertiary",
19
27
  REOPENED: "bg-warning/10 text-warning"
20
- }, T = {
28
+ }, k = {
21
29
  NEW: "New",
22
30
  IN_PROGRESS: "In Progress",
23
31
  WAITING_CUSTOMER: "Waiting on Customer",
24
32
  RESOLVED: "Resolved",
25
33
  CLOSED: "Closed",
26
34
  REOPENED: "Reopened"
27
- }, E = {
35
+ }, A = {
28
36
  CRITICAL: {
29
37
  emoji: "🔴",
30
38
  color: "text-error",
@@ -45,293 +53,296 @@ var w = {
45
53
  color: "text-success",
46
54
  label: "Low"
47
55
  }
48
- }, D = {
56
+ }, j = {
49
57
  NONE: "",
50
58
  WARNING_50: "bg-warning/10 text-warning",
51
59
  WARNING_75: "bg-warning/20 text-warning",
52
60
  WARNING_90: "bg-error/10 text-error",
53
61
  BREACHED: "bg-error/20 text-error"
54
62
  };
55
- function O() {
56
- let O = y(), { t: k } = C(), { currentUser: A } = e(), { tickets: j, ticketsLoading: M, ticketsError: N, hasMoreTickets: P, loadMoreTickets: F, totalTickets: I } = a(), { viewMode: L, setViewMode: R, ticketFilter: z, updateTicketFilter: B } = i(), [V, H] = u(!1), U = A?.role?.toUpperCase().includes("ADMIN") ?? !1;
57
- return M && j.length === 0 ? /* @__PURE__ */ x(c, {
58
- title: l(k, "support.ticketList.title", "Support Tickets"),
59
- subtitle: l(k, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
60
- icon: /* @__PURE__ */ x(v, { size: 24 }),
61
- children: /* @__PURE__ */ x(s, { message: l(k, "support.ticketList.loading", "Loading tickets...") })
62
- }) : N ? /* @__PURE__ */ x(c, {
63
- title: l(k, "support.ticketList.title", "Support Tickets"),
64
- subtitle: l(k, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
65
- icon: /* @__PURE__ */ x(v, { size: 24 }),
66
- children: /* @__PURE__ */ S("div", {
63
+ function M() {
64
+ let E = x(), { t: M } = T(), { currentUser: N } = e(), { tickets: P, ticketsLoading: F, ticketsError: I, hasMoreTickets: L, loadMoreTickets: R, totalTickets: z } = s(), { viewMode: B, setViewMode: V, ticketFilter: H, updateTicketFilter: U } = a(), [W, G] = f(!1), K = t(N?.role), { data: q } = o({ variables: {
65
+ limit: 100,
66
+ offset: 0
67
+ } }), J = q?.ticketCategories.nodes ?? [];
68
+ return F && P.length === 0 ? /* @__PURE__ */ C(u, {
69
+ title: d(M, "support.ticketList.title", "Support Tickets"),
70
+ subtitle: d(M, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
71
+ icon: /* @__PURE__ */ C(b, { size: 24 }),
72
+ children: /* @__PURE__ */ C(l, { message: d(M, "support.ticketList.loading", "Loading tickets...") })
73
+ }) : I ? /* @__PURE__ */ C(u, {
74
+ title: d(M, "support.ticketList.title", "Support Tickets"),
75
+ subtitle: d(M, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
76
+ icon: /* @__PURE__ */ C(b, { size: 24 }),
77
+ children: /* @__PURE__ */ w("div", {
67
78
  className: "flex flex-col items-center justify-center py-16 text-center",
68
79
  children: [
69
- /* @__PURE__ */ x("div", {
80
+ /* @__PURE__ */ C("div", {
70
81
  className: "p-4 rounded-2xl bg-destructive/10 text-destructive mb-4",
71
- children: /* @__PURE__ */ x(d, { size: 48 })
82
+ children: /* @__PURE__ */ C(p, { size: 48 })
72
83
  }),
73
- /* @__PURE__ */ x("h3", {
84
+ /* @__PURE__ */ C("h3", {
74
85
  className: "text-lg font-semibold mb-2",
75
- children: l(k, "support.ticketList.error.title", "Failed to load tickets")
86
+ children: d(M, "support.ticketList.error.title", "Failed to load tickets")
76
87
  }),
77
- /* @__PURE__ */ x("p", {
88
+ /* @__PURE__ */ C("p", {
78
89
  className: "text-sm text-muted-foreground max-w-md",
79
- children: N.message || l(k, "support.ticketList.error.description", "An error occurred while loading tickets. Please try again.")
90
+ children: I.message || d(M, "support.ticketList.error.description", "An error occurred while loading tickets. Please try again.")
80
91
  })
81
92
  ]
82
93
  })
83
- }) : /* @__PURE__ */ S(c, {
84
- title: l(k, "support.ticketList.title", "Support Tickets"),
85
- subtitle: l(k, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
86
- icon: /* @__PURE__ */ x(v, { size: 24 }),
87
- headerActions: /* @__PURE__ */ S(n, {
88
- onClick: () => O("new"),
89
- children: [/* @__PURE__ */ x(g, { size: 18 }), l(k, "support.ticketList.actions.newTicket", "New Ticket")]
94
+ }) : /* @__PURE__ */ w(u, {
95
+ title: d(M, "support.ticketList.title", "Support Tickets"),
96
+ subtitle: d(M, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
97
+ icon: /* @__PURE__ */ C(b, { size: 24 }),
98
+ headerActions: K ? void 0 : /* @__PURE__ */ w(r, {
99
+ onClick: () => E("new"),
100
+ children: [/* @__PURE__ */ C(v, { size: 18 }), d(M, "support.ticketList.actions.newTicket", "New Ticket")]
90
101
  }),
91
- headerContent: /* @__PURE__ */ x("div", {
102
+ headerContent: /* @__PURE__ */ C("div", {
92
103
  className: "flex items-center gap-2",
93
- children: /* @__PURE__ */ x(t, {
104
+ children: /* @__PURE__ */ C(n, {
94
105
  variant: "secondary",
95
106
  className: "font-medium",
96
- children: l(k, "support.ticketList.count", "{{count}} {{label}}", {
97
- count: I,
98
- label: I === 1 ? l(k, "support.ticketList.count.single", "ticket") : l(k, "support.ticketList.count.plural", "tickets")
107
+ children: d(M, "support.ticketList.count", "{{count}} {{label}}", {
108
+ count: z,
109
+ label: z === 1 ? d(M, "support.ticketList.count.single", "ticket") : d(M, "support.ticketList.count.plural", "tickets")
99
110
  })
100
111
  })
101
112
  }),
102
113
  children: [
103
- /* @__PURE__ */ S("div", {
114
+ /* @__PURE__ */ w("div", {
104
115
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border bg-card",
105
116
  children: [
106
- /* @__PURE__ */ S("div", {
117
+ /* @__PURE__ */ w("div", {
107
118
  className: "flex-1 relative",
108
- children: [/* @__PURE__ */ x(_, {
119
+ children: [/* @__PURE__ */ C(y, {
109
120
  size: 18,
110
121
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
111
- }), /* @__PURE__ */ x(r, {
122
+ }), /* @__PURE__ */ C(i, {
112
123
  type: "text",
113
- placeholder: l(k, "support.ticketList.search.placeholder", "Search tickets..."),
114
- value: z.search,
115
- onChange: (e) => B({ search: e.target.value }),
124
+ placeholder: d(M, "support.ticketList.search.placeholder", "Search tickets..."),
125
+ value: H.search,
126
+ onChange: (e) => U({ search: e.target.value }),
116
127
  className: "pl-[3.25rem]"
117
128
  })]
118
129
  }),
119
- /* @__PURE__ */ S("div", {
130
+ /* @__PURE__ */ w("div", {
120
131
  className: "flex items-center gap-1 p-1 rounded-lg border bg-muted/50",
121
- children: [/* @__PURE__ */ x(n, {
122
- variant: L === "list" ? "secondary" : "ghost",
132
+ children: [/* @__PURE__ */ C(r, {
133
+ variant: B === "list" ? "secondary" : "ghost",
123
134
  size: "sm",
124
- onClick: () => R("list"),
135
+ onClick: () => V("list"),
125
136
  className: "px-3",
126
- children: /* @__PURE__ */ x(m, { size: 18 })
127
- }), /* @__PURE__ */ x(n, {
128
- variant: L === "grid" ? "secondary" : "ghost",
137
+ children: /* @__PURE__ */ C(g, { size: 18 })
138
+ }), /* @__PURE__ */ C(r, {
139
+ variant: B === "grid" ? "secondary" : "ghost",
129
140
  size: "sm",
130
- onClick: () => R("grid"),
141
+ onClick: () => V("grid"),
131
142
  className: "px-3",
132
- children: /* @__PURE__ */ x(p, { size: 18 })
143
+ children: /* @__PURE__ */ C(h, { size: 18 })
133
144
  })]
134
145
  }),
135
- /* @__PURE__ */ S(n, {
136
- variant: V ? "secondary" : "outline",
137
- onClick: () => H(!V),
138
- children: [/* @__PURE__ */ x(f, { size: 18 }), l(k, "support.ticketList.filters.toggle", "Filters")]
146
+ /* @__PURE__ */ w(r, {
147
+ variant: W ? "secondary" : "outline",
148
+ onClick: () => G(!W),
149
+ children: [/* @__PURE__ */ C(m, { size: 18 }), d(M, "support.ticketList.filters.toggle", "Filters")]
139
150
  })
140
151
  ]
141
152
  }),
142
- V && /* @__PURE__ */ x("div", {
153
+ W && /* @__PURE__ */ C("div", {
143
154
  className: "p-4 rounded-xl border bg-muted/30",
144
- children: /* @__PURE__ */ S("div", {
155
+ children: /* @__PURE__ */ w("div", {
145
156
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
146
157
  children: [
147
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
158
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
148
159
  className: "block text-sm font-medium mb-2 text-muted-foreground",
149
- children: l(k, "support.ticketList.filters.status.label", "Status")
150
- }), /* @__PURE__ */ S("select", {
151
- value: z.status,
152
- onChange: (e) => B({ status: e.target.value }),
160
+ children: d(M, "support.ticketList.filters.status.label", "Status")
161
+ }), /* @__PURE__ */ w("select", {
162
+ value: H.status,
163
+ onChange: (e) => U({ status: e.target.value }),
153
164
  className: "w-full px-3 py-2 rounded-lg border bg-background text-foreground",
154
165
  children: [
155
- /* @__PURE__ */ x("option", {
166
+ /* @__PURE__ */ C("option", {
156
167
  value: "all",
157
- children: l(k, "support.ticketList.filters.status.all", "All Statuses")
168
+ children: d(M, "support.ticketList.filters.status.all", "All Statuses")
158
169
  }),
159
- /* @__PURE__ */ x("option", {
170
+ /* @__PURE__ */ C("option", {
160
171
  value: "NEW",
161
- children: l(k, "support.shared.status.new", "New")
172
+ children: d(M, "support.shared.status.new", "New")
162
173
  }),
163
- /* @__PURE__ */ x("option", {
174
+ /* @__PURE__ */ C("option", {
164
175
  value: "IN_PROGRESS",
165
- children: l(k, "support.shared.status.inProgress", "In Progress")
176
+ children: d(M, "support.shared.status.inProgress", "In Progress")
166
177
  }),
167
- /* @__PURE__ */ x("option", {
178
+ /* @__PURE__ */ C("option", {
168
179
  value: "WAITING_CUSTOMER",
169
- children: l(k, "support.shared.status.waitingCustomer", "Waiting on Customer")
180
+ children: d(M, "support.shared.status.waitingCustomer", "Waiting on Customer")
170
181
  }),
171
- /* @__PURE__ */ x("option", {
182
+ /* @__PURE__ */ C("option", {
172
183
  value: "RESOLVED",
173
- children: l(k, "support.shared.status.resolved", "Resolved")
184
+ children: d(M, "support.shared.status.resolved", "Resolved")
174
185
  }),
175
- /* @__PURE__ */ x("option", {
186
+ /* @__PURE__ */ C("option", {
176
187
  value: "CLOSED",
177
- children: l(k, "support.shared.status.closed", "Closed")
188
+ children: d(M, "support.shared.status.closed", "Closed")
178
189
  }),
179
- /* @__PURE__ */ x("option", {
190
+ /* @__PURE__ */ C("option", {
180
191
  value: "REOPENED",
181
- children: l(k, "support.shared.status.reopened", "Reopened")
192
+ children: d(M, "support.shared.status.reopened", "Reopened")
182
193
  })
183
194
  ]
184
195
  })] }),
185
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
196
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
186
197
  className: "block text-sm font-medium mb-2 text-muted-foreground",
187
- children: l(k, "support.ticketList.filters.priority.label", "Priority")
188
- }), /* @__PURE__ */ S("select", {
189
- value: z.priority,
190
- onChange: (e) => B({ priority: e.target.value }),
198
+ children: d(M, "support.ticketList.filters.priority.label", "Priority")
199
+ }), /* @__PURE__ */ w("select", {
200
+ value: H.priority,
201
+ onChange: (e) => U({ priority: e.target.value }),
191
202
  className: "w-full px-3 py-2 rounded-lg border bg-background text-foreground",
192
203
  children: [
193
- /* @__PURE__ */ x("option", {
204
+ /* @__PURE__ */ C("option", {
194
205
  value: "all",
195
- children: l(k, "support.ticketList.filters.priority.all", "All Priorities")
206
+ children: d(M, "support.ticketList.filters.priority.all", "All Priorities")
196
207
  }),
197
- /* @__PURE__ */ x("option", {
208
+ /* @__PURE__ */ C("option", {
198
209
  value: "CRITICAL",
199
- children: l(k, "support.shared.priority.critical", "Critical")
210
+ children: d(M, "support.shared.priority.critical", "Critical")
200
211
  }),
201
- /* @__PURE__ */ x("option", {
212
+ /* @__PURE__ */ C("option", {
202
213
  value: "HIGH",
203
- children: l(k, "support.shared.priority.high", "High")
214
+ children: d(M, "support.shared.priority.high", "High")
204
215
  }),
205
- /* @__PURE__ */ x("option", {
216
+ /* @__PURE__ */ C("option", {
206
217
  value: "NORMAL",
207
- children: l(k, "support.shared.priority.normal", "Normal")
218
+ children: d(M, "support.shared.priority.normal", "Normal")
208
219
  }),
209
- /* @__PURE__ */ x("option", {
220
+ /* @__PURE__ */ C("option", {
210
221
  value: "LOW",
211
- children: l(k, "support.shared.priority.low", "Low")
222
+ children: d(M, "support.shared.priority.low", "Low")
212
223
  })
213
224
  ]
214
225
  })] }),
215
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
226
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
216
227
  className: "block text-sm font-medium mb-2 text-muted-foreground",
217
228
  children: "Date From"
218
- }), /* @__PURE__ */ x(r, {
229
+ }), /* @__PURE__ */ C(i, {
219
230
  type: "date",
220
- value: z.dateRange.start ? z.dateRange.start.toISOString().slice(0, 10) : "",
221
- onChange: (e) => B({ dateRange: {
222
- ...z.dateRange,
231
+ value: H.dateRange.start ? H.dateRange.start.toISOString().slice(0, 10) : "",
232
+ onChange: (e) => U({ dateRange: {
233
+ ...H.dateRange,
223
234
  start: e.target.value ? /* @__PURE__ */ new Date(`${e.target.value}T00:00:00`) : null
224
235
  } })
225
236
  })] }),
226
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
237
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
227
238
  className: "block text-sm font-medium mb-2 text-muted-foreground",
228
239
  children: "Date To"
229
- }), /* @__PURE__ */ x(r, {
240
+ }), /* @__PURE__ */ C(i, {
230
241
  type: "date",
231
- value: z.dateRange.end ? z.dateRange.end.toISOString().slice(0, 10) : "",
232
- onChange: (e) => B({ dateRange: {
233
- ...z.dateRange,
242
+ value: H.dateRange.end ? H.dateRange.end.toISOString().slice(0, 10) : "",
243
+ onChange: (e) => U({ dateRange: {
244
+ ...H.dateRange,
234
245
  end: e.target.value ? /* @__PURE__ */ new Date(`${e.target.value}T23:59:59`) : null
235
246
  } })
236
247
  })] }),
237
- U && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
248
+ K && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
238
249
  className: "block text-sm font-medium mb-2 text-muted-foreground",
239
250
  children: "Product"
240
- }), /* @__PURE__ */ x(r, {
251
+ }), /* @__PURE__ */ C(i, {
241
252
  type: "text",
242
- value: z.productId || "",
243
- onChange: (e) => B({ productId: e.target.value || null }),
253
+ value: H.productId || "",
254
+ onChange: (e) => U({ productId: e.target.value || null }),
244
255
  placeholder: "vibecontrols"
245
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
256
+ })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
246
257
  className: "block text-sm font-medium mb-2 text-muted-foreground",
247
258
  children: "Assignee"
248
- }), /* @__PURE__ */ x(r, {
259
+ }), /* @__PURE__ */ C(i, {
249
260
  type: "text",
250
- value: z.assignedToId || "",
251
- onChange: (e) => B({ assignedToId: e.target.value || null }),
261
+ value: H.assignedToId || "",
262
+ onChange: (e) => U({ assignedToId: e.target.value || null }),
252
263
  placeholder: "User ID"
253
264
  })] })] })
254
265
  ]
255
266
  })
256
267
  }),
257
- j.length === 0 ? /* @__PURE__ */ x(o, {
258
- icon: /* @__PURE__ */ x(v, { size: 48 }),
259
- title: l(k, "support.ticketList.empty.title", "No tickets found"),
260
- description: l(k, "support.ticketList.empty.description", "Create your first support ticket to get started, or adjust your filters."),
261
- action: /* @__PURE__ */ S(n, {
262
- onClick: () => O("new"),
263
- children: [/* @__PURE__ */ x(g, { size: 18 }), l(k, "support.ticketList.empty.action", "Create Ticket")]
268
+ P.length === 0 ? /* @__PURE__ */ C(c, {
269
+ icon: /* @__PURE__ */ C(b, { size: 48 }),
270
+ title: d(M, "support.ticketList.empty.title", "No tickets found"),
271
+ description: d(M, "support.ticketList.empty.description", "Create your first support ticket to get started, or adjust your filters."),
272
+ action: K ? void 0 : /* @__PURE__ */ w(r, {
273
+ onClick: () => E("new"),
274
+ children: [/* @__PURE__ */ C(v, { size: 18 }), d(M, "support.ticketList.empty.action", "Create Ticket")]
264
275
  })
265
- }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", {
266
- className: L === "grid" ? "grid grid-cols-1 md:grid-cols-2 gap-4" : "space-y-3",
267
- children: j.map((e) => /* @__PURE__ */ x("div", {
268
- onClick: () => O(e.id),
276
+ }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
277
+ className: B === "grid" ? "grid grid-cols-1 md:grid-cols-2 gap-4" : "space-y-3",
278
+ children: P.map((e) => /* @__PURE__ */ C("div", {
279
+ onClick: () => E(e.id),
269
280
  className: "group p-4 rounded-xl border border-default bg-surface hover:border-primary/50 hover:shadow-md cursor-pointer transition-all duration-200 animate-in fade-in-0 slide-in-from-bottom-2",
270
- children: /* @__PURE__ */ S("div", {
281
+ children: /* @__PURE__ */ w("div", {
271
282
  className: "flex items-start justify-between gap-4",
272
- children: [/* @__PURE__ */ S("div", {
283
+ children: [/* @__PURE__ */ w("div", {
273
284
  className: "flex-1 min-w-0",
274
285
  children: [
275
- /* @__PURE__ */ S("div", {
286
+ /* @__PURE__ */ w("div", {
276
287
  className: "flex items-center gap-2 mb-2 flex-wrap",
277
288
  children: [
278
- /* @__PURE__ */ x("span", {
289
+ /* @__PURE__ */ C("span", {
279
290
  className: "text-xs font-mono text-muted-foreground",
280
291
  children: e.ticketNumber
281
292
  }),
282
- /* @__PURE__ */ x(t, {
283
- className: w[e.status],
284
- children: T[e.status]
293
+ /* @__PURE__ */ C(n, {
294
+ className: O[e.status],
295
+ children: k[e.status]
285
296
  }),
286
- e.ticketCategory && /* @__PURE__ */ x(t, {
297
+ e.ticketCategory && /* @__PURE__ */ C(n, {
287
298
  variant: "outline",
288
299
  style: { borderColor: e.ticketCategory.color || void 0 },
289
300
  children: e.ticketCategory.name
290
301
  }),
291
- e.slaBreachStatus && e.slaBreachStatus !== "NONE" && /* @__PURE__ */ x(t, {
292
- className: D[e.slaBreachStatus],
293
- children: e.slaBreachStatus === "BREACHED" ? l(k, "support.ticketList.sla.breached", "SLA Breached") : l(k, "support.ticketList.sla.atRisk", "SLA At Risk")
302
+ e.slaBreachStatus && e.slaBreachStatus !== "NONE" && /* @__PURE__ */ C(n, {
303
+ className: j[e.slaBreachStatus],
304
+ children: e.slaBreachStatus === "BREACHED" ? d(M, "support.ticketList.sla.breached", "SLA Breached") : d(M, "support.ticketList.sla.atRisk", "SLA At Risk")
294
305
  })
295
306
  ]
296
307
  }),
297
- /* @__PURE__ */ x("h3", {
308
+ /* @__PURE__ */ C("h3", {
298
309
  className: "font-semibold text-foreground mb-1 group-hover:text-primary transition-colors truncate",
299
310
  children: e.subject
300
311
  }),
301
- /* @__PURE__ */ S("div", {
312
+ /* @__PURE__ */ w("div", {
302
313
  className: "flex items-center gap-2 text-sm text-muted-foreground",
303
314
  children: [
304
- /* @__PURE__ */ x("span", { children: e.category ? e.category.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()) : l(k, "support.ticketList.category.general", "General") }),
305
- /* @__PURE__ */ x("span", { children: "•" }),
306
- /* @__PURE__ */ x("span", { children: new Date(e.createdAt).toLocaleDateString() }),
307
- e.context?.productId && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", { children: "•" }), /* @__PURE__ */ x("span", { children: e.context.productId })] }),
308
- e.assignedTo && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", { children: "•" }), /* @__PURE__ */ x("span", { children: l(k, "support.ticketList.meta.assigned", "Assigned") })] })
315
+ /* @__PURE__ */ C("span", { children: D(e, J, d(M, "support.ticketList.category.general", "General")) }),
316
+ /* @__PURE__ */ C("span", { children: "•" }),
317
+ /* @__PURE__ */ C("span", { children: new Date(e.createdAt).toLocaleDateString() }),
318
+ e.context?.productId && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("span", { children: "•" }), /* @__PURE__ */ C("span", { children: e.context.productId })] }),
319
+ e.assignedTo && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("span", { children: "•" }), /* @__PURE__ */ C("span", { children: d(M, "support.ticketList.meta.assigned", "Assigned") })] })
309
320
  ]
310
321
  })
311
322
  ]
312
- }), /* @__PURE__ */ x("div", {
323
+ }), /* @__PURE__ */ C("div", {
313
324
  className: "text-2xl flex-shrink-0",
314
- title: E[e.priority]?.label,
315
- children: E[e.priority]?.emoji || "⚪"
325
+ title: A[e.priority]?.label,
326
+ children: A[e.priority]?.emoji || "⚪"
316
327
  })]
317
328
  })
318
329
  }, e.id))
319
- }), P && /* @__PURE__ */ x("div", {
330
+ }), L && /* @__PURE__ */ C("div", {
320
331
  className: "flex justify-center pt-4",
321
- children: /* @__PURE__ */ x(n, {
332
+ children: /* @__PURE__ */ C(r, {
322
333
  variant: "outline",
323
- onClick: F,
324
- disabled: M,
325
- children: M ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(h, {
334
+ onClick: R,
335
+ disabled: F,
336
+ children: F ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(_, {
326
337
  size: 18,
327
338
  className: "animate-spin"
328
- }), l(k, "support.ticketList.actions.loadingMore", "Loading...")] }) : l(k, "support.ticketList.actions.loadMore", "Load More")
339
+ }), d(M, "support.ticketList.actions.loadingMore", "Loading...")] }) : d(M, "support.ticketList.actions.loadMore", "Load More")
329
340
  })
330
341
  })] })
331
342
  ]
332
343
  });
333
344
  }
334
345
  //#endregion
335
- export { O as TicketListPage };
346
+ export { M as TicketListPage };
336
347
 
337
348
  //# sourceMappingURL=TicketListPage.js.map