@burdenoff/microfe-support 2026.519.1 → 2026.521.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 (83) hide show
  1. package/dist/generated/global-operations.js +18 -48
  2. package/dist/generated/global-operations.js.map +1 -1
  3. package/dist/generated/global-types.js.map +1 -1
  4. package/dist/index.js +8 -7
  5. package/dist/node_modules/marked/lib/marked.esm.js +1 -1
  6. package/dist/support/SupportAdminRoot.js +35 -26
  7. package/dist/support/SupportAdminRoot.js.map +1 -1
  8. package/dist/support/SupportUserRoot.js +29 -20
  9. package/dist/support/SupportUserRoot.js.map +1 -1
  10. package/dist/support/components/NotificationToast.js +1 -1
  11. package/dist/support/components/NotificationToast.js.map +1 -1
  12. package/dist/support/components/analytics/CategoryBreakdown.js +22 -37
  13. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  14. package/dist/support/components/analytics/PriorityBreakdown.js +28 -33
  15. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  16. package/dist/support/components/analytics/TopAgents.js +35 -42
  17. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  18. package/dist/support/components/kb/ArticleForm.js +26 -13
  19. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  20. package/dist/support/components/settings/CannedResponsesSettings.js +9 -7
  21. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  22. package/dist/support/components/settings/SLAPoliciesSettings.js +10 -8
  23. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  24. package/dist/support/components/settings/TicketCategoriesSettings.js +169 -168
  25. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  26. package/dist/support/components/tickets/MessageComposer.js +4 -3
  27. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  28. package/dist/support/components/tickets/MessageThread.js +1 -1
  29. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  30. package/dist/support/components/tickets/TicketDetailHeader.js +41 -52
  31. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  32. package/dist/support/components/tickets/TicketHeader.js +70 -80
  33. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  34. package/dist/support/components/tickets/TicketSidebar.js +77 -82
  35. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  36. package/dist/support/events/rybbit.js +35 -0
  37. package/dist/support/events/rybbit.js.map +1 -0
  38. package/dist/support/hooks/useAnalyticsOperations.js +41 -41
  39. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  40. package/dist/support/hooks/useKnowledgeBaseOperations.js +50 -52
  41. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  42. package/dist/support/hooks/useTicketListOperations.js +51 -0
  43. package/dist/support/hooks/useTicketListOperations.js.map +1 -0
  44. package/dist/support/hooks/useTicketOperations.js +74 -109
  45. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  46. package/dist/support/index.js +2 -1
  47. package/dist/support/pages/ArticleDetailAdminPage.js +148 -151
  48. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  49. package/dist/support/pages/ArticleDetailUserPage.js +67 -72
  50. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  51. package/dist/support/pages/ContactInquiriesPage.js +128 -123
  52. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  53. package/dist/support/pages/ContactInquiryDetailPage.js +154 -96
  54. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  55. package/dist/support/pages/CreateArticlePage.js +42 -42
  56. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  57. package/dist/support/pages/CreateTicketPage.js +20 -11
  58. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  59. package/dist/support/pages/EditArticlePage.js +66 -64
  60. package/dist/support/pages/EditArticlePage.js.map +1 -1
  61. package/dist/support/pages/KnowledgeBaseAdminPage.js +80 -85
  62. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  63. package/dist/support/pages/KnowledgeBaseUserPage.js +73 -78
  64. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  65. package/dist/support/pages/SettingsPage.js +3 -3
  66. package/dist/support/pages/SettingsPage.js.map +1 -1
  67. package/dist/support/pages/TicketDetailAdminPage.js +28 -21
  68. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  69. package/dist/support/pages/TicketDetailUserPage.js +121 -111
  70. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  71. package/dist/support/pages/TicketListPage.js +170 -196
  72. package/dist/support/pages/TicketListPage.js.map +1 -1
  73. package/dist/support/store/supportStore.js +43 -34
  74. package/dist/support/store/supportStore.js.map +1 -1
  75. package/dist/support/utils/categoryColors.js +64 -0
  76. package/dist/support/utils/categoryColors.js.map +1 -0
  77. package/dist/support/utils/index.js +38 -26
  78. package/dist/support/utils/index.js.map +1 -1
  79. package/dist/support/utils/ticketFilters.js +43 -0
  80. package/dist/support/utils/ticketFilters.js.map +1 -0
  81. package/dist/support/utils/uiTokens.js +44 -0
  82. package/dist/support/utils/uiTokens.js.map +1 -0
  83. package/package.json +1 -1
@@ -1,15 +1,17 @@
1
- import { useGetContactInquiryQuery as e, useReplyToContactInquiryMutation as t, useUpdateContactInquiryStatusMutation as n } from "../../generated/global-operations.js";
2
- import { nativeCopyText as r, nativeImpact as i } from "../../utils/nativeBridge.js";
3
- import { useState as a } from "react";
4
- import { AlertCircle as o, Archive as s, ArrowLeft as c, Building2 as l, Calendar as u, CheckCircle as d, Clock as f, Copy as p, ExternalLink as m, Eye as h, Globe as g, Loader2 as _, Mail as v, MessageSquare as y, Send as b, ShieldAlert as x, Ticket as S, User as C } from "lucide-react";
5
- import { useLocation as w, useNavigate as T, useParams as E } from "react-router-dom";
1
+ import { humanizeCategory as e } from "../utils/index.js";
2
+ import { useGetContactInquiryQuery as t, useReplyToContactInquiryMutation as n, useUpdateContactInquiryStatusMutation as r } from "../../generated/global-operations.js";
3
+ import { nativeCopyText as i, nativeImpact as ee } from "../../utils/nativeBridge.js";
4
+ import { useEffect as a, useRef as o, useState as s } from "react";
5
+ import { AlertCircle as c, Archive as l, ArrowLeft as u, Building2 as te, Calendar as ne, CheckCircle as d, Clock as f, Copy as p, ExternalLink as m, Eye as h, Globe as re, Loader2 as g, Mail as _, MessageSquare as ie, Package as ae, Send as v, ShieldAlert as y, Tag as b, Ticket as x, User as S } from "lucide-react";
6
+ import { useLocation as C, useNavigate as w, useParams as T } from "react-router-dom";
7
+ import { graphqlFetch as E } from "@burdenoff/fe-libs/shared/graphql/fetch";
6
8
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
7
9
  //#region src/support/pages/ContactInquiryDetailPage.tsx
8
10
  var k = {
9
11
  NEW: {
10
12
  label: "New",
11
13
  color: "text-accent-blue",
12
- icon: v,
14
+ icon: _,
13
15
  bg: "bg-status-info-bg-subtle border-border-subtle"
14
16
  },
15
17
  REVIEWED: {
@@ -21,19 +23,19 @@ var k = {
21
23
  CONVERTED: {
22
24
  label: "Converted to Ticket",
23
25
  color: "text-status-success-text",
24
- icon: S,
26
+ icon: x,
25
27
  bg: "bg-status-success-bg-subtle border-border-subtle"
26
28
  },
27
29
  SPAM: {
28
30
  label: "Spam",
29
31
  color: "text-status-error-text",
30
- icon: x,
32
+ icon: y,
31
33
  bg: "bg-status-error-bg-subtle border-border-subtle"
32
34
  },
33
35
  ARCHIVED: {
34
36
  label: "Archived",
35
37
  color: "text-text-secondary",
36
- icon: s,
38
+ icon: l,
37
39
  bg: "bg-bg-canvas border-border-subtle"
38
40
  }
39
41
  };
@@ -47,7 +49,7 @@ function A(e) {
47
49
  minute: "2-digit"
48
50
  });
49
51
  }
50
- function j(e) {
52
+ function oe(e) {
51
53
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
52
54
  if (n < 60) return `${n}m ago`;
53
55
  let r = Math.floor(n / 60);
@@ -55,36 +57,59 @@ function j(e) {
55
57
  let i = Math.floor(r / 24);
56
58
  return i < 30 ? `${i}d ago` : A(e);
57
59
  }
58
- function M() {
59
- let { id: h } = E(), x = T(), M = w().search, [N, P] = a(!1), [F, I] = a(!1), [L, R] = a(""), [z, B] = a(!1), { data: V, loading: H, error: U } = e({
60
+ function j() {
61
+ let { id: h } = T(), y = w(), j = C().search, [se, M] = s(!1), [ce, N] = s(!1), [P, F] = s(""), [I, L] = s(!1), R = o(null), z = o(null), B = o(null), [V, H] = s(null);
62
+ a(() => () => {
63
+ R.current && clearTimeout(R.current), z.current && clearTimeout(z.current), B.current && clearTimeout(B.current);
64
+ }, []);
65
+ let { data: U, loading: W, error: G } = t({
60
66
  variables: { id: h },
61
67
  skip: !h
62
- }), [W, { loading: G }] = n({ refetchQueries: ["GetContactInquiry", "GetContactInquiries"] }), [K, { loading: q }] = t({ refetchQueries: ["GetContactInquiry"] }), J = async () => {
63
- if (!(!L.trim() || !h)) try {
64
- (await K({ variables: {
68
+ }), K = U?.contactInquiry?.productId ?? null;
69
+ a(() => {
70
+ if (!K) {
71
+ H(null);
72
+ return;
73
+ }
74
+ let e = !1;
75
+ return E({
76
+ gateway: "global",
77
+ query: "query($id: ID!) { platformProduct(id: $id) { name } }",
78
+ variables: { id: K }
79
+ }).then((t) => {
80
+ if (e) return;
81
+ let n = t.data?.platformProduct?.name;
82
+ n && H(n);
83
+ }).catch(() => {}), () => {
84
+ e = !0;
85
+ };
86
+ }, [K]);
87
+ let [le, { loading: q }] = r({ refetchQueries: ["GetContactInquiry", "GetContactInquiries"] }), [ue, { loading: J }] = n({ refetchQueries: ["GetContactInquiry"] }), Y = async () => {
88
+ if (!(!P.trim() || !h)) try {
89
+ (await ue({ variables: {
65
90
  id: h,
66
- message: L.trim()
67
- } })).data?.replyToContactInquiry.success && (B(!0), R(""), setTimeout(() => B(!1), 3e3));
91
+ message: P.trim()
92
+ } })).data?.replyToContactInquiry.success && (L(!0), F(""), B.current && clearTimeout(B.current), B.current = setTimeout(() => L(!1), 3e3));
68
93
  } catch (e) {
69
94
  console.error("Failed to send reply:", e);
70
95
  }
71
- }, Y = V?.contactInquiry, X = async (e) => {
96
+ }, X = U?.contactInquiry, Z = async (e) => {
72
97
  if (h) try {
73
- await W({ variables: {
98
+ await le({ variables: {
74
99
  id: h,
75
100
  input: { status: e }
76
- } }), P(!0), setTimeout(() => P(!1), 3e3);
101
+ } }), M(!0), R.current && clearTimeout(R.current), R.current = setTimeout(() => M(!1), 3e3);
77
102
  } catch (e) {
78
103
  console.error("Failed to update status:", e);
79
104
  }
80
- }, Z = async () => {
81
- Y?.email && (i("light"), await r(Y.email), I(!0), setTimeout(() => I(!1), 2e3));
105
+ }, de = async () => {
106
+ X?.email && (ee("light"), await i(X.email), N(!0), z.current && clearTimeout(z.current), z.current = setTimeout(() => N(!1), 2e3));
82
107
  };
83
- if (H) return /* @__PURE__ */ D("div", {
108
+ if (W) return /* @__PURE__ */ D("div", {
84
109
  className: "min-h-full flex items-center justify-center py-20",
85
110
  children: /* @__PURE__ */ O("div", {
86
111
  className: "text-center",
87
- children: [/* @__PURE__ */ D(_, {
112
+ children: [/* @__PURE__ */ D(g, {
88
113
  size: 36,
89
114
  className: "animate-spin text-[var(--color-text-secondary)] mx-auto mb-3"
90
115
  }), /* @__PURE__ */ D("p", {
@@ -93,14 +118,14 @@ function M() {
93
118
  })]
94
119
  })
95
120
  });
96
- if (U || !Y) return /* @__PURE__ */ D("div", {
121
+ if (G || !X) return /* @__PURE__ */ D("div", {
97
122
  className: "min-h-full flex items-center justify-center py-20",
98
123
  children: /* @__PURE__ */ O("div", {
99
124
  className: "text-center max-w-sm",
100
125
  children: [
101
126
  /* @__PURE__ */ D("div", {
102
127
  className: "w-16 h-16 mx-auto mb-4 rounded-2xl bg-status-error-bg-subtle flex items-center justify-center",
103
- children: /* @__PURE__ */ D(o, {
128
+ children: /* @__PURE__ */ D(c, {
104
129
  size: 32,
105
130
  className: "text-status-error-text"
106
131
  })
@@ -111,46 +136,46 @@ function M() {
111
136
  }),
112
137
  /* @__PURE__ */ D("p", {
113
138
  className: "text-sm text-[var(--color-text-secondary)] mb-6",
114
- children: U?.message || "This inquiry may have been deleted or you don't have access."
139
+ children: G?.message || "This inquiry may have been deleted or you don't have access."
115
140
  }),
116
141
  /* @__PURE__ */ O("button", {
117
- onClick: () => x(`/support/inquiries${M}`),
118
- className: "inline-flex items-center gap-2 px-5 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all",
119
- children: [/* @__PURE__ */ D(c, { size: 16 }), "Back to Inquiries"]
142
+ onClick: () => y(`/support/inquiries${j}`),
143
+ className: "min-h-11 inline-flex items-center justify-center gap-2 px-5 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all",
144
+ children: [/* @__PURE__ */ D(u, { size: 16 }), "Back to Inquiries"]
120
145
  })
121
146
  ]
122
147
  })
123
148
  });
124
- let Q = k[Y.status] || k.NEW, $ = Q.icon;
149
+ let Q = k[X.status] || k.NEW, $ = Q.icon;
125
150
  return /* @__PURE__ */ O("div", {
126
- className: "p-6 animate-in fade-in duration-300",
151
+ className: "p-3 animate-in fade-in duration-300 sm:p-6",
127
152
  children: [
128
153
  /* @__PURE__ */ O("div", {
129
- className: "flex items-center justify-between mb-6",
154
+ className: "flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between",
130
155
  children: [/* @__PURE__ */ O("button", {
131
- onClick: () => x(`/support/inquiries${M}`),
132
- className: "inline-flex items-center gap-2 text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
133
- children: [/* @__PURE__ */ D(c, { size: 18 }), /* @__PURE__ */ D("span", {
156
+ onClick: () => y(`/support/inquiries${j}`),
157
+ className: "min-h-11 inline-flex items-center gap-2 text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
158
+ children: [/* @__PURE__ */ D(u, { size: 18 }), /* @__PURE__ */ D("span", {
134
159
  className: "text-sm font-medium",
135
160
  children: "Back to Inquiries"
136
161
  })]
137
162
  }), /* @__PURE__ */ O("div", {
138
163
  className: "flex items-center gap-2 text-xs text-[var(--color-text-secondary)]",
139
- children: [/* @__PURE__ */ D(f, { size: 12 }), j(Y.createdAt)]
164
+ children: [/* @__PURE__ */ D(f, { size: 12 }), oe(X.createdAt)]
140
165
  })]
141
166
  }),
142
- N && /* @__PURE__ */ O("div", {
167
+ se && /* @__PURE__ */ O("div", {
143
168
  className: "mb-5 p-3.5 bg-status-success-bg-subtle border border-border-subtle rounded-xl flex items-center gap-2.5 text-status-success-text text-sm font-medium animate-in slide-in-from-top-2 duration-300",
144
169
  children: [/* @__PURE__ */ D(d, { size: 18 }), "Status updated successfully"]
145
170
  }),
146
171
  /* @__PURE__ */ D("div", {
147
172
  className: `rounded-xl border p-6 mb-6 ${Q.bg}`,
148
173
  children: /* @__PURE__ */ D("div", {
149
- className: "flex items-start justify-between",
174
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
150
175
  children: /* @__PURE__ */ O("div", {
151
- className: "flex items-start gap-4",
176
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start",
152
177
  children: [/* @__PURE__ */ D("div", {
153
- className: "w-12 h-12 rounded-xl bg-white/80 dark:bg-white/10 flex items-center justify-center shadow-sm",
178
+ className: "w-12 h-12 rounded-xl bg-background/80 dark:bg-background/10 flex items-center justify-center shadow-sm",
154
179
  children: /* @__PURE__ */ D($, {
155
180
  size: 24,
156
181
  className: Q.color
@@ -159,18 +184,18 @@ function M() {
159
184
  className: "flex items-center gap-3 mb-1.5",
160
185
  children: /* @__PURE__ */ D("h1", {
161
186
  className: "text-xl font-bold text-[var(--color-text-primary)]",
162
- children: Y.subject
187
+ children: X.subject
163
188
  })
164
189
  }), /* @__PURE__ */ O("div", {
165
- className: "flex items-center gap-3 text-sm",
190
+ className: "flex flex-wrap items-center gap-3 text-sm",
166
191
  children: [/* @__PURE__ */ O("span", {
167
- className: `inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${Q.color} bg-white/60 dark:bg-white/10`,
192
+ className: `inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${Q.color} bg-background/60 dark:bg-background/10`,
168
193
  children: [/* @__PURE__ */ D($, { size: 12 }), Q.label]
169
194
  }), /* @__PURE__ */ O("span", {
170
195
  className: "text-[var(--color-text-secondary)]",
171
196
  children: ["from ", /* @__PURE__ */ D("strong", {
172
197
  className: "text-[var(--color-text-primary)]",
173
- children: Y.name
198
+ children: X.name
174
199
  })]
175
200
  })]
176
201
  })] })]
@@ -188,7 +213,7 @@ function M() {
188
213
  className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
189
214
  children: /* @__PURE__ */ O("h2", {
190
215
  className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
191
- children: [/* @__PURE__ */ D(C, { size: 14 }), "Contact Information"]
216
+ children: [/* @__PURE__ */ D(S, { size: 14 }), "Contact Information"]
192
217
  })
193
218
  }), /* @__PURE__ */ D("div", {
194
219
  className: "p-5",
@@ -199,7 +224,7 @@ function M() {
199
224
  className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
200
225
  children: [/* @__PURE__ */ D("div", {
201
226
  className: "w-9 h-9 rounded-lg bg-status-info-bg-subtle flex items-center justify-center",
202
- children: /* @__PURE__ */ D(C, {
227
+ children: /* @__PURE__ */ D(S, {
203
228
  size: 16,
204
229
  className: "text-accent-blue"
205
230
  })
@@ -208,14 +233,14 @@ function M() {
208
233
  children: "Name"
209
234
  }), /* @__PURE__ */ D("p", {
210
235
  className: "text-sm font-semibold text-[var(--color-text-primary)]",
211
- children: Y.name
236
+ children: X.name
212
237
  })] })]
213
238
  }),
214
239
  /* @__PURE__ */ O("div", {
215
240
  className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
216
241
  children: [/* @__PURE__ */ D("div", {
217
242
  className: "w-9 h-9 rounded-lg bg-accent-indigo-subtle flex items-center justify-center",
218
- children: /* @__PURE__ */ D(v, {
243
+ children: /* @__PURE__ */ D(_, {
219
244
  size: 16,
220
245
  className: "text-accent-indigo"
221
246
  })
@@ -227,14 +252,15 @@ function M() {
227
252
  }), /* @__PURE__ */ O("div", {
228
253
  className: "flex items-center gap-1.5",
229
254
  children: [/* @__PURE__ */ D("a", {
230
- href: `mailto:${Y.email}`,
255
+ href: `mailto:${X.email}`,
231
256
  className: "text-sm font-semibold text-[var(--color-text-link)] hover:underline truncate",
232
- children: Y.email
257
+ children: X.email
233
258
  }), /* @__PURE__ */ D("button", {
234
- onClick: Z,
235
- className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--color-bg-muted)] transition-colors",
259
+ onClick: de,
260
+ className: "min-h-11 min-w-11 flex-shrink-0 rounded hover:bg-[var(--color-bg-muted)] transition-colors",
236
261
  title: "Copy email",
237
- children: F ? /* @__PURE__ */ D(d, {
262
+ "aria-label": "Copy email",
263
+ children: ce ? /* @__PURE__ */ D(d, {
238
264
  size: 12,
239
265
  className: "text-status-success-text"
240
266
  }) : /* @__PURE__ */ D(p, {
@@ -245,11 +271,11 @@ function M() {
245
271
  })]
246
272
  })]
247
273
  }),
248
- Y.company && /* @__PURE__ */ O("div", {
274
+ X.company && /* @__PURE__ */ O("div", {
249
275
  className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
250
276
  children: [/* @__PURE__ */ D("div", {
251
277
  className: "w-9 h-9 rounded-lg bg-accent-purple-subtle flex items-center justify-center",
252
- children: /* @__PURE__ */ D(l, {
278
+ children: /* @__PURE__ */ D(te, {
253
279
  size: 16,
254
280
  className: "text-accent-purple"
255
281
  })
@@ -258,14 +284,46 @@ function M() {
258
284
  children: "Company"
259
285
  }), /* @__PURE__ */ D("p", {
260
286
  className: "text-sm font-semibold text-[var(--color-text-primary)]",
261
- children: Y.company
287
+ children: X.company
288
+ })] })]
289
+ }),
290
+ X.category && /* @__PURE__ */ O("div", {
291
+ className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
292
+ children: [/* @__PURE__ */ D("div", {
293
+ className: "w-9 h-9 rounded-lg bg-accent-blue-subtle flex items-center justify-center",
294
+ children: /* @__PURE__ */ D(b, {
295
+ size: 16,
296
+ className: "text-accent-blue"
297
+ })
298
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
299
+ className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
300
+ children: "Category"
301
+ }), /* @__PURE__ */ D("p", {
302
+ className: "text-sm font-semibold text-[var(--color-text-primary)]",
303
+ children: e(X.category)
304
+ })] })]
305
+ }),
306
+ X.productId && V && /* @__PURE__ */ O("div", {
307
+ className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
308
+ children: [/* @__PURE__ */ D("div", {
309
+ className: "w-9 h-9 rounded-lg bg-accent-purple-subtle flex items-center justify-center",
310
+ children: /* @__PURE__ */ D(ae, {
311
+ size: 16,
312
+ className: "text-accent-purple"
313
+ })
314
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
315
+ className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
316
+ children: "Product"
317
+ }), /* @__PURE__ */ D("p", {
318
+ className: "text-sm font-semibold text-[var(--color-text-primary)]",
319
+ children: V
262
320
  })] })]
263
321
  }),
264
322
  /* @__PURE__ */ O("div", {
265
323
  className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
266
324
  children: [/* @__PURE__ */ D("div", {
267
325
  className: "w-9 h-9 rounded-lg bg-status-success-bg-subtle flex items-center justify-center",
268
- children: /* @__PURE__ */ D(g, {
326
+ children: /* @__PURE__ */ D(re, {
269
327
  size: 16,
270
328
  className: "text-status-success-text"
271
329
  })
@@ -274,7 +332,7 @@ function M() {
274
332
  children: "Source"
275
333
  }), /* @__PURE__ */ D("p", {
276
334
  className: "text-sm font-semibold text-[var(--color-text-primary)] capitalize",
277
- children: Y.source.toLowerCase()
335
+ children: X.source.toLowerCase()
278
336
  })] })]
279
337
  })
280
338
  ]
@@ -287,17 +345,17 @@ function M() {
287
345
  className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
288
346
  children: /* @__PURE__ */ O("h2", {
289
347
  className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
290
- children: [/* @__PURE__ */ D(y, { size: 14 }), "Message"]
348
+ children: [/* @__PURE__ */ D(ie, { size: 14 }), "Message"]
291
349
  })
292
350
  }), /* @__PURE__ */ D("div", {
293
351
  className: "p-5",
294
352
  children: /* @__PURE__ */ D("p", {
295
353
  className: "text-sm text-[var(--color-text-primary)] leading-relaxed whitespace-pre-wrap",
296
- children: Y.message
354
+ children: X.message
297
355
  })
298
356
  })]
299
357
  }),
300
- Y.metadata && Object.keys(Y.metadata).length > 0 && /* @__PURE__ */ O("div", {
358
+ X.metadata && Object.keys(X.metadata).length > 0 && /* @__PURE__ */ O("div", {
301
359
  className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
302
360
  children: [/* @__PURE__ */ D("div", {
303
361
  className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
@@ -309,7 +367,7 @@ function M() {
309
367
  className: "p-5",
310
368
  children: /* @__PURE__ */ D("div", {
311
369
  className: "space-y-2.5",
312
- children: Object.entries(Y.metadata).map(([e, t]) => /* @__PURE__ */ O("div", {
370
+ children: Object.entries(X.metadata).map(([e, t]) => /* @__PURE__ */ O("div", {
313
371
  className: "flex items-start gap-3 py-1.5 border-b border-[var(--color-border-default)] last:border-0",
314
372
  children: [/* @__PURE__ */ D("span", {
315
373
  className: "text-xs font-medium text-[var(--color-text-secondary)] min-w-[120px] uppercase tracking-wider",
@@ -332,7 +390,7 @@ function M() {
332
390
  className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
333
391
  children: /* @__PURE__ */ O("h2", {
334
392
  className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
335
- children: [/* @__PURE__ */ D(u, { size: 14 }), "Timeline"]
393
+ children: [/* @__PURE__ */ D(ne, { size: 14 }), "Timeline"]
336
394
  })
337
395
  }), /* @__PURE__ */ O("div", {
338
396
  className: "p-5 space-y-4",
@@ -344,27 +402,27 @@ function M() {
344
402
  children: "Submitted"
345
403
  }), /* @__PURE__ */ D("p", {
346
404
  className: "text-[11px] text-[var(--color-text-secondary)]",
347
- children: A(Y.createdAt)
405
+ children: A(X.createdAt)
348
406
  })] })]
349
407
  }),
350
- Y.updatedAt !== Y.createdAt && /* @__PURE__ */ O("div", {
408
+ X.updatedAt !== X.createdAt && /* @__PURE__ */ O("div", {
351
409
  className: "flex items-start gap-3",
352
410
  children: [/* @__PURE__ */ D("div", { className: "w-2 h-2 rounded-full bg-status-warning-bg mt-1.5 flex-shrink-0" }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
353
411
  className: "text-xs font-medium text-[var(--color-text-primary)]",
354
412
  children: "Last Updated"
355
413
  }), /* @__PURE__ */ D("p", {
356
414
  className: "text-[11px] text-[var(--color-text-secondary)]",
357
- children: A(Y.updatedAt)
415
+ children: A(X.updatedAt)
358
416
  })] })]
359
417
  }),
360
- Y.convertedTicketId && /* @__PURE__ */ O("div", {
418
+ X.convertedTicketId && /* @__PURE__ */ O("div", {
361
419
  className: "flex items-start gap-3",
362
420
  children: [/* @__PURE__ */ D("div", { className: "w-2 h-2 rounded-full bg-status-success-bg mt-1.5 flex-shrink-0" }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
363
421
  className: "text-xs font-medium text-[var(--color-text-primary)]",
364
422
  children: "Converted to Ticket"
365
423
  }), /* @__PURE__ */ D("p", {
366
424
  className: "text-[11px] font-mono text-[var(--color-text-secondary)]",
367
- children: Y.convertedTicketId
425
+ children: X.convertedTicketId
368
426
  })] })]
369
427
  })
370
428
  ]
@@ -376,31 +434,31 @@ function M() {
376
434
  className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
377
435
  children: /* @__PURE__ */ O("h2", {
378
436
  className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-1.5",
379
- children: [/* @__PURE__ */ D(b, { size: 12 }), "Reply"]
437
+ children: [/* @__PURE__ */ D(v, { size: 12 }), "Reply"]
380
438
  })
381
439
  }), /* @__PURE__ */ O("div", {
382
440
  className: "p-5",
383
441
  children: [
384
- z && /* @__PURE__ */ O("div", {
442
+ I && /* @__PURE__ */ O("div", {
385
443
  className: "mb-3 p-2.5 rounded-lg bg-status-success-bg-subtle border border-border-subtle text-sm text-status-success-text flex items-center gap-2",
386
444
  children: [/* @__PURE__ */ D(d, { size: 14 }), "Reply sent successfully!"]
387
445
  }),
388
446
  /* @__PURE__ */ D("textarea", {
389
- value: L,
390
- onChange: (e) => R(e.target.value),
447
+ value: P,
448
+ onChange: (e) => F(e.target.value),
391
449
  placeholder: "Type your reply... This will be sent as a branded email to the contact.",
392
450
  rows: 4,
393
- disabled: q,
451
+ disabled: J,
394
452
  className: "w-full px-3 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-lg text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-secondary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-accent)]/50 disabled:opacity-50 resize-none transition-all"
395
453
  }),
396
454
  /* @__PURE__ */ O("button", {
397
- onClick: J,
398
- disabled: q || !L.trim(),
399
- className: "mt-2 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
400
- children: [q ? /* @__PURE__ */ D(_, {
455
+ onClick: Y,
456
+ disabled: J || !P.trim(),
457
+ className: "mt-2 min-h-11 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
458
+ children: [J ? /* @__PURE__ */ D(g, {
401
459
  size: 15,
402
460
  className: "animate-spin"
403
- }) : /* @__PURE__ */ D(b, { size: 15 }), "Send Reply"]
461
+ }) : /* @__PURE__ */ D(v, { size: 15 }), "Send Reply"]
404
462
  })
405
463
  ]
406
464
  })]
@@ -419,9 +477,9 @@ function M() {
419
477
  className: "block text-xs font-medium text-[var(--color-text-secondary)] mb-1.5",
420
478
  children: "Status"
421
479
  }), /* @__PURE__ */ O("select", {
422
- value: Y.status,
423
- onChange: (e) => X(e.target.value),
424
- disabled: G,
480
+ value: X.status,
481
+ onChange: (e) => Z(e.target.value),
482
+ disabled: q,
425
483
  className: "w-full px-3 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-lg text-sm text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-accent)]/50 disabled:opacity-50 transition-all",
426
484
  children: [
427
485
  /* @__PURE__ */ D("option", {
@@ -448,22 +506,22 @@ function M() {
448
506
  })] }), /* @__PURE__ */ O("div", {
449
507
  className: "space-y-2",
450
508
  children: [
451
- Y.status !== "CONVERTED" && /* @__PURE__ */ O("button", {
452
- onClick: () => X("CONVERTED"),
453
- disabled: G,
454
- className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
455
- children: [/* @__PURE__ */ D(S, { size: 15 }), "Convert to Ticket"]
509
+ X.status !== "CONVERTED" && /* @__PURE__ */ O("button", {
510
+ onClick: () => Z("CONVERTED"),
511
+ disabled: q,
512
+ className: "min-h-11 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
513
+ children: [/* @__PURE__ */ D(x, { size: 15 }), "Convert to Ticket"]
456
514
  }),
457
515
  /* @__PURE__ */ O("a", {
458
- href: `mailto:${Y.email}?subject=Re: ${encodeURIComponent(Y.subject)}`,
459
- className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-primary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all",
460
- children: [/* @__PURE__ */ D(v, { size: 15 }), "Reply via Email"]
516
+ href: `mailto:${X.email}?subject=Re: ${encodeURIComponent(X.subject)}`,
517
+ className: "min-h-11 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-primary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all",
518
+ children: [/* @__PURE__ */ D(_, { size: 15 }), "Reply via Email"]
461
519
  }),
462
- Y.status !== "ARCHIVED" && Y.status !== "SPAM" && /* @__PURE__ */ O("button", {
463
- onClick: () => X("ARCHIVED"),
464
- disabled: G,
465
- className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-secondary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all disabled:opacity-50",
466
- children: [/* @__PURE__ */ D(s, { size: 15 }), "Archive"]
520
+ X.status !== "ARCHIVED" && X.status !== "SPAM" && /* @__PURE__ */ O("button", {
521
+ onClick: () => Z("ARCHIVED"),
522
+ disabled: q,
523
+ className: "min-h-11 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-secondary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all disabled:opacity-50",
524
+ children: [/* @__PURE__ */ D(l, { size: 15 }), "Archive"]
467
525
  })
468
526
  ]
469
527
  })]
@@ -476,6 +534,6 @@ function M() {
476
534
  });
477
535
  }
478
536
  //#endregion
479
- export { M as ContactInquiryDetailPage };
537
+ export { j as ContactInquiryDetailPage };
480
538
 
481
539
  //# sourceMappingURL=ContactInquiryDetailPage.js.map