@burdenoff/microfe-support 2026.1109.1 → 2026.1115.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 (117) hide show
  1. package/dist/generated/global-operations.d.ts +62 -0
  2. package/dist/generated/global-operations.js +104 -69
  3. package/dist/generated/global-operations.js.map +1 -1
  4. package/dist/generated/global-types.js +17 -15
  5. package/dist/generated/global-types.js.map +1 -1
  6. package/dist/support/SupportUserRoot.js +32 -28
  7. package/dist/support/SupportUserRoot.js.map +1 -1
  8. package/dist/support/SupportUserRoutes.d.ts +1 -0
  9. package/dist/support/SupportUserRoutes.js +31 -28
  10. package/dist/support/SupportUserRoutes.js.map +1 -1
  11. package/dist/support/components/PageLayout.js +35 -35
  12. package/dist/support/components/RouteHelpers.d.ts +2 -1
  13. package/dist/support/components/RouteHelpers.js +3 -3
  14. package/dist/support/components/RouteHelpers.js.map +1 -1
  15. package/dist/support/components/help/RelatedArticles.d.ts +12 -0
  16. package/dist/support/components/help/RelatedArticles.js +55 -0
  17. package/dist/support/components/help/RelatedArticles.js.map +1 -0
  18. package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
  19. package/dist/support/components/help/RequestDetailHeader.js +129 -0
  20. package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
  21. package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
  22. package/dist/support/components/help/SatisfactionReview.js +103 -0
  23. package/dist/support/components/help/SatisfactionReview.js.map +1 -0
  24. package/dist/support/components/help/StarRating.d.ts +16 -0
  25. package/dist/support/components/help/StarRating.js +63 -0
  26. package/dist/support/components/help/StarRating.js.map +1 -0
  27. package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
  28. package/dist/support/components/help/StatusGroupPill.js +19 -0
  29. package/dist/support/components/help/StatusGroupPill.js.map +1 -0
  30. package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
  31. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  32. package/dist/support/components/tickets/MessageComposer.js +7 -7
  33. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  34. package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
  35. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  36. package/dist/support/components/ui.js +1 -1
  37. package/dist/support/constants.d.ts +23 -0
  38. package/dist/support/constants.js +2 -2
  39. package/dist/support/constants.js.map +1 -1
  40. package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
  41. package/dist/support/hooks/useDebouncedValue.js +12 -0
  42. package/dist/support/hooks/useDebouncedValue.js.map +1 -0
  43. package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
  44. package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
  45. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  46. package/dist/support/hooks/useSupportVariant.d.ts +11 -0
  47. package/dist/support/hooks/useSupportVariant.js +11 -0
  48. package/dist/support/hooks/useSupportVariant.js.map +1 -0
  49. package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
  50. package/dist/support/hooks/useTicketCreatedToast.js +25 -0
  51. package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
  52. package/dist/support/hooks/useTicketLabels.d.ts +22 -0
  53. package/dist/support/hooks/useTicketLabels.js +40 -0
  54. package/dist/support/hooks/useTicketLabels.js.map +1 -0
  55. package/dist/support/index.d.ts +1 -1
  56. package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
  57. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  58. package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
  59. package/dist/support/pages/ArticleDetailUserPage.js +133 -69
  60. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  61. package/dist/support/pages/AskForHelpPage.d.ts +11 -0
  62. package/dist/support/pages/AskForHelpPage.js +396 -0
  63. package/dist/support/pages/AskForHelpPage.js.map +1 -0
  64. package/dist/support/pages/ContactInquiriesPage.js +73 -73
  65. package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
  66. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  67. package/dist/support/pages/CreateTicketPage.d.ts +4 -0
  68. package/dist/support/pages/CreateTicketPage.js +121 -117
  69. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  70. package/dist/support/pages/HelpHubPage.d.ts +9 -0
  71. package/dist/support/pages/HelpHubPage.js +272 -0
  72. package/dist/support/pages/HelpHubPage.js.map +1 -0
  73. package/dist/support/pages/JobApplicationDetailPage.js +388 -388
  74. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  75. package/dist/support/pages/JobApplicationsPage.js +35 -35
  76. package/dist/support/pages/JobPostingDetailPage.js +236 -236
  77. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  78. package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
  79. package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
  80. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  81. package/dist/support/pages/MyRequestsPage.d.ts +16 -0
  82. package/dist/support/pages/MyRequestsPage.js +389 -0
  83. package/dist/support/pages/MyRequestsPage.js.map +1 -0
  84. package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
  85. package/dist/support/pages/TicketDetailUserPage.js +285 -192
  86. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  87. package/dist/support/pages/TicketListPage.d.ts +7 -0
  88. package/dist/support/pages/TicketListPage.js +150 -153
  89. package/dist/support/pages/TicketListPage.js.map +1 -1
  90. package/dist/support/providers/SupportProvider.js +8 -7
  91. package/dist/support/providers/SupportProvider.js.map +1 -1
  92. package/dist/support/store/supportStore.d.ts +5 -0
  93. package/dist/support/store/supportStore.js +1 -0
  94. package/dist/support/store/supportStore.js.map +1 -1
  95. package/dist/support/translations/en.d.ts +279 -0
  96. package/dist/support/translations/en.js +270 -1
  97. package/dist/support/translations/en.js.map +1 -1
  98. package/dist/support/types/index.d.ts +13 -0
  99. package/dist/support/utils/cameFrom.d.ts +16 -0
  100. package/dist/support/utils/cameFrom.js +22 -0
  101. package/dist/support/utils/cameFrom.js.map +1 -0
  102. package/dist/support/utils/dates.d.ts +15 -0
  103. package/dist/support/utils/dates.js +35 -0
  104. package/dist/support/utils/dates.js.map +1 -0
  105. package/dist/support/utils/reopen.d.ts +27 -0
  106. package/dist/support/utils/reopen.js +27 -0
  107. package/dist/support/utils/reopen.js.map +1 -0
  108. package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
  109. package/dist/support/utils/requestTechnicalDetails.js +38 -0
  110. package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
  111. package/dist/support/utils/ticketFilters.d.ts +16 -0
  112. package/dist/support/utils/ticketFilters.js +24 -12
  113. package/dist/support/utils/ticketFilters.js.map +1 -1
  114. package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
  115. package/dist/support/utils/ticketStatusGroups.js +39 -0
  116. package/dist/support/utils/ticketStatusGroups.js.map +1 -0
  117. package/package.json +2 -2
@@ -2,339 +2,432 @@ import { Button as e, EmphasisPanel as t, NextSteps as n } from "../components/u
2
2
  import { useTicketOperations as r } from "../hooks/useTicketOperations.js";
3
3
  import { useTr as i } from "../hooks/useTr.js";
4
4
  import { useNotification as ee } from "../hooks/useNotification.js";
5
- import { useAttachmentsFailedToast as a } from "../hooks/useAttachmentsFailedToast.js";
5
+ import { useAttachmentsFailedToast as te } from "../hooks/useAttachmentsFailedToast.js";
6
+ import { useTicketCreatedToast as ne } from "../hooks/useTicketCreatedToast.js";
7
+ import { useIsFluidgridsVariant as re } from "../hooks/useSupportVariant.js";
8
+ import { useTicketLabels as ie } from "../hooks/useTicketLabels.js";
9
+ import { RequestDetailHeader as ae } from "../components/help/RequestDetailHeader.js";
10
+ import { SatisfactionReview as a } from "../components/help/SatisfactionReview.js";
11
+ import { canReopenTicket as oe, isReopenBlockedByLimit as se, isReopenableStatus as ce } from "../utils/reopen.js";
12
+ import { buildRequestTechnicalDetails as le } from "../utils/requestTechnicalDetails.js";
6
13
  import { TicketSidebar as o } from "../components/tickets/TicketSidebar.js";
7
- import { MessageThread as te } from "../components/tickets/MessageThread.js";
8
- import { MessageComposer as ne } from "../components/tickets/MessageComposer.js";
9
- import { AttachmentList as re } from "../components/tickets/AttachmentList.js";
10
- import { MarkdownContent as s } from "../components/tickets/MarkdownContent.js";
11
- import { NotificationToast as c } from "../components/NotificationToast.js";
12
- import { EmptyState as l, LoadingState as u, PageLayout as d } from "../components/PageLayout.js";
13
- import { FeedbackCategory as f, MessageType as ie, SupportTicketStatus as p } from "../../generated/global-types.js";
14
- import { TicketDetailHeader as m } from "../components/tickets/TicketDetailHeader.js";
15
- import { useSupport as h } from "../providers/SupportProvider.js";
16
- import { joinPath as g } from "../utils/index.js";
17
- import { extractErrorCode as ae, extractErrorMessage as _ } from "../utils/errors.js";
18
- import { uploadSupportAttachmentFiles as v } from "../utils/supportFiles.js";
19
- import { useCallback as oe, useEffect as y, useRef as se, useState as b } from "react";
20
- import { AlertCircle as x, ArrowLeft as S } from "lucide-react";
21
- import { useNavigate as ce, useParams as le } from "react-router";
22
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
23
- import { useShellUi as ue } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
14
+ import { MessageThread as s } from "../components/tickets/MessageThread.js";
15
+ import { MessageComposer as c } from "../components/tickets/MessageComposer.js";
16
+ import { AttachmentList as ue } from "../components/tickets/AttachmentList.js";
17
+ import { MarkdownContent as de } from "../components/tickets/MarkdownContent.js";
18
+ import { NotificationToast as l } from "../components/NotificationToast.js";
19
+ import { EmptyState as u, LoadingState as fe, PageLayout as d } from "../components/PageLayout.js";
20
+ import { FeedbackCategory as f, MessageType as pe, SupportTicketStatus as p } from "../../generated/global-types.js";
21
+ import { TicketDetailHeader as me } from "../components/tickets/TicketDetailHeader.js";
22
+ import { useSupport as he } from "../providers/SupportProvider.js";
23
+ import { joinPath as m } from "../utils/index.js";
24
+ import { extractErrorCode as ge, extractErrorMessage as h } from "../utils/errors.js";
25
+ import { uploadSupportAttachmentFiles as _e } from "../utils/supportFiles.js";
26
+ import { useCallback as ve, useEffect as g, useRef as ye, useState as _ } from "react";
27
+ import { ShowTechnicalDetails as be } from "@burdenoff/fe-libs/ui";
28
+ import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
29
+ import { AlertCircle as Se, ArrowLeft as v, BookOpen as Ce, MessageCircleQuestion as we } from "lucide-react";
30
+ import { Link as y, useNavigate as Te, useParams as Ee } from "react-router";
31
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
32
+ import { useShellUi as De } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
24
33
  // src/support/pages/TicketDetailUserPage.tsx
25
- function T() {
26
- let { ticketId: T } = le(), E = ce(), { currentUser: D, basePath: O = "" } = h(), { footerVisible: k, setFooterVisible: A } = ue(), j = se(k), M = i(), { ticketDetail: N, ticketDetailLoading: P, ticketDetailError: F, addTicketMessage: I, addMessageLoading: L, changeStatusLoading: R, changeTicketStatus: z, submitSatisfactionSurvey: B, submitSurveyLoading: V, setSelectedTicket: H } = r({ ticketId: T }), [U, W] = b(""), [G, K] = b(""), [q, J] = b(""), { notification: de, notify: Y } = ee();
27
- a(Y), y(() => (T && H({ id: T }), () => {
28
- H(null);
29
- }), [T, H]), y(() => (A(!1), () => {
30
- A(j.current);
31
- }), [A]);
32
- let X = () => {
33
- H(null), E("..");
34
- }, Z = oe(() => {
35
- E(g(O, "tickets/new"));
36
- }, [O, E]), fe = async (e, t, n) => {
37
- if (!T) return;
34
+ function S() {
35
+ let { ticketId: S } = Ee(), C = Te(), { currentUser: w, basePath: T = "" } = he(), { footerVisible: E, setFooterVisible: D } = De(), Oe = ye(E), O = i(), { locale: k } = xe(), A = re(), ke = ie(), { ticketDetail: j, ticketDetailLoading: Ae, ticketDetailError: M, addTicketMessage: je, addMessageLoading: N, changeStatusLoading: P, changeTicketStatus: Me, submitSatisfactionSurvey: F, submitSurveyLoading: I, setSelectedTicket: L } = r({ ticketId: S }), [R, z] = _(""), [B, V] = _(""), [H, U] = _(""), { notification: W, notify: G } = ee();
36
+ te(G), ne(G, O("support.requestDetail.notifications.created", "Your request is sent. We'll reply here.")), g(() => (S && L({ id: S }), () => {
37
+ L(null);
38
+ }), [S, L]), g(() => (D(!1), () => {
39
+ D(Oe.current);
40
+ }), [D]);
41
+ let K = () => {
42
+ L(null), C(A ? m(T, "tickets") : "..");
43
+ }, q = A ? O("support.requestDetail.actions.back", "My support requests") : O("support.ticketDetail.actions.back", "Back to Tickets"), J = ve(() => {
44
+ C(m(T, "tickets/new"));
45
+ }, [T, C]), Y = async (e, t, n) => {
46
+ if (!S) return;
38
47
  if (!e.trim() && n.length === 0) {
39
- Y("error", M("support.ticketDetail.errors.nothingToSend", "Nothing to send."), 6e3);
48
+ G("error", O("support.ticketDetail.errors.nothingToSend", "Nothing to send."), 6e3);
40
49
  return;
41
50
  }
42
51
  let r, i = null;
43
- if (n.length > 0 && N?.ticketNumber) try {
44
- r = (await v({
45
- ticketId: T,
52
+ if (n.length > 0 && j?.ticketNumber) try {
53
+ r = (await _e({
54
+ ticketId: S,
46
55
  files: n
47
56
  })).files.map((e) => e.id);
48
57
  } catch (e) {
49
- i = _(e, M("support.ticketDetail.errors.uploadAttachments", "Failed to upload attachments."));
58
+ i = h(e, O("support.ticketDetail.errors.uploadAttachments", "Failed to upload attachments."));
50
59
  }
51
60
  if (!e.trim() && !r?.length) {
52
- let e = i ? M("support.ticketDetail.errors.attachmentUploadFailed", "Attachment upload failed: {{message}}", { message: i }) : M("support.ticketDetail.errors.nothingToSend", "Nothing to send.");
53
- return Y("error", e, 6e3), n.length > 0 ? { preserveAttachedFiles: !0 } : void 0;
61
+ let e = i ? O("support.ticketDetail.errors.attachmentUploadFailed", "Attachment upload failed: {{message}}", { message: i }) : O("support.ticketDetail.errors.nothingToSend", "Nothing to send.");
62
+ return G("error", e, 6e3), n.length > 0 ? { preserveAttachedFiles: !0 } : void 0;
54
63
  }
55
64
  try {
56
- if (await I({
57
- ticketId: T,
65
+ if (await je({
66
+ ticketId: S,
58
67
  message: e,
59
- type: ie.CustomerReply,
68
+ type: pe.CustomerReply,
60
69
  attachments: r
61
- }), i) return Y("error", M("support.ticketDetail.errors.messageSentAttachmentsFailed", "Message sent, but attachments failed: {{message}}", { message: i }), 6e3), { preserveAttachedFiles: n.length > 0 };
70
+ }), i) return G("error", O("support.ticketDetail.errors.messageSentAttachmentsFailed", "Message sent, but attachments failed: {{message}}", { message: i }), 6e3), { preserveAttachedFiles: n.length > 0 };
62
71
  } catch (e) {
63
- return console.error("[support] addTicketMessage failed", e), Y("error", _(e, M("support.ticketDetail.errors.sendMessage", "Failed to send message.")), 6e3), {
72
+ return console.error("[support] addTicketMessage failed", e), G("error", h(e, O("support.ticketDetail.errors.sendMessage", "Failed to send message.")), 6e3), {
64
73
  preserveMessage: !0,
65
74
  preserveAttachedFiles: n.length > 0
66
75
  };
67
76
  }
68
- }, Q = async () => {
69
- if (T) try {
70
- await z(T, p.Reopened), Y("success", M("support.ticketDetail.notifications.reopened", "Ticket reopened."));
77
+ }, X = async () => {
78
+ if (S) try {
79
+ await Me(S, p.Reopened), G("success", O("support.ticketDetail.notifications.reopened", "Ticket reopened."));
71
80
  } catch (e) {
72
- let t = ae(e), n = _(e, M("support.ticketDetail.errors.reopenFailed", "Failed to reopen ticket."));
73
- t === "REOPEN_LIMIT_REACHED" || /REOPEN_LIMIT_REACHED|maximum.*reopen/i.test(n) ? Y("error", M("support.ticketDetail.errors.reopenLimit", "You have reached the maximum number of reopens for this ticket. Please create a new ticket to continue."), 8e3) : Y("error", n, 6e3);
81
+ let t = ge(e), n = h(e, O("support.ticketDetail.errors.reopenFailed", "Failed to reopen ticket."));
82
+ t === "REOPEN_LIMIT_REACHED" || /REOPEN_LIMIT_REACHED|maximum.*reopen/i.test(n) ? G("error", O("support.ticketDetail.errors.reopenLimit", "You have reached the maximum number of reopens for this ticket. Please create a new ticket to continue."), 8e3) : G("error", n, 6e3);
74
83
  }
75
- }, $ = N?.surveys?.[0] ?? null, pe = N?.status === p.Closed && $ && !$.submittedAt, me = async () => {
76
- if ($ && U) try {
77
- await B({
78
- surveyId: $.id,
79
- rating: Number(U),
80
- feedbackType: G || void 0,
81
- comment: q || void 0
82
- }), W(""), K(""), J(""), Y("success", M("support.ticketDetail.notifications.reviewSubmitted", "Thanks for your feedback!"));
84
+ }, Z = j?.surveys?.[0] ?? null, Q = (j ? A ? ce(j.status) : j.status === p.Closed : !1) && Z && !Z.submittedAt, Ne = async (e) => {
85
+ if (!Z) return !1;
86
+ try {
87
+ return await F({
88
+ surveyId: Z.id,
89
+ rating: e.rating,
90
+ feedbackType: e.feedbackType,
91
+ comment: e.comment
92
+ }), G("success", O("support.ticketDetail.notifications.reviewSubmitted", "Thanks for your feedback!")), !0;
93
+ } catch (e) {
94
+ return G("error", h(e, O("support.ticketDetail.errors.reviewSubmitFailed", "Failed to submit review.")), 6e3), !1;
95
+ }
96
+ }, Pe = async () => {
97
+ if (Z && R) try {
98
+ await F({
99
+ surveyId: Z.id,
100
+ rating: Number(R),
101
+ feedbackType: B || void 0,
102
+ comment: H || void 0
103
+ }), z(""), V(""), U(""), G("success", O("support.ticketDetail.notifications.reviewSubmitted", "Thanks for your feedback!"));
83
104
  } catch (e) {
84
- Y("error", _(e, M("support.ticketDetail.errors.reviewSubmitFailed", "Failed to submit review.")), 6e3);
105
+ G("error", h(e, O("support.ticketDetail.errors.reviewSubmitFailed", "Failed to submit review.")), 6e3);
85
106
  }
86
107
  };
87
- return P && !N ? /* @__PURE__ */ C(d, {
108
+ if (Ae && !j) return /* @__PURE__ */ b(d, {
88
109
  showHeader: !1,
89
- children: /* @__PURE__ */ C(u, { message: M("support.ticketDetail.loading", "Loading ticket details...") })
90
- }) : F ? /* @__PURE__ */ C(d, {
110
+ children: /* @__PURE__ */ b(fe, { message: O("support.ticketDetail.loading", "Loading ticket details...") })
111
+ });
112
+ if (M) return /* @__PURE__ */ b(d, {
91
113
  showHeader: !1,
92
- children: /* @__PURE__ */ w("div", {
114
+ children: /* @__PURE__ */ x("div", {
93
115
  className: "flex flex-col items-center justify-center py-16 text-center",
94
116
  children: [
95
- /* @__PURE__ */ C("div", {
117
+ /* @__PURE__ */ b("div", {
96
118
  className: "p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4",
97
- children: /* @__PURE__ */ C(x, { size: 48 })
119
+ children: /* @__PURE__ */ b(Se, { size: 48 })
98
120
  }),
99
- /* @__PURE__ */ C("h3", {
121
+ /* @__PURE__ */ b("h3", {
100
122
  className: "text-lg font-semibold text-text-primary mb-2",
101
- children: M("support.ticketDetail.error.title", "Failed to load ticket")
123
+ children: O("support.ticketDetail.error.title", "Failed to load ticket")
102
124
  }),
103
- /* @__PURE__ */ C("p", {
125
+ /* @__PURE__ */ b("p", {
104
126
  className: "text-sm text-text-secondary max-w-md mb-4",
105
- children: F.message || M("support.ticketDetail.error.description", "An error occurred while loading the ticket. Please try again.")
127
+ children: M.message || O("support.ticketDetail.error.description", "An error occurred while loading the ticket. Please try again.")
106
128
  }),
107
- /* @__PURE__ */ w(e, {
108
- onClick: X,
109
- children: [/* @__PURE__ */ C(S, { size: 18 }), M("support.ticketDetail.actions.back", "Back to Tickets")]
129
+ /* @__PURE__ */ x(e, {
130
+ onClick: K,
131
+ children: [/* @__PURE__ */ b(v, { size: 18 }), q]
110
132
  })
111
133
  ]
112
134
  })
113
- }) : N ? /* @__PURE__ */ w("div", {
135
+ });
136
+ if (!j) return /* @__PURE__ */ b(d, {
137
+ showHeader: !1,
138
+ children: /* @__PURE__ */ b(u, {
139
+ illustration: "empty-search",
140
+ title: O("support.ticketDetail.notFound.title", "Ticket not found"),
141
+ description: O("support.ticketDetail.notFound.description", "The ticket you're looking for doesn't exist or has been deleted."),
142
+ action: /* @__PURE__ */ x(e, {
143
+ onClick: K,
144
+ children: [/* @__PURE__ */ b(v, { size: 18 }), q]
145
+ })
146
+ })
147
+ });
148
+ let $ = /* @__PURE__ */ x("div", {
149
+ "data-tour": "support-ticket-description-panel",
150
+ className: "shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6",
151
+ children: [
152
+ /* @__PURE__ */ b("h2", {
153
+ className: "text-lg font-semibold mb-2 text-text-primary",
154
+ children: O("support.ticketDetail.descriptionHeading", "Description")
155
+ }),
156
+ /* @__PURE__ */ b(de, {
157
+ content: j.description,
158
+ className: "text-sm"
159
+ }),
160
+ /* @__PURE__ */ b(ue, {
161
+ ticketId: j.id,
162
+ fileIds: j.metadata?.initialAttachmentIds ?? []
163
+ })
164
+ ]
165
+ });
166
+ return A ? /* @__PURE__ */ x("div", {
114
167
  className: "flex h-full min-h-0 flex-col bg-bg-surface",
115
168
  children: [
116
- /* @__PURE__ */ C(c, { notification: de }),
117
- /* @__PURE__ */ C(m, {
118
- ticket: N,
119
- onBack: X,
120
- onReopenTicket: Q,
121
- onCreateNewTicket: Z,
122
- actionsDisabled: R
169
+ /* @__PURE__ */ b(l, { notification: W }),
170
+ /* @__PURE__ */ b(ae, {
171
+ ticket: j,
172
+ onBack: K,
173
+ onReopenTicket: X,
174
+ onAskForHelp: J,
175
+ actionsDisabled: P
123
176
  }),
124
- /* @__PURE__ */ w("div", {
177
+ /* @__PURE__ */ x("div", {
178
+ className: "flex min-h-0 flex-1 flex-col overflow-hidden",
179
+ children: [
180
+ $,
181
+ /* @__PURE__ */ x("div", {
182
+ "data-tour": "support-ticket-conversation",
183
+ className: "min-h-0 flex-1 overflow-y-auto p-4 sm:p-6",
184
+ children: [
185
+ /* @__PURE__ */ b("h2", {
186
+ className: "text-lg font-semibold mb-4 text-text-primary",
187
+ children: O("support.ticketDetail.conversationTitle", "Conversation")
188
+ }),
189
+ /* @__PURE__ */ b(s, {
190
+ ticketId: j.id,
191
+ messages: j.messages || [],
192
+ currentUserId: w?.id
193
+ }),
194
+ Q && /* @__PURE__ */ b(a, {
195
+ submitting: I,
196
+ onSubmit: Ne
197
+ }),
198
+ /* @__PURE__ */ x("div", {
199
+ className: "mt-6 space-y-2 border-t border-border-subtle pt-4",
200
+ children: [/* @__PURE__ */ x("div", {
201
+ className: "flex flex-wrap items-center gap-x-6",
202
+ children: [/* @__PURE__ */ x(y, {
203
+ to: m(T, "kb"),
204
+ className: "inline-flex min-h-11 items-center gap-2 text-sm font-medium text-primary underline-offset-4 hover:underline",
205
+ children: [/* @__PURE__ */ b(Ce, {
206
+ size: 16,
207
+ "aria-hidden": "true"
208
+ }), O("support.requestDetail.browseHelpArticles", "Still stuck? Browse help articles")]
209
+ }), !se(j) && /* @__PURE__ */ x(y, {
210
+ "data-tour": "support-ticket-new-request",
211
+ to: m(T, "tickets/new"),
212
+ className: "inline-flex min-h-11 items-center gap-2 text-sm font-medium text-primary underline-offset-4 hover:underline",
213
+ children: [/* @__PURE__ */ b(we, {
214
+ size: 16,
215
+ "aria-hidden": "true"
216
+ }), O("support.ticketDetail.userNextSteps.newTicket.label", "Open a new ticket")]
217
+ })]
218
+ }), /* @__PURE__ */ b(be, {
219
+ copyable: !0,
220
+ children: le(j, O, ke.priority, k)
221
+ })]
222
+ })
223
+ ]
224
+ }),
225
+ /* @__PURE__ */ b(c, {
226
+ ticketId: j.id,
227
+ onSendMessage: Y,
228
+ disabled: N,
229
+ allowInternalNotes: !1
230
+ })
231
+ ]
232
+ })
233
+ ]
234
+ }) : /* @__PURE__ */ x("div", {
235
+ className: "flex h-full min-h-0 flex-col bg-bg-surface",
236
+ children: [
237
+ /* @__PURE__ */ b(l, { notification: W }),
238
+ /* @__PURE__ */ b(me, {
239
+ ticket: j,
240
+ onBack: K,
241
+ onReopenTicket: X,
242
+ onCreateNewTicket: J,
243
+ actionsDisabled: P
244
+ }),
245
+ /* @__PURE__ */ x("div", {
125
246
  className: "flex min-h-0 flex-1 overflow-hidden",
126
- children: [/* @__PURE__ */ w("div", {
247
+ children: [/* @__PURE__ */ x("div", {
127
248
  className: "flex min-h-0 flex-1 flex-col overflow-hidden",
128
249
  children: [
129
- /* @__PURE__ */ w("div", {
130
- "data-tour": "support-ticket-description-panel",
131
- className: "shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6",
132
- children: [
133
- /* @__PURE__ */ C("h2", {
134
- className: "text-lg font-semibold mb-2 text-text-primary",
135
- children: M("support.ticketDetail.descriptionHeading", "Description")
136
- }),
137
- /* @__PURE__ */ C(s, {
138
- content: N.description,
139
- className: "text-sm"
140
- }),
141
- /* @__PURE__ */ C(re, {
142
- ticketId: N.id,
143
- fileIds: N.metadata?.initialAttachmentIds ?? []
144
- })
145
- ]
146
- }),
147
- /* @__PURE__ */ w("div", {
250
+ $,
251
+ /* @__PURE__ */ x("div", {
148
252
  "data-tour": "support-ticket-conversation",
149
253
  className: "min-h-0 flex-1 overflow-y-auto p-4 sm:p-6",
150
254
  children: [
151
- /* @__PURE__ */ C(n, {
255
+ /* @__PURE__ */ b(n, {
152
256
  storageKey: "support-ticket-detail-user",
153
- title: M("support.ticketDetail.userNextSteps.title", "Quick actions"),
257
+ title: O("support.ticketDetail.userNextSteps.title", "Quick actions"),
154
258
  className: "mb-6",
155
259
  steps: [
156
260
  {
157
261
  id: "reply",
158
- label: M("support.ticketDetail.userNextSteps.reply.label", "Reply to the conversation"),
159
- description: M("support.ticketDetail.userNextSteps.reply.description", "Add details or answer a question from our support team."),
262
+ label: O("support.ticketDetail.userNextSteps.reply.label", "Reply to the conversation"),
263
+ description: O("support.ticketDetail.userNextSteps.reply.description", "Add details or answer a question from our support team."),
160
264
  onClick: () => document.querySelector("[data-tour=\"support-ticket-conversation\"]")?.scrollTo({
161
265
  top: 999999,
162
266
  behavior: "smooth"
163
267
  })
164
268
  },
165
- ...N.status === p.Closed ? [{
269
+ ...oe(j) ? [{
166
270
  id: "reopen",
167
- label: M("support.ticketDetail.userNextSteps.reopen.label", "Reopen this ticket"),
168
- description: M("support.ticketDetail.userNextSteps.reopen.description", "Still stuck? Reopen to continue the conversation."),
169
- onClick: () => void Q()
271
+ label: O("support.ticketDetail.userNextSteps.reopen.label", "Reopen this ticket"),
272
+ description: O("support.ticketDetail.userNextSteps.reopen.description", "Still stuck? Reopen to continue the conversation."),
273
+ onClick: () => void X()
170
274
  }] : [],
171
275
  {
172
276
  id: "new-ticket",
173
- label: M("support.ticketDetail.userNextSteps.newTicket.label", "Open a new ticket"),
174
- description: M("support.ticketDetail.userNextSteps.newTicket.description", "Have a different issue? Start a fresh request."),
175
- onClick: Z
277
+ label: O("support.ticketDetail.userNextSteps.newTicket.label", "Open a new ticket"),
278
+ description: O("support.ticketDetail.userNextSteps.newTicket.description", "Have a different issue? Start a fresh request."),
279
+ onClick: J
176
280
  },
177
281
  {
178
282
  id: "kb",
179
- label: M("support.ticketDetail.userNextSteps.knowledgeBase.label", "Browse the knowledge base"),
180
- description: M("support.ticketDetail.userNextSteps.knowledgeBase.description", "Find answers to common questions instantly."),
181
- onClick: () => E(g(O, "knowledge-base"))
283
+ label: O("support.ticketDetail.userNextSteps.knowledgeBase.label", "Browse the knowledge base"),
284
+ description: O("support.ticketDetail.userNextSteps.knowledgeBase.description", "Find answers to common questions instantly."),
285
+ onClick: () => C(m(T, "knowledge-base"))
182
286
  }
183
287
  ]
184
288
  }),
185
- /* @__PURE__ */ C("h2", {
289
+ /* @__PURE__ */ b("h2", {
186
290
  className: "text-lg font-semibold mb-4 text-text-primary",
187
- children: M("support.ticketDetail.conversationTitle", "Conversation")
291
+ children: O("support.ticketDetail.conversationTitle", "Conversation")
188
292
  }),
189
- /* @__PURE__ */ C(te, {
190
- ticketId: N.id,
191
- messages: N.messages || [],
192
- currentUserId: D?.id
293
+ /* @__PURE__ */ b(s, {
294
+ ticketId: j.id,
295
+ messages: j.messages || [],
296
+ currentUserId: w?.id
193
297
  }),
194
- pe && /* @__PURE__ */ w(t, {
298
+ Q && /* @__PURE__ */ x(t, {
195
299
  "data-tour": "support-ticket-review",
196
300
  className: "mt-6 p-4",
197
301
  children: [
198
- /* @__PURE__ */ C("h3", {
302
+ /* @__PURE__ */ b("h3", {
199
303
  className: "text-base font-semibold text-text-primary",
200
- children: M("support.ticketDetail.review.title", "Rate this support experience")
304
+ children: O("support.ticketDetail.review.title", "Rate this support experience")
201
305
  }),
202
- /* @__PURE__ */ C("p", {
306
+ /* @__PURE__ */ b("p", {
203
307
  className: "mt-1 text-sm text-text-secondary",
204
- children: M("support.ticketDetail.review.description", "Share a quick rating once the ticket is closed. Optional notes help improve future responses.")
308
+ children: O("support.ticketDetail.review.description", "Share a quick rating once the ticket is closed. Optional notes help improve future responses.")
205
309
  }),
206
- /* @__PURE__ */ w("div", {
310
+ /* @__PURE__ */ x("div", {
207
311
  className: "mt-4 grid gap-4 md:grid-cols-2",
208
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
312
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
209
313
  htmlFor: "support-review-rating",
210
314
  className: "mb-2 block text-sm font-medium text-text-primary",
211
- children: M("support.ticketDetail.review.ratingLabel", "Rating")
212
- }), /* @__PURE__ */ w("select", {
315
+ children: O("support.ticketDetail.review.ratingLabel", "Rating")
316
+ }), /* @__PURE__ */ x("select", {
213
317
  id: "support-review-rating",
214
- value: U,
215
- onChange: (e) => W(e.target.value),
318
+ value: R,
319
+ onChange: (e) => z(e.target.value),
216
320
  className: "min-h-11 w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
217
321
  children: [
218
- /* @__PURE__ */ C("option", {
322
+ /* @__PURE__ */ b("option", {
219
323
  value: "",
220
- children: M("support.ticketDetail.review.selectRating", "Select rating")
324
+ children: O("support.ticketDetail.review.selectRating", "Select rating")
221
325
  }),
222
- /* @__PURE__ */ C("option", {
326
+ /* @__PURE__ */ b("option", {
223
327
  value: "5",
224
- children: M("support.ticketDetail.review.rating5", "5 - Excellent")
328
+ children: O("support.ticketDetail.review.rating5", "5 - Excellent")
225
329
  }),
226
- /* @__PURE__ */ C("option", {
330
+ /* @__PURE__ */ b("option", {
227
331
  value: "4",
228
- children: M("support.ticketDetail.review.rating4", "4 - Good")
332
+ children: O("support.ticketDetail.review.rating4", "4 - Good")
229
333
  }),
230
- /* @__PURE__ */ C("option", {
334
+ /* @__PURE__ */ b("option", {
231
335
  value: "3",
232
- children: M("support.ticketDetail.review.rating3", "3 - Okay")
336
+ children: O("support.ticketDetail.review.rating3", "3 - Okay")
233
337
  }),
234
- /* @__PURE__ */ C("option", {
338
+ /* @__PURE__ */ b("option", {
235
339
  value: "2",
236
- children: M("support.ticketDetail.review.rating2", "2 - Needs improvement")
340
+ children: O("support.ticketDetail.review.rating2", "2 - Needs improvement")
237
341
  }),
238
- /* @__PURE__ */ C("option", {
342
+ /* @__PURE__ */ b("option", {
239
343
  value: "1",
240
- children: M("support.ticketDetail.review.rating1", "1 - Poor")
344
+ children: O("support.ticketDetail.review.rating1", "1 - Poor")
241
345
  })
242
346
  ]
243
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
347
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
244
348
  htmlFor: "support-review-feedback-type",
245
349
  className: "mb-2 block text-sm font-medium text-text-primary",
246
- children: M("support.ticketDetail.review.feedbackTypeLabel", "Feedback type")
247
- }), /* @__PURE__ */ w("select", {
350
+ children: O("support.ticketDetail.review.feedbackTypeLabel", "Feedback type")
351
+ }), /* @__PURE__ */ x("select", {
248
352
  id: "support-review-feedback-type",
249
- value: G,
250
- onChange: (e) => K(e.target.value || ""),
353
+ value: B,
354
+ onChange: (e) => V(e.target.value || ""),
251
355
  className: "min-h-11 w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
252
356
  children: [
253
- /* @__PURE__ */ C("option", {
357
+ /* @__PURE__ */ b("option", {
254
358
  value: "",
255
- children: M("support.ticketDetail.review.optional", "Optional")
359
+ children: O("support.ticketDetail.review.optional", "Optional")
256
360
  }),
257
- /* @__PURE__ */ C("option", {
361
+ /* @__PURE__ */ b("option", {
258
362
  value: f.AgentHelpful,
259
- children: M("support.ticketDetail.review.feedbackAgentHelpful", "Agent helpful")
363
+ children: O("support.ticketDetail.review.feedbackAgentHelpful", "Agent helpful")
260
364
  }),
261
- /* @__PURE__ */ C("option", {
365
+ /* @__PURE__ */ b("option", {
262
366
  value: f.IssueResolved,
263
- children: M("support.ticketDetail.review.feedbackIssueResolved", "Issue resolved")
367
+ children: O("support.ticketDetail.review.feedbackIssueResolved", "Issue resolved")
264
368
  }),
265
- /* @__PURE__ */ C("option", {
369
+ /* @__PURE__ */ b("option", {
266
370
  value: f.ResponseTime,
267
- children: M("support.ticketDetail.review.feedbackResponseTime", "Response time")
371
+ children: O("support.ticketDetail.review.feedbackResponseTime", "Response time")
268
372
  }),
269
- /* @__PURE__ */ C("option", {
373
+ /* @__PURE__ */ b("option", {
270
374
  value: f.KnowledgeBase,
271
- children: M("support.ticketDetail.review.feedbackKnowledgeBase", "Knowledge base")
375
+ children: O("support.ticketDetail.review.feedbackKnowledgeBase", "Knowledge base")
272
376
  }),
273
- /* @__PURE__ */ C("option", {
377
+ /* @__PURE__ */ b("option", {
274
378
  value: f.Other,
275
- children: M("support.ticketDetail.review.feedbackOther", "Other")
379
+ children: O("support.ticketDetail.review.feedbackOther", "Other")
276
380
  })
277
381
  ]
278
382
  })] })]
279
383
  }),
280
- /* @__PURE__ */ w("div", {
384
+ /* @__PURE__ */ x("div", {
281
385
  className: "mt-4",
282
- children: [/* @__PURE__ */ C("label", {
386
+ children: [/* @__PURE__ */ b("label", {
283
387
  htmlFor: "support-review-notes",
284
388
  className: "mb-2 block text-sm font-medium text-text-primary",
285
- children: M("support.ticketDetail.review.notesLabel", "Notes")
286
- }), /* @__PURE__ */ C("textarea", {
389
+ children: O("support.ticketDetail.review.notesLabel", "Notes")
390
+ }), /* @__PURE__ */ b("textarea", {
287
391
  id: "support-review-notes",
288
- "aria-label": M("support.ticketDetail.review.notesLabel", "Notes"),
289
- value: q,
290
- onChange: (e) => J(e.target.value),
392
+ "aria-label": O("support.ticketDetail.review.notesLabel", "Notes"),
393
+ value: H,
394
+ onChange: (e) => U(e.target.value),
291
395
  rows: 4,
292
396
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary",
293
- placeholder: M("support.ticketDetail.review.notesPlaceholder", "Optional notes about the support experience")
397
+ placeholder: O("support.ticketDetail.review.notesPlaceholder", "Optional notes about the support experience")
294
398
  })]
295
399
  }),
296
- /* @__PURE__ */ C("div", {
400
+ /* @__PURE__ */ b("div", {
297
401
  className: "mt-4 flex justify-end",
298
- children: /* @__PURE__ */ C(e, {
299
- onClick: () => void me(),
300
- disabled: !U || V,
301
- children: V ? M("support.ticketDetail.review.submitting", "Submitting...") : M("support.ticketDetail.review.submit", "Submit review")
402
+ children: /* @__PURE__ */ b(e, {
403
+ onClick: () => void Pe(),
404
+ disabled: !R || I,
405
+ children: I ? O("support.ticketDetail.review.submitting", "Submitting...") : O("support.ticketDetail.review.submit", "Submit review")
302
406
  })
303
407
  })
304
408
  ]
305
409
  }),
306
- /* @__PURE__ */ C("div", {
410
+ /* @__PURE__ */ b("div", {
307
411
  className: "mt-6 rounded-xl border border-border-seam bg-bg-surface p-4 xl:hidden",
308
- children: /* @__PURE__ */ C(o, { ticket: N })
412
+ children: /* @__PURE__ */ b(o, { ticket: j })
309
413
  })
310
414
  ]
311
415
  }),
312
- /* @__PURE__ */ C(ne, {
313
- ticketId: N.id,
314
- onSendMessage: fe,
315
- disabled: L,
416
+ /* @__PURE__ */ b(c, {
417
+ ticketId: j.id,
418
+ onSendMessage: Y,
419
+ disabled: N,
316
420
  allowInternalNotes: !1
317
421
  })
318
422
  ]
319
- }), /* @__PURE__ */ C("div", {
423
+ }), /* @__PURE__ */ b("div", {
320
424
  className: "hidden min-h-0 xl:block",
321
- children: /* @__PURE__ */ C(o, { ticket: N })
425
+ children: /* @__PURE__ */ b(o, { ticket: j })
322
426
  })]
323
427
  })
324
428
  ]
325
- }) : /* @__PURE__ */ C(d, {
326
- showHeader: !1,
327
- children: /* @__PURE__ */ C(l, {
328
- illustration: "empty-search",
329
- title: M("support.ticketDetail.notFound.title", "Ticket not found"),
330
- description: M("support.ticketDetail.notFound.description", "The ticket you're looking for doesn't exist or has been deleted."),
331
- action: /* @__PURE__ */ w(e, {
332
- onClick: X,
333
- children: [/* @__PURE__ */ C(S, { size: 18 }), M("support.ticketDetail.actions.back", "Back to Tickets")]
334
- })
335
- })
336
429
  });
337
430
  }
338
- export { T as TicketDetailUserPage };
431
+ export { S as TicketDetailUserPage };
339
432
 
340
433
  //# sourceMappingURL=TicketDetailUserPage.js.map