@burdenoff/microfe-support 2026.827.1 → 2026.830.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/support/SupportAdminRoot.js +31 -34
  3. package/dist/support/SupportAdminRoot.js.map +1 -1
  4. package/dist/support/SupportUserRoot.js +19 -22
  5. package/dist/support/SupportUserRoot.js.map +1 -1
  6. package/dist/support/components/PageLayout.d.ts +1 -1
  7. package/dist/support/components/PageLayout.js +46 -44
  8. package/dist/support/components/PageLayout.js.map +1 -1
  9. package/dist/support/components/analytics/CategoryBreakdown.js +24 -23
  10. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  11. package/dist/support/components/analytics/PriorityBreakdown.js +27 -26
  12. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  13. package/dist/support/components/analytics/SLAReport.js +48 -54
  14. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  15. package/dist/support/components/analytics/SatisfactionDistribution.js +56 -59
  16. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  17. package/dist/support/components/analytics/TopAgents.js +27 -26
  18. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  19. package/dist/support/components/analytics/TrendChart.js +23 -21
  20. package/dist/support/components/analytics/TrendChart.js.map +1 -1
  21. package/dist/support/components/kb/ArticleForm.js +145 -132
  22. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  23. package/dist/support/components/settings/CannedResponsesSettings.js +104 -103
  24. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  25. package/dist/support/components/settings/SLAPoliciesSettings.js +120 -123
  26. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  27. package/dist/support/components/settings/TicketCategoriesSettings.js +175 -180
  28. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  29. package/dist/support/components/tickets/AttachmentList.js +21 -20
  30. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  31. package/dist/support/components/tickets/MessageComposer.js +35 -35
  32. package/dist/support/components/tickets/MessageThread.js +55 -54
  33. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  34. package/dist/support/components/tickets/TicketDetailHeader.js +62 -57
  35. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  36. package/dist/support/components/tickets/TicketHeader.js +47 -47
  37. package/dist/support/components/tickets/TicketSidebar.js +122 -121
  38. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  39. package/dist/support/hooks/index.d.ts +1 -0
  40. package/dist/support/hooks/index.js +1 -0
  41. package/dist/support/hooks/useTr.d.ts +16 -0
  42. package/dist/support/hooks/useTr.js +12 -0
  43. package/dist/support/hooks/useTr.js.map +1 -0
  44. package/dist/support/index.d.ts +1 -0
  45. package/dist/support/index.js +2 -1
  46. package/dist/support/pages/AnalyticsPage.js +151 -145
  47. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  48. package/dist/support/pages/ArticleDetailAdminPage.js +134 -147
  49. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  50. package/dist/support/pages/ArticleDetailUserPage.js +70 -79
  51. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  52. package/dist/support/pages/ContactInquiriesPage.js +140 -139
  53. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  54. package/dist/support/pages/ContactInquiryDetailPage.js +259 -232
  55. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  56. package/dist/support/pages/CreateArticlePage.js +57 -56
  57. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  58. package/dist/support/pages/CreateTicketPage.js +151 -146
  59. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  60. package/dist/support/pages/EditArticlePage.js +80 -79
  61. package/dist/support/pages/EditArticlePage.js.map +1 -1
  62. package/dist/support/pages/KnowledgeBaseAdminPage.js +92 -99
  63. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  64. package/dist/support/pages/KnowledgeBaseUserPage.js +85 -92
  65. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  66. package/dist/support/pages/SettingsPage.js +88 -87
  67. package/dist/support/pages/SettingsPage.js.map +1 -1
  68. package/dist/support/pages/TicketDetailAdminPage.js +91 -90
  69. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  70. package/dist/support/pages/TicketDetailUserPage.js +120 -118
  71. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  72. package/dist/support/pages/TicketListPage.js +139 -139
  73. package/dist/support/translations/en.d.ts +814 -0
  74. package/dist/support/translations/en.js +779 -0
  75. package/dist/support/translations/en.js.map +1 -0
  76. package/dist/support/translations/index.d.ts +1 -0
  77. package/package.json +1 -1
@@ -1,65 +1,66 @@
1
- import { GlassCard as e } from "../ui.js";
2
- import { Award as t, Star as n } from "lucide-react";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { useTr as e } from "../../hooks/useTr.js";
2
+ import { GlassCard as t } from "../ui.js";
3
+ import { Award as n, Star as r } from "lucide-react";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
5
  //#region src/support/components/analytics/TopAgents.tsx
5
- function a({ agents: a }) {
6
- let o = a.slice(0, 5), s = {
6
+ function o({ agents: o }) {
7
+ let s = e(), c = o.slice(0, 5), l = {
7
8
  1: "bg-warning/10 text-warning",
8
9
  2: "bg-bg-sunken text-text-secondary",
9
10
  3: "bg-accent/10 text-accent"
10
11
  };
11
- return /* @__PURE__ */ i(e, {
12
+ return /* @__PURE__ */ a(t, {
12
13
  treatment: "insight",
13
14
  className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
14
- children: [/* @__PURE__ */ i("h2", {
15
+ children: [/* @__PURE__ */ a("h2", {
15
16
  className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
16
- children: [/* @__PURE__ */ r(t, { size: 20 }), "Top Performing Agents"]
17
- }), /* @__PURE__ */ i("div", {
17
+ children: [/* @__PURE__ */ i(n, { size: 20 }), s("support.analytics.topAgents.title", "Top Performing Agents")]
18
+ }), /* @__PURE__ */ a("div", {
18
19
  className: "space-y-4",
19
- children: [o.map((e) => /* @__PURE__ */ i("div", {
20
+ children: [c.map((e) => /* @__PURE__ */ a("div", {
20
21
  className: "flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80",
21
- children: [/* @__PURE__ */ r("div", {
22
- className: `w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${s[e.rank] || "bg-bg-sunken text-text-secondary"}`,
23
- children: e.rank <= 3 ? /* @__PURE__ */ r(t, { size: 18 }) : e.rank
24
- }), /* @__PURE__ */ i("div", {
22
+ children: [/* @__PURE__ */ i("div", {
23
+ className: `w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${l[e.rank] || "bg-bg-sunken text-text-secondary"}`,
24
+ children: e.rank <= 3 ? /* @__PURE__ */ i(n, { size: 18 }) : e.rank
25
+ }), /* @__PURE__ */ a("div", {
25
26
  className: "flex-1 min-w-0",
26
- children: [/* @__PURE__ */ i("div", {
27
+ children: [/* @__PURE__ */ a("div", {
27
28
  className: "flex items-center justify-between mb-1",
28
- children: [/* @__PURE__ */ r("p", {
29
+ children: [/* @__PURE__ */ i("p", {
29
30
  className: "font-semibold truncate text-primary",
30
31
  children: e.agent.user.name
31
- }), /* @__PURE__ */ i("div", {
32
+ }), /* @__PURE__ */ a("div", {
32
33
  className: "flex items-center gap-1",
33
- children: [/* @__PURE__ */ r(n, {
34
+ children: [/* @__PURE__ */ i(r, {
34
35
  size: 14,
35
36
  className: "text-warning fill-warning"
36
- }), /* @__PURE__ */ r("span", {
37
+ }), /* @__PURE__ */ i("span", {
37
38
  className: "text-sm font-medium text-primary",
38
39
  children: e.avgRating.toFixed(1)
39
40
  })]
40
41
  })]
41
- }), /* @__PURE__ */ i("div", {
42
+ }), /* @__PURE__ */ a("div", {
42
43
  className: "flex items-center justify-between",
43
- children: [/* @__PURE__ */ r("p", {
44
+ children: [/* @__PURE__ */ i("p", {
44
45
  className: "text-xs truncate text-tertiary",
45
46
  children: e.agent.user.email
46
47
  }), /* @__PURE__ */ i("p", {
47
48
  className: "text-xs font-medium text-secondary",
48
- children: [e.ticketsResolved, " resolved"]
49
+ children: s("support.analytics.topAgents.resolved", "{{count}} resolved", { count: e.ticketsResolved })
49
50
  })]
50
51
  })]
51
52
  })]
52
- }, e.agent.id)), o.length === 0 && /* @__PURE__ */ r("div", {
53
+ }, e.agent.id)), c.length === 0 && /* @__PURE__ */ i("div", {
53
54
  className: "text-center py-8",
54
- children: /* @__PURE__ */ r("p", {
55
+ children: /* @__PURE__ */ i("p", {
55
56
  className: "text-tertiary",
56
- children: "No agent data available"
57
+ children: s("support.analytics.topAgents.empty", "No agent data available")
57
58
  })
58
59
  })]
59
60
  })]
60
61
  });
61
62
  }
62
63
  //#endregion
63
- export { a as TopAgents };
64
+ export { o as TopAgents };
64
65
 
65
66
  //# sourceMappingURL=TopAgents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopAgents.js","names":[],"sources":["../../../../src/support/components/analytics/TopAgents.tsx"],"sourcesContent":["import { Award, Star } from 'lucide-react';\nimport { GlassCard } from '../ui';\n\ninterface TopAgent {\n agent: {\n id: string;\n user: {\n id: string;\n name: string;\n email: string;\n avatarUrl?: string | null;\n };\n };\n ticketsResolved: number;\n avgRating: number;\n rank: number;\n}\n\ninterface TopAgentsProps {\n agents: TopAgent[];\n}\n\nexport function TopAgents({ agents }: TopAgentsProps) {\n const topAgents = agents.slice(0, 5);\n const rankClasses: Record<number, string> = {\n 1: 'bg-warning/10 text-warning',\n 2: 'bg-bg-sunken text-text-secondary',\n 3: 'bg-accent/10 text-accent',\n };\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <Award size={20} />\n Top Performing Agents\n </h2>\n\n <div className=\"space-y-4\">\n {topAgents.map((agent) => {\n return (\n <div\n key={agent.agent.id}\n className=\"flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80\"\n >\n <div\n className={`w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${rankClasses[agent.rank] || 'bg-bg-sunken text-text-secondary'}`}\n >\n {agent.rank <= 3 ? <Award size={18} /> : agent.rank}\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between mb-1\">\n <p className=\"font-semibold truncate text-primary\">{agent.agent.user.name}</p>\n <div className=\"flex items-center gap-1\">\n <Star size={14} className=\"text-warning fill-warning\" />\n <span className=\"text-sm font-medium text-primary\">\n {agent.avgRating.toFixed(1)}\n </span>\n </div>\n </div>\n <div className=\"flex items-center justify-between\">\n <p className=\"text-xs truncate text-tertiary\">{agent.agent.user.email}</p>\n <p className=\"text-xs font-medium text-secondary\">\n {agent.ticketsResolved} resolved\n </p>\n </div>\n </div>\n </div>\n );\n })}\n\n {topAgents.length === 0 && (\n <div className=\"text-center py-8\">\n <p className=\"text-tertiary\">No agent data available</p>\n </div>\n )}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;AAsBA,SAAgB,EAAU,EAAE,aAA0B;CACpD,IAAM,IAAY,EAAO,MAAM,GAAG,CAAC,GAC7B,IAAsC;EAC1C,GAAG;EACH,GAAG;EACH,GAAG;CACL;CAEA,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,MAAD;GAAI,WAAU;GAAd,UAAA,CACE,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,GAAC,uBAEjB;EAEJ,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,EAAU,KAAK,MAEZ,kBAAC,OAAD;IAEE,WAAU;IAFZ,UAAA,CAIE,kBAAC,OAAD;KACE,WAAW,2FAA2F,EAAY,EAAM,SAAS;KAEhI,UAAA,EAAM,QAAQ,IAAI,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,EAAM;IAC5C,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAuC,UAAA,EAAM,MAAM,KAAK;MAAQ,CAAA,GAC7E,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAAC,GAAD;QAAM,MAAM;QAAI,WAAU;OAA6B,CAAA,GACvD,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA,EAAM,UAAU,QAAQ,CAAC;OACtB,CAAA,CACH;MACF,CAAA,CAAA;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAkC,UAAA,EAAM,MAAM,KAAK;MAAS,CAAA,GACzE,kBAAC,KAAD;OAAG,WAAU;OAAb,UAAA,CACG,EAAM,iBAAgB,WACtB;MACA,CAAA,CAAA;KACF,CAAA,CAAA;IACF,CAAA,CAAA;GA1BE,GAAA,EAAM,MAAM,EA0Bd,CAER,GAEA,EAAU,WAAW,KACpB,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,KAAD;KAAG,WAAU;KAAgB,UAAA;IAA0B,CAAA;GACpD,CAAA,CAEJ;EACI,CAAA,CAAA;;AAEf"}
1
+ {"version":3,"file":"TopAgents.js","names":[],"sources":["../../../../src/support/components/analytics/TopAgents.tsx"],"sourcesContent":["import { Award, Star } from 'lucide-react';\nimport { GlassCard } from '../ui';\nimport { useTr } from '../../hooks/useTr';\n\ninterface TopAgent {\n agent: {\n id: string;\n user: {\n id: string;\n name: string;\n email: string;\n avatarUrl?: string | null;\n };\n };\n ticketsResolved: number;\n avgRating: number;\n rank: number;\n}\n\ninterface TopAgentsProps {\n agents: TopAgent[];\n}\n\nexport function TopAgents({ agents }: TopAgentsProps) {\n const tr = useTr();\n const topAgents = agents.slice(0, 5);\n const rankClasses: Record<number, string> = {\n 1: 'bg-warning/10 text-warning',\n 2: 'bg-bg-sunken text-text-secondary',\n 3: 'bg-accent/10 text-accent',\n };\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <Award size={20} />\n {tr('support.analytics.topAgents.title', 'Top Performing Agents')}\n </h2>\n\n <div className=\"space-y-4\">\n {topAgents.map((agent) => {\n return (\n <div\n key={agent.agent.id}\n className=\"flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80\"\n >\n <div\n className={`w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${rankClasses[agent.rank] || 'bg-bg-sunken text-text-secondary'}`}\n >\n {agent.rank <= 3 ? <Award size={18} /> : agent.rank}\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between mb-1\">\n <p className=\"font-semibold truncate text-primary\">{agent.agent.user.name}</p>\n <div className=\"flex items-center gap-1\">\n <Star size={14} className=\"text-warning fill-warning\" />\n <span className=\"text-sm font-medium text-primary\">\n {agent.avgRating.toFixed(1)}\n </span>\n </div>\n </div>\n <div className=\"flex items-center justify-between\">\n <p className=\"text-xs truncate text-tertiary\">{agent.agent.user.email}</p>\n <p className=\"text-xs font-medium text-secondary\">\n {tr('support.analytics.topAgents.resolved', '{{count}} resolved', {\n count: agent.ticketsResolved,\n })}\n </p>\n </div>\n </div>\n </div>\n );\n })}\n\n {topAgents.length === 0 && (\n <div className=\"text-center py-8\">\n <p className=\"text-tertiary\">\n {tr('support.analytics.topAgents.empty', 'No agent data available')}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAU,EAAE,aAA0B;CACpD,IAAM,IAAK,EAAM,GACX,IAAY,EAAO,MAAM,GAAG,CAAC,GAC7B,IAAsC;EAC1C,GAAG;EACH,GAAG;EACH,GAAG;CACL;CAEA,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,MAAD;GAAI,WAAU;GAAd,UAAA,CACE,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,GACjB,EAAG,qCAAqC,uBAAuB,CAC9D;EAEJ,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,EAAU,KAAK,MAEZ,kBAAC,OAAD;IAEE,WAAU;IAFZ,UAAA,CAIE,kBAAC,OAAD;KACE,WAAW,2FAA2F,EAAY,EAAM,SAAS;KAEhI,UAAA,EAAM,QAAQ,IAAI,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,EAAM;IAC5C,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAuC,UAAA,EAAM,MAAM,KAAK;MAAQ,CAAA,GAC7E,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAAC,GAAD;QAAM,MAAM;QAAI,WAAU;OAA6B,CAAA,GACvD,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA,EAAM,UAAU,QAAQ,CAAC;OACtB,CAAA,CACH;MACF,CAAA,CAAA;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAkC,UAAA,EAAM,MAAM,KAAK;MAAS,CAAA,GACzE,kBAAC,KAAD;OAAG,WAAU;OACV,UAAA,EAAG,wCAAwC,sBAAsB,EAChE,OAAO,EAAM,gBACf,CAAC;MACA,CAAA,CACA;KACF,CAAA,CAAA;IACF,CAAA,CAAA;GA5BE,GAAA,EAAM,MAAM,EA4Bd,CAER,GAEA,EAAU,WAAW,KACpB,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA,EAAG,qCAAqC,yBAAyB;IACjE,CAAA;GACA,CAAA,CAEJ;EACI,CAAA,CAAA;;AAEf"}
@@ -1,40 +1,42 @@
1
- import { GlassCard as e } from "../ui.js";
2
- import { TrendingUp as t } from "lucide-react";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { useTr as e } from "../../hooks/useTr.js";
2
+ import { GlassCard as t } from "../ui.js";
3
+ import { TrendingUp as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
5
  //#region src/support/components/analytics/TrendChart.tsx
5
- function i({ trends: i, period: a }) {
6
- if (!i || i.length === 0) return null;
7
- let o = Math.max(...i.map((e) => e.value)), s = Math.min(...i.map((e) => e.value)), c = o - s || 1;
8
- return /* @__PURE__ */ r(e, {
6
+ function a({ trends: a, period: o }) {
7
+ let s = e();
8
+ if (!a || a.length === 0) return null;
9
+ let c = Math.max(...a.map((e) => e.value)), l = Math.min(...a.map((e) => e.value)), u = c - l || 1;
10
+ return /* @__PURE__ */ i(t, {
9
11
  treatment: "insight",
10
12
  className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
11
- children: [/* @__PURE__ */ n("div", {
13
+ children: [/* @__PURE__ */ r("div", {
12
14
  className: "flex items-center justify-between mb-6",
13
- children: /* @__PURE__ */ r("div", { children: [/* @__PURE__ */ r("h2", {
15
+ children: /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("h2", {
14
16
  className: "text-xl font-semibold flex items-center gap-2 text-primary",
15
- children: [/* @__PURE__ */ n(t, { size: 20 }), "Ticket Volume Trends"]
16
- }), /* @__PURE__ */ n("p", {
17
+ children: [/* @__PURE__ */ r(n, { size: 20 }), s("support.analytics.trendChart.title", "Ticket Volume Trends")]
18
+ }), /* @__PURE__ */ r("p", {
17
19
  className: "text-sm mt-1 text-secondary",
18
- children: a.label
20
+ children: o.label
19
21
  })] })
20
- }), /* @__PURE__ */ n("div", {
22
+ }), /* @__PURE__ */ r("div", {
21
23
  className: "space-y-2",
22
- children: i.map((e) => {
23
- let t = (e.value - s) / c * 100, i = new Date(e.timestamp), a = e.label || i.toLocaleDateString("en-US", {
24
+ children: a.map((e) => {
25
+ let t = (e.value - l) / u * 100, n = new Date(e.timestamp), a = e.label || n.toLocaleDateString("en-US", {
24
26
  month: "short",
25
27
  day: "numeric"
26
28
  });
27
- return /* @__PURE__ */ r("div", {
29
+ return /* @__PURE__ */ i("div", {
28
30
  className: "flex items-center gap-3 transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded",
29
- children: [/* @__PURE__ */ n("span", {
31
+ children: [/* @__PURE__ */ r("span", {
30
32
  className: "text-xs w-20 text-right text-tertiary",
31
33
  children: a
32
- }), /* @__PURE__ */ r("div", {
34
+ }), /* @__PURE__ */ i("div", {
33
35
  className: "flex-1 flex items-center gap-2",
34
- children: [/* @__PURE__ */ n("div", {
36
+ children: [/* @__PURE__ */ r("div", {
35
37
  className: "h-8 rounded transition-all duration-300 bg-action-primary-bg/80 hover:bg-action-primary-bg",
36
38
  style: { width: `${Math.max(t, 2)}%` }
37
- }), /* @__PURE__ */ n("span", {
39
+ }), /* @__PURE__ */ r("span", {
38
40
  className: "text-sm font-medium text-primary",
39
41
  children: e.value
40
42
  })]
@@ -45,6 +47,6 @@ function i({ trends: i, period: a }) {
45
47
  });
46
48
  }
47
49
  //#endregion
48
- export { i as TrendChart };
50
+ export { a as TrendChart };
49
51
 
50
52
  //# sourceMappingURL=TrendChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\nimport { GlassCard } from '../ui';\n\ninterface TrendDataPoint {\n timestamp: string;\n value: number;\n label?: string | null;\n}\n\ninterface TrendChartProps {\n trends: TrendDataPoint[];\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n}\n\nexport function TrendChart({ trends, period }: TrendChartProps) {\n if (!trends || trends.length === 0) {\n return null;\n }\n\n const maxValue = Math.max(...trends.map((t) => t.value));\n const minValue = Math.min(...trends.map((t) => t.value));\n const range = maxValue - minValue || 1;\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <div className=\"flex items-center justify-between mb-6\">\n <div>\n <h2 className=\"text-xl font-semibold flex items-center gap-2 text-primary\">\n <TrendingUp size={20} />\n Ticket Volume Trends\n </h2>\n <p className=\"text-sm mt-1 text-secondary\">{period.label}</p>\n </div>\n </div>\n\n <div className=\"space-y-2\">\n {trends.map((point) => {\n const heightPercent = ((point.value - minValue) / range) * 100;\n const date = new Date(point.timestamp);\n const label =\n point.label || date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n\n return (\n <div\n key={point.timestamp}\n className=\"flex items-center gap-3 transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded\"\n >\n <span className=\"text-xs w-20 text-right text-tertiary\">{label}</span>\n <div className=\"flex-1 flex items-center gap-2\">\n <div\n className=\"h-8 rounded transition-all duration-300 bg-action-primary-bg/80 hover:bg-action-primary-bg\"\n style={{\n width: `${Math.max(heightPercent, 2)}%`,\n }}\n />\n <span className=\"text-sm font-medium text-primary\">{point.value}</span>\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;AAkBA,SAAgB,EAAW,EAAE,WAAQ,aAA2B;CAC9D,IAAI,CAAC,KAAU,EAAO,WAAW,GAC/B,OAAO;CAGT,IAAM,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAQ,IAAW,KAAY;CAErC,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA,CACE,kBAAC,GAAD,EAAY,MAAM,GAAK,CAAA,GAAC,sBAEtB;GACJ,CAAA,GAAA,kBAAC,KAAD;IAAG,WAAU;IAA+B,UAAA,EAAO;GAAS,CAAA,CACzD,EAAA,CAAA;EACF,CAAA,GAEL,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EAAO,KAAK,MAAU;IACrB,IAAM,KAAkB,EAAM,QAAQ,KAAY,IAAS,KACrD,IAAO,IAAI,KAAK,EAAM,SAAS,GAC/B,IACJ,EAAM,SAAS,EAAK,mBAAmB,SAAS;KAAE,OAAO;KAAS,KAAK;IAAU,CAAC;IAEpF,OACE,kBAAC,OAAD;KAEE,WAAU;KAFZ,UAAA,CAIE,kBAAC,QAAD;MAAM,WAAU;MAAyC,UAAA;KAAY,CAAA,GACrE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EACL,OAAO,GAAG,KAAK,IAAI,GAAe,CAAC,EAAE,GACvC;MACD,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;OAAoC,UAAA,EAAM;MAAY,CAAA,CACnE;KACF,CAAA,CAAA;IAbE,GAAA,EAAM,SAaR;GAET,CAAC;EACE,CAAA,CACI;;AAEf"}
1
+ {"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\nimport { GlassCard } from '../ui';\nimport { useTr } from '../../hooks/useTr';\n\ninterface TrendDataPoint {\n timestamp: string;\n value: number;\n label?: string | null;\n}\n\ninterface TrendChartProps {\n trends: TrendDataPoint[];\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n}\n\nexport function TrendChart({ trends, period }: TrendChartProps) {\n const tr = useTr();\n\n if (!trends || trends.length === 0) {\n return null;\n }\n\n const maxValue = Math.max(...trends.map((t) => t.value));\n const minValue = Math.min(...trends.map((t) => t.value));\n const range = maxValue - minValue || 1;\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <div className=\"flex items-center justify-between mb-6\">\n <div>\n <h2 className=\"text-xl font-semibold flex items-center gap-2 text-primary\">\n <TrendingUp size={20} />\n {tr('support.analytics.trendChart.title', 'Ticket Volume Trends')}\n </h2>\n <p className=\"text-sm mt-1 text-secondary\">{period.label}</p>\n </div>\n </div>\n\n <div className=\"space-y-2\">\n {trends.map((point) => {\n const heightPercent = ((point.value - minValue) / range) * 100;\n const date = new Date(point.timestamp);\n const label =\n point.label || date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n\n return (\n <div\n key={point.timestamp}\n className=\"flex items-center gap-3 transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded\"\n >\n <span className=\"text-xs w-20 text-right text-tertiary\">{label}</span>\n <div className=\"flex-1 flex items-center gap-2\">\n <div\n className=\"h-8 rounded transition-all duration-300 bg-action-primary-bg/80 hover:bg-action-primary-bg\"\n style={{\n width: `${Math.max(heightPercent, 2)}%`,\n }}\n />\n <span className=\"text-sm font-medium text-primary\">{point.value}</span>\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAW,EAAE,WAAQ,aAA2B;CAC9D,IAAM,IAAK,EAAM;CAEjB,IAAI,CAAC,KAAU,EAAO,WAAW,GAC/B,OAAO;CAGT,IAAM,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAQ,IAAW,KAAY;CAErC,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA,CACE,kBAAC,GAAD,EAAY,MAAM,GAAK,CAAA,GACtB,EAAG,sCAAsC,sBAAsB,CAC9D;GACJ,CAAA,GAAA,kBAAC,KAAD;IAAG,WAAU;IAA+B,UAAA,EAAO;GAAS,CAAA,CACzD,EAAA,CAAA;EACF,CAAA,GAEL,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EAAO,KAAK,MAAU;IACrB,IAAM,KAAkB,EAAM,QAAQ,KAAY,IAAS,KACrD,IAAO,IAAI,KAAK,EAAM,SAAS,GAC/B,IACJ,EAAM,SAAS,EAAK,mBAAmB,SAAS;KAAE,OAAO;KAAS,KAAK;IAAU,CAAC;IAEpF,OACE,kBAAC,OAAD;KAEE,WAAU;KAFZ,UAAA,CAIE,kBAAC,QAAD;MAAM,WAAU;MAAyC,UAAA;KAAY,CAAA,GACrE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EACL,OAAO,GAAG,KAAK,IAAI,GAAe,CAAC,EAAE,GACvC;MACD,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;OAAoC,UAAA,EAAM;MAAY,CAAA,CACnE;KACF,CAAA,CAAA;IAbE,GAAA,EAAM,SAaR;GAET,CAAC;EACE,CAAA,CACI;;AAEf"}
@@ -1,260 +1,273 @@
1
- import { Button as e, Input as t } from "../ui.js";
2
- import { renderSupportMarkdown as n } from "../../utils/markdown.js";
3
- import { useMemo as r, useRef as i, useState as a } from "react";
4
- import { Edit as o, Eye as s, Loader2 as c, Save as l, X as u } from "lucide-react";
5
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
1
+ import { useTr as e } from "../../hooks/useTr.js";
2
+ import { Button as t, Input as n } from "../ui.js";
3
+ import { renderSupportMarkdown as r } from "../../utils/markdown.js";
4
+ import { useMemo as i, useRef as a, useState as o } from "react";
5
+ import { Edit as s, Eye as c, Loader2 as l, Save as u, X as d } from "lucide-react";
6
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
6
7
  //#region src/support/components/kb/ArticleForm.tsx
7
- function m(e) {
8
+ function h(e) {
8
9
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").substring(0, 100);
9
10
  }
10
- function h({ initialData: h, categories: g, onSubmit: _, onCancel: v, isSubmitting: y, submitLabel: b = "Save Article" }) {
11
- let [x, S] = a({
12
- title: h?.title || "",
13
- slug: h?.slug || "",
14
- content: h?.content || "",
15
- excerpt: h?.excerpt || "",
16
- categoryId: h?.categoryId || "",
17
- tags: h?.tags || [],
18
- metaDescription: h?.metaDescription || "",
19
- status: h?.status || "DRAFT"
20
- }), [C, w] = a(h?.tags?.join(", ") || ""), T = i(!1), [E, D] = a(!1), O = r(() => {
21
- if (!x.content) return "";
11
+ function g({ initialData: g, categories: _, onSubmit: v, onCancel: y, isSubmitting: b, submitLabel: x = "Save Article" }) {
12
+ let S = e(), [C, w] = o({
13
+ title: g?.title || "",
14
+ slug: g?.slug || "",
15
+ content: g?.content || "",
16
+ excerpt: g?.excerpt || "",
17
+ categoryId: g?.categoryId || "",
18
+ tags: g?.tags || [],
19
+ metaDescription: g?.metaDescription || "",
20
+ status: g?.status || "DRAFT"
21
+ }), [T, E] = o(g?.tags?.join(", ") || ""), D = a(!1), [O, k] = o(!1), A = i(() => {
22
+ if (!C.content) return "";
22
23
  try {
23
- return n(x.content);
24
+ return r(C.content);
24
25
  } catch {
25
- return x.content;
26
+ return C.content;
26
27
  }
27
- }, [x.content]), k = (e) => {
28
- T.current ? S((t) => ({
28
+ }, [C.content]), j = (e) => {
29
+ D.current ? w((t) => ({
29
30
  ...t,
30
31
  title: e
31
- })) : S((t) => ({
32
+ })) : w((t) => ({
32
33
  ...t,
33
34
  title: e,
34
- slug: m(e)
35
+ slug: h(e)
35
36
  }));
36
- }, A = (e) => {
37
- w(e);
37
+ }, M = (e) => {
38
+ E(e);
38
39
  let t = e.split(",").map((e) => e.trim()).filter((e) => e.length > 0);
39
- S((e) => ({
40
+ w((e) => ({
40
41
  ...e,
41
42
  tags: t
42
43
  }));
43
- }, j = (e) => {
44
- T.current = !0, S((t) => ({
44
+ }, N = (e) => {
45
+ D.current = !0, w((t) => ({
45
46
  ...t,
46
47
  slug: e
47
48
  }));
48
- }, M = async (e) => {
49
- e.preventDefault(), await _(x);
50
- }, N = x.title.trim() && x.slug.trim() && x.content.trim();
51
- return /* @__PURE__ */ p("form", {
52
- onSubmit: M,
49
+ }, P = async (e) => {
50
+ e.preventDefault(), await v(C);
51
+ }, F = C.title.trim() && C.slug.trim() && C.content.trim();
52
+ return /* @__PURE__ */ m("form", {
53
+ onSubmit: P,
53
54
  className: "space-y-6",
54
- children: [/* @__PURE__ */ p("div", {
55
+ children: [/* @__PURE__ */ m("div", {
55
56
  className: "p-6 rounded-xl border border-border-seam bg-bg-surface space-y-6",
56
57
  children: [
57
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
58
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
58
59
  htmlFor: "support-article-title",
59
60
  className: "mb-2 block text-sm font-medium text-text-primary",
60
- children: ["Title ", /* @__PURE__ */ f("span", {
61
- className: "text-status-error-text",
62
- children: "*"
63
- })]
64
- }), /* @__PURE__ */ f(t, {
61
+ children: [
62
+ S("support.articleForm.labels.title", "Title"),
63
+ " ",
64
+ /* @__PURE__ */ p("span", {
65
+ className: "text-status-error-text",
66
+ children: "*"
67
+ })
68
+ ]
69
+ }), /* @__PURE__ */ p(n, {
65
70
  id: "support-article-title",
66
71
  type: "text",
67
72
  required: !0,
68
- value: x.title,
69
- onChange: (e) => k(e.target.value),
70
- placeholder: "Article title"
73
+ value: C.title,
74
+ onChange: (e) => j(e.target.value),
75
+ placeholder: S("support.articleForm.placeholders.title", "Article title")
71
76
  })] }),
72
- /* @__PURE__ */ p("div", { children: [
73
- /* @__PURE__ */ p("label", {
77
+ /* @__PURE__ */ m("div", { children: [
78
+ /* @__PURE__ */ m("label", {
74
79
  htmlFor: "support-article-slug",
75
80
  className: "mb-2 block text-sm font-medium text-text-primary",
76
- children: ["URL Slug ", /* @__PURE__ */ f("span", {
77
- className: "text-status-error-text",
78
- children: "*"
79
- })]
81
+ children: [
82
+ S("support.articleForm.labels.slug", "URL Slug"),
83
+ " ",
84
+ /* @__PURE__ */ p("span", {
85
+ className: "text-status-error-text",
86
+ children: "*"
87
+ })
88
+ ]
80
89
  }),
81
- /* @__PURE__ */ p("div", {
90
+ /* @__PURE__ */ m("div", {
82
91
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
83
- children: [/* @__PURE__ */ f("span", {
92
+ children: [/* @__PURE__ */ p("span", {
84
93
  className: "text-sm text-text-secondary",
85
94
  children: "/kb/articles/"
86
- }), /* @__PURE__ */ f(t, {
95
+ }), /* @__PURE__ */ p(n, {
87
96
  id: "support-article-slug",
88
97
  type: "text",
89
98
  required: !0,
90
- value: x.slug,
91
- onChange: (e) => j(e.target.value),
92
- placeholder: "article-url-slug",
99
+ value: C.slug,
100
+ onChange: (e) => N(e.target.value),
101
+ placeholder: S("support.articleForm.placeholders.slug", "article-url-slug"),
93
102
  className: "flex-1"
94
103
  })]
95
104
  }),
96
- /* @__PURE__ */ f("p", {
105
+ /* @__PURE__ */ p("p", {
97
106
  className: "text-xs text-text-secondary mt-1",
98
- children: "Auto-generated from title. Edit to customize."
107
+ children: S("support.articleForm.slugHint", "Auto-generated from title. Edit to customize.")
99
108
  })
100
109
  ] }),
101
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
110
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
102
111
  htmlFor: "support-article-excerpt",
103
112
  className: "mb-2 block text-sm font-medium text-text-primary",
104
- children: "Excerpt"
105
- }), /* @__PURE__ */ f("textarea", {
113
+ children: S("support.articleForm.labels.excerpt", "Excerpt")
114
+ }), /* @__PURE__ */ p("textarea", {
106
115
  id: "support-article-excerpt",
107
- "aria-label": "Excerpt",
116
+ "aria-label": S("support.articleForm.labels.excerpt", "Excerpt"),
108
117
  rows: 3,
109
- value: x.excerpt,
110
- onChange: (e) => S({
111
- ...x,
118
+ value: C.excerpt,
119
+ onChange: (e) => w({
120
+ ...C,
112
121
  excerpt: e.target.value
113
122
  }),
114
123
  className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
115
- placeholder: "Brief summary of the article (displayed in search results)"
124
+ placeholder: S("support.articleForm.placeholders.excerpt", "Brief summary of the article (displayed in search results)")
116
125
  })] }),
117
- /* @__PURE__ */ p("div", { children: [
118
- /* @__PURE__ */ p("div", {
126
+ /* @__PURE__ */ m("div", { children: [
127
+ /* @__PURE__ */ m("div", {
119
128
  className: "flex items-center justify-between mb-2",
120
- children: [/* @__PURE__ */ p("label", {
129
+ children: [/* @__PURE__ */ m("label", {
121
130
  htmlFor: "support-article-content",
122
131
  className: "text-sm font-medium text-text-primary",
123
- children: ["Content ", /* @__PURE__ */ f("span", {
124
- className: "text-status-error-text",
125
- children: "*"
126
- })]
127
- }), /* @__PURE__ */ f(e, {
132
+ children: [
133
+ S("support.articleForm.labels.content", "Content"),
134
+ " ",
135
+ /* @__PURE__ */ p("span", {
136
+ className: "text-status-error-text",
137
+ children: "*"
138
+ })
139
+ ]
140
+ }), /* @__PURE__ */ p(t, {
128
141
  type: "button",
129
142
  variant: "ghost",
130
143
  size: "sm",
131
- onClick: () => D(!E),
144
+ onClick: () => k(!O),
132
145
  className: "text-xs",
133
- children: E ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(o, { size: 14 }), "Edit"] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { size: 14 }), "Preview"] })
146
+ children: O ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(s, { size: 14 }), S("support.articleForm.actions.edit", "Edit")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(c, { size: 14 }), S("support.articleForm.actions.preview", "Preview")] })
134
147
  })]
135
148
  }),
136
- E ? /* @__PURE__ */ f("div", {
149
+ O ? /* @__PURE__ */ p("div", {
137
150
  className: "w-full min-h-[400px] px-4 py-3 rounded-lg border bg-bg-surface overflow-auto",
138
- children: /* @__PURE__ */ f("div", {
151
+ children: /* @__PURE__ */ p("div", {
139
152
  className: "prose prose-sm max-w-none dark:prose-invert",
140
- dangerouslySetInnerHTML: { __html: O || "<p class=\"text-text-secondary\">Nothing to preview</p>" }
153
+ dangerouslySetInnerHTML: { __html: A || `<p class="text-text-secondary">${S("support.articleForm.nothingToPreview", "Nothing to preview")}</p>` }
141
154
  })
142
- }) : /* @__PURE__ */ f("textarea", {
155
+ }) : /* @__PURE__ */ p("textarea", {
143
156
  id: "support-article-content",
144
- "aria-label": "Article content",
157
+ "aria-label": S("support.articleForm.labels.content", "Content"),
145
158
  required: !0,
146
159
  rows: 20,
147
- value: x.content,
148
- onChange: (e) => S({
149
- ...x,
160
+ value: C.content,
161
+ onChange: (e) => w({
162
+ ...C,
150
163
  content: e.target.value
151
164
  }),
152
165
  className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors font-mono text-sm",
153
- placeholder: "Article content (supports Markdown)"
166
+ placeholder: S("support.articleForm.placeholders.content", "Article content (supports Markdown)")
154
167
  }),
155
- /* @__PURE__ */ f("p", {
168
+ /* @__PURE__ */ p("p", {
156
169
  className: "text-xs text-text-secondary mt-1",
157
- children: "Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```"
170
+ children: S("support.articleForm.markdownHint", "Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```")
158
171
  })
159
172
  ] }),
160
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
173
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
161
174
  htmlFor: "support-article-category",
162
175
  className: "mb-2 block text-sm font-medium text-text-primary",
163
- children: "Category"
164
- }), /* @__PURE__ */ p("select", {
176
+ children: S("support.articleForm.labels.category", "Category")
177
+ }), /* @__PURE__ */ m("select", {
165
178
  id: "support-article-category",
166
- value: x.categoryId,
167
- onChange: (e) => S({
168
- ...x,
179
+ value: C.categoryId,
180
+ onChange: (e) => w({
181
+ ...C,
169
182
  categoryId: e.target.value
170
183
  }),
171
184
  className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
172
- children: [/* @__PURE__ */ f("option", {
185
+ children: [/* @__PURE__ */ p("option", {
173
186
  value: "",
174
- children: "Select a category"
175
- }), g.map((e) => /* @__PURE__ */ f("option", {
187
+ children: S("support.articleForm.placeholders.category", "Select a category")
188
+ }), _.map((e) => /* @__PURE__ */ p("option", {
176
189
  value: e.id,
177
190
  children: e.name
178
191
  }, e.id))]
179
192
  })] }),
180
- /* @__PURE__ */ p("div", { children: [
181
- /* @__PURE__ */ f("label", {
193
+ /* @__PURE__ */ m("div", { children: [
194
+ /* @__PURE__ */ p("label", {
182
195
  htmlFor: "support-article-tags",
183
196
  className: "mb-2 block text-sm font-medium text-text-primary",
184
- children: "Tags"
197
+ children: S("support.articleForm.labels.tags", "Tags")
185
198
  }),
186
- /* @__PURE__ */ f(t, {
199
+ /* @__PURE__ */ p(n, {
187
200
  id: "support-article-tags",
188
201
  type: "text",
189
- value: C,
190
- onChange: (e) => A(e.target.value),
191
- placeholder: "Enter tags separated by commas (e.g., billing, account, setup)"
202
+ value: T,
203
+ onChange: (e) => M(e.target.value),
204
+ placeholder: S("support.articleForm.placeholders.tags", "Enter tags separated by commas (e.g., billing, account, setup)")
192
205
  }),
193
- x.tags.length > 0 && /* @__PURE__ */ f("div", {
206
+ C.tags.length > 0 && /* @__PURE__ */ p("div", {
194
207
  className: "flex flex-wrap gap-2 mt-2",
195
- children: x.tags.map((e) => /* @__PURE__ */ f("span", {
208
+ children: C.tags.map((e) => /* @__PURE__ */ p("span", {
196
209
  className: "px-2 py-1 text-xs rounded-full bg-action-primary-bg/10 text-primary",
197
210
  children: e
198
211
  }, e))
199
212
  })
200
213
  ] }),
201
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
214
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
202
215
  htmlFor: "support-article-meta-description",
203
216
  className: "mb-2 block text-sm font-medium text-text-primary",
204
- children: "Meta Description"
205
- }), /* @__PURE__ */ f("textarea", {
217
+ children: S("support.articleForm.labels.metaDescription", "Meta Description")
218
+ }), /* @__PURE__ */ p("textarea", {
206
219
  id: "support-article-meta-description",
207
- "aria-label": "Meta Description",
220
+ "aria-label": S("support.articleForm.labels.metaDescription", "Meta Description"),
208
221
  rows: 2,
209
- value: x.metaDescription,
210
- onChange: (e) => S({
211
- ...x,
222
+ value: C.metaDescription,
223
+ onChange: (e) => w({
224
+ ...C,
212
225
  metaDescription: e.target.value
213
226
  }),
214
227
  className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
215
- placeholder: "SEO meta description (optional)"
228
+ placeholder: S("support.articleForm.placeholders.metaDescription", "SEO meta description (optional)")
216
229
  })] }),
217
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
230
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
218
231
  htmlFor: "support-article-status",
219
232
  className: "mb-2 block text-sm font-medium text-text-primary",
220
- children: "Status"
221
- }), /* @__PURE__ */ p("select", {
233
+ children: S("support.articleForm.labels.status", "Status")
234
+ }), /* @__PURE__ */ m("select", {
222
235
  id: "support-article-status",
223
- value: x.status,
224
- onChange: (e) => S({
225
- ...x,
236
+ value: C.status,
237
+ onChange: (e) => w({
238
+ ...C,
226
239
  status: e.target.value
227
240
  }),
228
241
  className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
229
- children: [/* @__PURE__ */ f("option", {
242
+ children: [/* @__PURE__ */ p("option", {
230
243
  value: "DRAFT",
231
- children: "Draft - Not visible to users"
232
- }), /* @__PURE__ */ f("option", {
244
+ children: S("support.articleForm.status.draft", "Draft - Not visible to users")
245
+ }), /* @__PURE__ */ p("option", {
233
246
  value: "PUBLISHED",
234
- children: "Published - Visible to all users"
247
+ children: S("support.articleForm.status.published", "Published - Visible to all users")
235
248
  })]
236
249
  })] })
237
250
  ]
238
- }), /* @__PURE__ */ p("div", {
251
+ }), /* @__PURE__ */ m("div", {
239
252
  className: "flex gap-3",
240
- children: [/* @__PURE__ */ f(e, {
253
+ children: [/* @__PURE__ */ p(t, {
241
254
  type: "submit",
242
- disabled: y || !N,
255
+ disabled: b || !F,
243
256
  className: "flex-1",
244
- children: y ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(c, {
257
+ children: b ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(l, {
245
258
  size: 18,
246
259
  className: "animate-spin"
247
- }), "Saving…"] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { size: 18 }), b] })
248
- }), /* @__PURE__ */ p(e, {
260
+ }), S("support.articleForm.actions.saving", "Saving…")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { size: 18 }), x] })
261
+ }), /* @__PURE__ */ m(t, {
249
262
  type: "button",
250
263
  variant: "outline",
251
- onClick: v,
252
- children: [/* @__PURE__ */ f(u, { size: 18 }), "Cancel"]
264
+ onClick: y,
265
+ children: [/* @__PURE__ */ p(d, { size: 18 }), S("support.articleForm.actions.cancel", "Cancel")]
253
266
  })]
254
267
  })]
255
268
  });
256
269
  }
257
270
  //#endregion
258
- export { h as ArticleForm };
271
+ export { g as ArticleForm };
259
272
 
260
273
  //# sourceMappingURL=ArticleForm.js.map