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