@burdenoff/microfe-botmanor 2026.1120.6 → 2026.1120.8

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 (69) hide show
  1. package/dist/botlit/components/AssistantChannelPanel.js +3 -3
  2. package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
  3. package/dist/botlit/components/ChannelRoutesPanel.d.ts +9 -0
  4. package/dist/botlit/components/ChannelRoutesPanel.js +275 -0
  5. package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -0
  6. package/dist/botlit/components/CreateChannelRouteDialog.d.ts +13 -0
  7. package/dist/botlit/components/CreateChannelRouteDialog.js +188 -0
  8. package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -0
  9. package/dist/botlit/components/DashboardUsagePanel.d.ts +8 -0
  10. package/dist/botlit/components/DashboardUsagePanel.js +277 -0
  11. package/dist/botlit/components/DashboardUsagePanel.js.map +1 -0
  12. package/dist/botlit/components/LiveIndicator.d.ts +9 -0
  13. package/dist/botlit/components/LiveIndicator.js +21 -0
  14. package/dist/botlit/components/LiveIndicator.js.map +1 -0
  15. package/dist/botlit/components/RunStatsCard.d.ts +9 -0
  16. package/dist/botlit/components/RunStatsCard.js +138 -0
  17. package/dist/botlit/components/RunStatsCard.js.map +1 -0
  18. package/dist/botlit/hooks/index.d.ts +3 -3
  19. package/dist/botlit/hooks/index.js +19 -19
  20. package/dist/botlit/hooks/useBots.d.ts +5 -0
  21. package/dist/botlit/hooks/useBots.js +63 -50
  22. package/dist/botlit/hooks/useBots.js.map +1 -1
  23. package/dist/botlit/hooks/useChannels.d.ts +49 -23
  24. package/dist/botlit/hooks/useChannels.js +141 -135
  25. package/dist/botlit/hooks/useChannels.js.map +1 -1
  26. package/dist/botlit/hooks/useExecutionLiveUpdates.d.ts +29 -0
  27. package/dist/botlit/hooks/useExecutionLiveUpdates.js +124 -0
  28. package/dist/botlit/hooks/useExecutionLiveUpdates.js.map +1 -0
  29. package/dist/botlit/hooks/useUsageStats.d.ts +71 -0
  30. package/dist/botlit/hooks/useUsageStats.js +115 -0
  31. package/dist/botlit/hooks/useUsageStats.js.map +1 -0
  32. package/dist/botlit/pages/AgentDetailPage.js +48 -43
  33. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  34. package/dist/botlit/pages/BotChannelsTab.js +12 -3
  35. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  36. package/dist/botlit/pages/BotDetailPage.js +317 -309
  37. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  38. package/dist/botlit/pages/ChannelDetailPage.js +642 -776
  39. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  40. package/dist/botlit/pages/ChannelRoutesPage.js +22 -208
  41. package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -1
  42. package/dist/botlit/pages/ChannelsPage.js +314 -251
  43. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  44. package/dist/botlit/pages/DashboardPage.js +155 -153
  45. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  46. package/dist/botlit/pages/ExecutionDetailPage.js +142 -132
  47. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  48. package/dist/botlit/pages/ExecutionsPage.js +150 -141
  49. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  50. package/dist/botlit/pages/PromptStudioPage.js +172 -172
  51. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  52. package/dist/botlit/permissions/botmanorPermissions.d.ts +1 -0
  53. package/dist/botlit/permissions/botmanorPermissions.js +1 -0
  54. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -1
  55. package/dist/botlit/utils/channelConnectors.d.ts +13 -0
  56. package/dist/botlit/utils/channelConnectors.js +21 -1
  57. package/dist/botlit/utils/channelConnectors.js.map +1 -1
  58. package/dist/botlit/utils/errors.d.ts +8 -0
  59. package/dist/botlit/utils/errors.js +21 -1
  60. package/dist/botlit/utils/errors.js.map +1 -1
  61. package/dist/botlit/utils/formatters.js +6 -2
  62. package/dist/botlit/utils/formatters.js.map +1 -1
  63. package/dist/generated/wspace-operations.d.ts +321 -12
  64. package/dist/generated/wspace-operations.js +188 -91
  65. package/dist/generated/wspace-operations.js.map +1 -1
  66. package/dist/generated/wspace-types.d.ts +130 -0
  67. package/dist/generated/wspace-types.js +8 -4
  68. package/dist/generated/wspace-types.js.map +1 -1
  69. package/package.json +1 -1
@@ -1,31 +1,37 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
- import { useBots as t } from "../hooks/useBots.js";
3
- import { isNative as n, nativeImpact as ee, nativeNotify as te } from "../../utils/nativeBridge.js";
4
- import { BOTMANOR_PERMISSIONS as r } from "../permissions/botmanorPermissions.js";
5
- import { BotmanorPermissionGate as i } from "../permissions/useBotmanorPermissions.js";
2
+ import { isNative as t, nativeImpact as n, nativeNotify as r } from "../../utils/nativeBridge.js";
3
+ import { useTr as i } from "../../shared/hooks/useTr.js";
4
+ import { useAllBots as ee } from "../hooks/useBots.js";
6
5
  import { PageLayout as a } from "../components/PageLayout.js";
7
- import { Card as o, CardContent as s, CardDescription as c, CardHeader as l, CardTitle as u } from "../components/Card.js";
8
- import { Button as d } from "../components/Button.js";
9
- import { FormField as f, Input as p, Textarea as m } from "../components/Input.js";
10
- import { Badge as h, StatusBadge as ne } from "../components/Badge.js";
11
- import { EmptyState as re } from "../components/EmptyState.js";
6
+ import { BOTMANOR_PERMISSIONS as o } from "../permissions/botmanorPermissions.js";
7
+ import { BotmanorPermissionGate as s } from "../permissions/useBotmanorPermissions.js";
8
+ import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
9
+ import { Button as p } from "../components/Button.js";
10
+ import { FormField as m, Input as te, Textarea as ne } from "../components/Input.js";
11
+ import { Badge as re, StatusBadge as ie } from "../components/Badge.js";
12
+ import { EmptyState as ae } from "../components/EmptyState.js";
13
+ import { ErrorState as oe } from "../components/ErrorState.js";
14
+ import { CreateChannelRouteDialog as se } from "../components/CreateChannelRouteDialog.js";
12
15
  import "../hooks/index.js";
13
- import { ChannelCredentialFields as ie, InboundWebhookCard as ae } from "../components/ChannelSetupPanels.js";
14
- import { ChannelType as oe } from "../../generated/global-types.js";
15
- import { PLATFORM_CREDENTIALS as se, connectorPlatform as ce, useActiveOrganizationId as le, useInboundChannel as ue, useProvisionChannel as de, validateCredentials as fe } from "../hooks/useChannelSetup.js";
16
- import { WIDGET_METADATA_KEY as pe, readWidgetConfig as me, routeMetadataString as he, useChannelConnector as ge, useChannelRoutes as _e, useCreateChannelConnector as ve, useCreateChannelRoute as ye, useDeleteChannelConnector as be, useFindChannelConnector as xe, useUpdateChannelConnector as Se } from "../hooks/useChannels.js";
17
- import { formatRelativeTime as Ce } from "../utils/formatters.js";
18
- import { useGlobalChannels as we, useInitiateSlackConnect as Te, useLinkIntegrationConnection as Ee, useMyUserPlatformConnection as De, useRevokeSlackConnection as Oe, useToggleSlackNotifications as ke } from "../hooks/useUserPlatformConnection.js";
16
+ import { ChannelCredentialFields as ce, InboundWebhookCard as le } from "../components/ChannelSetupPanels.js";
17
+ import { ChannelType as ue } from "../../generated/global-types.js";
18
+ import { routeMetadataString as de, useAllChannelRoutes as fe, useChannelConnector as pe, useCreateChannelConnector as me, useDeleteChannelConnector as he, useFindChannelConnector as ge, useUpdateChannelConnector as _e, useUpdateChannelRoute as ve } from "../hooks/useChannels.js";
19
+ import { PLATFORM_CREDENTIALS as ye, connectorPlatform as be, useActiveOrganizationId as xe, useInboundChannel as Se, useProvisionChannel as Ce, validateCredentials as we } from "../hooks/useChannelSetup.js";
20
+ import { formatRelativeTime as h } from "../utils/formatters.js";
19
21
  import { toUnion as g } from "../utils/unions.js";
22
+ import { useGlobalChannels as Te, useInitiateSlackConnect as Ee, useLinkIntegrationConnection as De, useMyUserPlatformConnection as Oe, useRevokeSlackConnection as ke, useToggleSlackNotifications as Ae } from "../hooks/useUserPlatformConnection.js";
23
+ import { confirmAction as je } from "../utils/confirmAction.js";
24
+ import { graphqlErrorMessage as _, isNotFoundError as Me } from "../utils/errors.js";
25
+ import { PROVISIONED_CHANNEL_KEY as Ne, channelTypeLabel as Pe, provisionedChannelOf as Fe } from "../utils/channelConnectors.js";
20
26
  import "../permissions/index.js";
21
- import { useEffect as Ae, useMemo as je, useRef as Me, useState as _ } from "react";
22
- import { GlassCard as Ne, NextSteps as Pe, PagePurpose as Fe } from "@burdenoff/fe-libs/ui";
23
- import { Fragment as Ie, jsx as v, jsxs as y } from "react/jsx-runtime";
24
- import { useParams as Le, useSearchParams as Re } from "react-router";
25
- import { ArrowLeft as ze, Bell as Be, BellOff as Ve, CheckCircle2 as He, Edit as Ue, ExternalLink as We, Globe as b, Hash as x, Loader2 as Ge, MessageSquare as S, Palette as Ke, Plus as C, Power as qe, PowerOff as Je, Radio as w, Save as Ye, Settings as Xe, Shield as Ze, Slack as T, Trash2 as Qe, Unlink as $e, X as et } from "lucide-react";
26
- import { toast as E } from "sonner";
27
+ import { useEffect as Ie, useMemo as Le, useRef as Re, useState as v } from "react";
28
+ import { GlassCard as ze, NextSteps as Be, PagePurpose as Ve } from "@burdenoff/fe-libs/ui";
29
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
+ import { useParams as He, useSearchParams as Ue } from "react-router";
31
+ import { ArrowLeft as We, Bell as Ge, BellOff as Ke, CheckCircle2 as qe, Edit as Je, Globe as S, Hash as C, Info as Ye, Loader2 as Xe, MessageSquare as Ze, Plus as Qe, Power as $e, PowerOff as et, Radio as tt, Save as nt, Settings as rt, Shield as it, Slack as w, Trash2 as at, Unlink as ot, X as st } from "lucide-react";
32
+ import { toast as T } from "sonner";
27
33
  // src/botlit/pages/ChannelDetailPage.tsx
28
- var D = [
34
+ var E = [
29
35
  "WEB_WIDGET",
30
36
  "SLACK",
31
37
  "TEAMS",
@@ -33,1067 +39,927 @@ var D = [
33
39
  "WHATSAPP",
34
40
  "WEBHOOK",
35
41
  "CUSTOM"
36
- ], tt = [
42
+ ], ct = [
37
43
  "PRIVATE",
38
44
  "WORKSPACE",
39
45
  "PUBLIC"
40
- ];
41
- function nt(e) {
42
- return e.split(",").map((e) => e.trim()).filter(Boolean);
43
- }
44
- var rt = ({ type: e }) => {
46
+ ], lt = 255, ut = 2e3, dt = "channel-connector-create-form", ft = "channel-connector-edit-form", D = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", pt = ({ type: e }) => {
45
47
  switch (e) {
46
- case "SLACK": return /* @__PURE__ */ v(x, { size: 18 });
47
- case "WEB_WIDGET": return /* @__PURE__ */ v(b, { size: 18 });
48
- case "TEAMS": return /* @__PURE__ */ v(S, { size: 18 });
49
- default: return /* @__PURE__ */ v(w, { size: 18 });
48
+ case "SLACK": return /* @__PURE__ */ b(C, { size: 18 });
49
+ case "WEB_WIDGET": return /* @__PURE__ */ b(S, { size: 18 });
50
+ case "TEAMS": return /* @__PURE__ */ b(Ze, { size: 18 });
51
+ default: return /* @__PURE__ */ b(tt, { size: 18 });
50
52
  }
51
- }, O = ({ isNew: b }) => {
52
- let { connectorId: x } = Le(), { navigateTo: O, workspaceId: it } = e(), [k, at] = Re(), { data: A, loading: ot, refetch: st } = ge(b ? void 0 : x), { data: ct, refetch: lt } = _e(x), { data: ut } = t(), [dt, ft] = ve(), [j, M] = Se(), [pt, mt] = be(), [ht, gt] = ye(), N = le(), _t = xe(), { provision: vt, discard: yt, loading: bt } = de(), xt = je(() => ({
53
- channelType: oe.Communication,
54
- organizationId: N ?? void 0
55
- }), [N]), { data: St } = we(xt), Ct = A && ce(A.type) ? A.credentialsRefId : void 0, { data: wt, loading: Tt, error: Et, refetch: Dt } = ue(Ct), P = A?.type === "SLACK" && A?.credentialsRefId ? A.credentialsRefId : void 0, { data: F, loading: Ot, refetch: I } = De(P), { initiate: kt } = Te(), { link: At, loading: jt } = Ee(), { toggle: Mt, loading: Nt } = ke(), { revoke: Pt, loading: Ft } = Oe(), [It, L] = _(null), Lt = Me(!1);
56
- Ae(() => {
57
- if (Lt.current) return;
58
- let e = k.get("integrationConnectionId"), t = k.get("channelId");
53
+ }, O = ({ isNew: S }) => {
54
+ let C = i(), { connectorId: O } = He(), { navigateTo: k, workspaceId: mt } = e(), [A, ht] = Ue(), { data: j, loading: gt, error: M, refetch: _t } = pe(S ? void 0 : O), { data: N, loading: vt, error: P, refetch: F } = fe(S ? void 0 : O), I = !vt && !P, { data: yt } = ee(), [bt, xt] = me(), [St, Ct] = _e(), [wt, Tt] = he(), [Et] = ve(), L = xe(), Dt = ge(), { provision: Ot, discard: kt, loading: At } = Ce(), jt = Le(() => ({
55
+ channelType: ue.Communication,
56
+ organizationId: L ?? void 0
57
+ }), [L]), { data: Mt } = Te(jt), Nt = j && be(j.type) ? j.credentialsRefId : void 0, { data: Pt, loading: Ft, error: It, refetch: Lt } = Se(Nt), Rt = j?.type === "SLACK" && j?.credentialsRefId ? j.credentialsRefId : void 0, { data: R, loading: zt, refetch: z } = Oe(Rt), { initiate: Bt } = Ee(), { link: Vt, loading: Ht } = De(), { toggle: Ut, loading: Wt } = Ae(), { revoke: Gt, loading: Kt } = ke(), [qt, Jt] = v(null), Yt = Re(!1);
58
+ Ie(() => {
59
+ if (Yt.current) return;
60
+ let e = A.get("integrationConnectionId"), t = A.get("channelId");
59
61
  if (!e || !t) return;
60
- Lt.current = !0;
61
- let n = new URLSearchParams(k);
62
- n.delete("integrationConnectionId"), n.delete("channelId"), at(n, { replace: !0 }), L(null), At(e, t).then((e) => {
63
- e ? I() : L("Failed to link Slack connection. Please try again.");
62
+ Yt.current = !0;
63
+ let n = new URLSearchParams(A);
64
+ n.delete("integrationConnectionId"), n.delete("channelId"), ht(n, { replace: !0 }), Jt(null), Vt(e, t).then((e) => {
65
+ e ? z() : Jt(C("botlit.channelDetail.slack.linkFailed", "Failed to link Slack connection. Please try again."));
64
66
  });
65
67
  }, [
66
- k,
67
- at,
68
- At,
69
- I
68
+ A,
69
+ ht,
70
+ Vt,
71
+ z,
72
+ C
70
73
  ]);
71
- let Rt = () => {
72
- if (!P) return;
74
+ let Xt = () => {
75
+ if (!Rt) return;
73
76
  let e = `${window.location.origin}${window.location.pathname}`;
74
- kt(P, e);
75
- }, zt = async () => {
76
- F && await Mt(F.id, !F.notificationsEnabled) && await I();
77
- }, Bt = async () => {
78
- F && await Pt(F.id) && await I();
79
- }, [R, z] = _(!1), [Vt, Ht] = _(!1), [Ut, B] = _(!1), [V, H] = _({
80
- locationId: "*",
81
- locationName: "",
82
- botId: ""
83
- }), [U, W] = _({
77
+ Bt(Rt, e);
78
+ }, Zt = async () => {
79
+ R && await Ut(R.id, !R.notificationsEnabled) && await z();
80
+ }, Qt = async () => {
81
+ R && await Gt(R.id) && await z();
82
+ }, [B, $t] = v(!1), [en, V] = v(!1), [tn, nn] = v(null), rn = {
84
83
  name: "",
85
84
  description: "",
86
- type: g(k.get("type") ?? "WEB_WIDGET", D, "WEB_WIDGET"),
85
+ type: g(A.get("type") ?? "WEB_WIDGET", E, "WEB_WIDGET"),
87
86
  visibility: "PRIVATE",
88
87
  credentialsRefId: ""
89
- }), [Wt, Gt] = _(!0), [Kt, qt] = _("new"), [G, Jt] = _({}), K = ce(U.type), q = se[U.type], J = q ? Kt : "existing", Y = K && N ? St.filter((e) => e.organizationId === N && e.platform === K && e.status === "ACTIVE") : [], Yt = Y.some((e) => e.id === U.credentialsRefId), [X, Z] = _({
90
- allowedOrigins: "",
91
- primaryColor: "#3b82f6",
92
- fontFamily: "Inter, sans-serif",
93
- starterPrompts: ""
94
- }), Xt = () => {
95
- if (U.type === "WEB_WIDGET") return { [pe]: {
96
- allowedOrigins: nt(X.allowedOrigins),
97
- primaryColor: X.primaryColor,
98
- fontFamily: X.fontFamily,
99
- starterPrompts: nt(X.starterPrompts)
100
- } };
101
- }, Zt = async () => {
102
- if (!U.name) return;
103
- let e = Wt ? "ACTIVE" : "DRAFT";
104
- if (K && J === "existing" && !Yt) {
105
- E.error("Select the channel this connector routes");
106
- return;
107
- }
108
- let t;
109
- if (K && J === "new" && q) {
110
- let e = fe(q, G);
88
+ }, [H, U] = v(rn), [an, W] = v(rn), [on, G] = v(!1), [sn, K] = v(null), [cn, ln] = v(!0), [un, dn] = v("new"), [q, fn] = v({}), J = be(H.type), Y = ye[H.type], X = Y ? un : "existing", pn = J && L ? Mt.filter((e) => e.organizationId === L && e.platform === J && e.status === "ACTIVE") : [], mn = pn.some((e) => e.id === H.credentialsRefId), hn = JSON.stringify(H) !== JSON.stringify(an) || Object.values(q).some((e) => e.trim() !== "") || !!S && (!cn || un !== "new"), Z = {};
89
+ H.name.trim() || (Z.name = C("botlit.channelDetail.form.errors.nameRequired", "Enter a name for the connector.")), S && J && X === "existing" && !mn && (Z.channel = C("botlit.channelDetail.form.errors.channelRequired", "Select the channel this connector routes."));
90
+ let Q = (e) => on ? Z[e] : void 0;
91
+ Ie(() => {
92
+ if (!(S || B) || !hn) return;
93
+ let e = (e) => {
94
+ e.preventDefault(), e.returnValue = "";
95
+ };
96
+ return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
97
+ }, [
98
+ S,
99
+ B,
100
+ hn
101
+ ]);
102
+ let gn = async () => !hn || je({
103
+ title: C("botlit.channelDetail.discard.title", "Discard changes?"),
104
+ message: C("botlit.channelDetail.discard.message", "You have unsaved changes. If you leave now they will be lost."),
105
+ confirmLabel: C("botlit.common.discard", "Discard"),
106
+ cancelLabel: C("botlit.common.keepEditing", "Keep editing")
107
+ }), _n = async () => {
108
+ await gn() && (W(H), fn({}), k("channels"));
109
+ }, vn = async () => {
110
+ await gn() && ($t(!1), G(!1), K(null));
111
+ }, yn = async (e) => {
112
+ (!B || await gn()) && k(e);
113
+ }, bn = async (e) => {
114
+ if (e.preventDefault(), G(!0), K(null), Z.name || Z.channel) return;
115
+ let t = cn ? "ACTIVE" : "DRAFT", n = H.name.trim(), r;
116
+ if (J && X === "new" && Y) {
117
+ let e = we(Y, q);
111
118
  if (e) {
112
- E.error(e);
119
+ K(e);
113
120
  return;
114
121
  }
115
- if (!N) {
116
- E.error("Select an organization before connecting a channel");
122
+ if (!L) {
123
+ K(C("botlit.channelDetail.form.errors.organizationRequired", "Select an organization before connecting a channel."));
117
124
  return;
118
125
  }
119
126
  try {
120
- t = await vt({
121
- name: U.name,
122
- description: U.description || void 0,
123
- organizationId: N,
124
- definition: q,
125
- credentials: G
127
+ r = await Ot({
128
+ name: n,
129
+ description: H.description || void 0,
130
+ organizationId: L,
131
+ definition: Y,
132
+ credentials: q
126
133
  });
127
134
  } catch (e) {
128
- E.error(e instanceof Error ? e.message : "Failed to create the channel");
135
+ K(_(e, C("botlit.channelDetail.form.errors.provisionFailed", "Failed to create the channel.")));
129
136
  return;
130
137
  }
131
138
  }
132
139
  try {
133
- let n = await dt({
134
- name: U.name,
135
- type: U.type,
136
- description: U.description || void 0,
137
- visibility: U.visibility,
138
- status: e,
139
- credentialsRefId: K ? t ?? (J === "existing" ? U.credentialsRefId : void 0) : void 0,
140
- metadata: Xt()
140
+ let e = await bt({
141
+ name: n,
142
+ type: H.type,
143
+ description: H.description || void 0,
144
+ visibility: H.visibility,
145
+ status: t,
146
+ credentialsRefId: J ? r ?? (X === "existing" ? H.credentialsRefId : void 0) : void 0,
147
+ metadata: r ? { [Ne]: r } : void 0
141
148
  });
142
- Jt({}), E.success(`Channel "${n.name}" created`), O(`channels/${n.id}`);
149
+ fn({}), W(H), T.success(C("botlit.channelDetail.create.success", "Channel \"{{name}}\" created", { name: e.name })), k(`channels/${e.id}`);
143
150
  } catch (e) {
144
- if (t) {
145
- let e = t;
146
- await _t(e).catch(() => void 0) === null && await yt(e).catch(() => void 0);
151
+ if (r) {
152
+ let e = r;
153
+ await Dt(e).catch(() => void 0) === null && await kt(e).catch(() => void 0);
147
154
  }
148
- E.error(e instanceof Error ? e.message : "Failed to create channel connector");
155
+ K(_(e, C("botlit.channelDetail.create.error", "Failed to create channel connector.")));
149
156
  }
150
- }, Qt = async () => {
151
- if (!x || !A) return;
152
- let e = A.status !== "ACTIVE";
157
+ }, xn = async () => {
158
+ if (!O || !j) return;
159
+ let e = j.status !== "ACTIVE";
153
160
  try {
154
- await j({
155
- connectorId: x,
161
+ await St({
162
+ connectorId: O,
156
163
  input: { status: e ? "ACTIVE" : "DRAFT" }
157
- }), E.success(e ? "Connector activated" : "Connector deactivated"), st(), Dt();
164
+ }), T.success(e ? C("botlit.channelDetail.status.activated", "Connector activated") : C("botlit.channelDetail.status.deactivated", "Connector deactivated")), _t(), Lt();
158
165
  } catch (e) {
159
- E.error(e instanceof Error ? e.message : "Failed to change the connector status");
166
+ T.error(_(e, C("botlit.channelDetail.status.failed", "Failed to change the connector status.")));
160
167
  }
161
- }, $t = async () => {
162
- if (x && U.name) try {
163
- await j({
164
- connectorId: x,
168
+ }, Sn = async (e) => {
169
+ if (e.preventDefault(), G(!0), K(null), O && !Z.name) try {
170
+ await St({
171
+ connectorId: O,
165
172
  input: {
166
- name: U.name,
167
- description: U.description || void 0,
168
- visibility: U.visibility,
169
- credentialsRefId: U.credentialsRefId || void 0,
170
- metadata: Xt()
173
+ name: H.name.trim(),
174
+ description: H.description || void 0,
175
+ visibility: H.visibility,
176
+ credentialsRefId: H.credentialsRefId || void 0
171
177
  }
172
- }), E.success("Channel updated"), z(!1);
178
+ }), W(H), T.success(C("botlit.channelDetail.update.success", "Channel updated")), $t(!1), G(!1), _t();
173
179
  } catch (e) {
174
- E.error(e instanceof Error ? e.message : "Failed to update channel connector");
180
+ K(_(e, C("botlit.channelDetail.update.error", "Failed to update channel connector.")));
175
181
  }
176
- }, en = async () => {
177
- if (x) try {
178
- await pt(x), n() && te("success"), O("channels");
179
- } catch (e) {
180
- throw n() && te("error"), e;
182
+ }, Cn = async () => {
183
+ if (!O || !j || !I) return;
184
+ let e = N.length, i = Fe(j);
185
+ if (await je({
186
+ title: C("botlit.channelDetail.delete.title", "Delete connector?"),
187
+ message: [e > 0 ? C("botlit.channelDetail.delete.messageWithRoutes", "Delete \"{{name}}\"? Its {{count}} route(s) are deleted with it and this channel stops answering. This cannot be undone.", {
188
+ name: j.name,
189
+ count: e
190
+ }) : C("botlit.channelDetail.delete.message", "Delete \"{{name}}\"? This cannot be undone.", { name: j.name }), i ? C("botlit.channelDetail.delete.ownChannel", "The {{platform}} channel and the credentials saved for this connector are deleted too.", { platform: Pe(j.type, C) }) : ""].filter(Boolean).join(" "),
191
+ confirmLabel: C("botlit.common.delete", "Delete"),
192
+ cancelLabel: C("botlit.common.cancel", "Cancel")
193
+ })) {
194
+ n("medium");
195
+ try {
196
+ await wt(O);
197
+ } catch (e) {
198
+ t() && r("error"), T.error(_(e, C("botlit.channelDetail.delete.error", "The connector could not be deleted.")));
199
+ return;
200
+ }
201
+ if (t() && r("success"), T.success(C("botlit.channelDetail.delete.success", "Connector \"{{name}}\" deleted", { name: j.name })), i) try {
202
+ await Dt(i) === null && await kt(i);
203
+ } catch (e) {
204
+ T.warning(_(e, C("botlit.channelDetail.delete.channelLeft", "The connector was deleted, but its channel could not be removed. Delete it from Channels in Settings.")));
205
+ }
206
+ k("channels");
181
207
  }
182
- }, tn = async () => {
183
- if (!x || !V.locationId || !V.botId) return;
184
- let e = ut?.find((e) => e.id === V.botId);
208
+ }, wn = async (e) => {
209
+ nn(e.id);
210
+ let t = de(e, "locationName") ?? e.locationId;
185
211
  try {
186
- await ht({
187
- connectorId: x,
188
- locationId: V.locationId,
189
- appId: V.botId,
190
- metadata: {
191
- locationName: V.locationName || V.locationId,
192
- appName: e?.name
193
- }
194
- });
212
+ await Et({
213
+ routeId: e.id,
214
+ input: { isActive: !e.isActive }
215
+ }), T.success(e.isActive ? C("botlit.channelRoutes.toggle.off", "Route turned off: {{location}}", { location: t }) : C("botlit.channelRoutes.toggle.on", "Route turned on: {{location}}", { location: t })), F();
195
216
  } catch (e) {
196
- E.error(e instanceof Error ? e.message : "Failed to create route");
197
- return;
217
+ T.error(_(e, C("botlit.channelRoutes.toggle.failed", "The route could not be changed.")));
218
+ } finally {
219
+ nn(null);
198
220
  }
199
- E.success("Route created"), lt(), H({
200
- locationId: "*",
201
- locationName: "",
202
- botId: ""
203
- }), B(!1);
204
- }, nn = () => {
205
- if (!A) return;
206
- W({
207
- name: A.name,
208
- description: A.description || "",
209
- type: g(A.type, D, "CUSTOM"),
210
- visibility: g(A.visibility, tt, "PRIVATE"),
211
- credentialsRefId: A.credentialsRefId || ""
212
- });
213
- let e = me(A);
214
- e && Z({
215
- allowedOrigins: e.allowedOrigins.join(", "),
216
- primaryColor: e.primaryColor,
217
- fontFamily: e.fontFamily,
218
- starterPrompts: e.starterPrompts.join(", ")
219
- }), z(!0);
220
- };
221
- if (b) return /* @__PURE__ */ v(a, {
222
- title: "Create Channel Connector",
223
- description: "Set up a new channel for your AI agents",
224
- actions: /* @__PURE__ */ y("div", {
221
+ }, Tn = () => {
222
+ if (!j) return;
223
+ let e = {
224
+ name: j.name,
225
+ description: j.description || "",
226
+ type: g(j.type, E, "CUSTOM"),
227
+ visibility: g(j.visibility, ct, "PRIVATE"),
228
+ credentialsRefId: j.credentialsRefId || ""
229
+ };
230
+ U(e), W(e), G(!1), K(null), $t(!0);
231
+ }, En = /* @__PURE__ */ x(y, { children: [
232
+ /* @__PURE__ */ b("option", {
233
+ value: "PRIVATE",
234
+ children: C("botlit.visibility.private", "Private")
235
+ }),
236
+ /* @__PURE__ */ b("option", {
237
+ value: "WORKSPACE",
238
+ children: C("botlit.visibility.workspace", "Workspace")
239
+ }),
240
+ /* @__PURE__ */ b("option", {
241
+ value: "PUBLIC",
242
+ children: C("botlit.visibility.public", "Public")
243
+ })
244
+ ] }), Dn = sn && /* @__PURE__ */ b("p", {
245
+ role: "alert",
246
+ className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
247
+ children: sn
248
+ });
249
+ if (S) return /* @__PURE__ */ b(a, {
250
+ title: C("botlit.channelDetail.create.title", "Create Channel Connector"),
251
+ description: C("botlit.channelDetail.create.description", "Set up a new channel for your AI agents"),
252
+ actions: /* @__PURE__ */ x("div", {
225
253
  className: "flex gap-2",
226
- children: [/* @__PURE__ */ v(d, {
254
+ children: [/* @__PURE__ */ b(p, {
255
+ type: "button",
227
256
  variant: "outline",
228
- onClick: () => O("channels"),
229
- children: "Cancel"
230
- }), /* @__PURE__ */ v(d, {
231
- leftIcon: /* @__PURE__ */ v(Ye, { size: 16 }),
232
- onClick: Zt,
233
- isLoading: bt || ft.loading || M.loading,
234
- disabled: !U.name || !!K && J === "existing" && !Yt,
235
- children: "Create"
257
+ onClick: () => void _n(),
258
+ children: C("botlit.common.cancel", "Cancel")
259
+ }), /* @__PURE__ */ b(p, {
260
+ type: "submit",
261
+ form: dt,
262
+ leftIcon: /* @__PURE__ */ b(nt, { size: 16 }),
263
+ isLoading: At || xt.loading || Ct.loading,
264
+ children: C("botlit.common.create", "Create")
236
265
  })]
237
266
  }),
238
- children: /* @__PURE__ */ y("div", {
267
+ children: /* @__PURE__ */ x("form", {
268
+ id: dt,
269
+ noValidate: !0,
239
270
  className: "max-w-2xl space-y-6",
271
+ onSubmit: (e) => void bn(e),
240
272
  children: [
241
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(l, { children: /* @__PURE__ */ v(u, { children: "Basic Information" }) }), /* @__PURE__ */ y(s, {
273
+ Dn,
274
+ on && (Z.name || Z.channel) && /* @__PURE__ */ b("p", {
275
+ role: "alert",
276
+ className: "text-sm text-status-error-text",
277
+ children: C("botlit.channelDetail.form.errors.summary", "Fix the highlighted fields to create the connector.")
278
+ }),
279
+ /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(f, { children: C("botlit.channelDetail.form.basics", "Basic Information") }) }), /* @__PURE__ */ x(l, {
242
280
  className: "space-y-4",
243
281
  children: [
244
- /* @__PURE__ */ v(f, {
245
- label: "Connector Name",
282
+ /* @__PURE__ */ b(m, {
283
+ label: C("botlit.channelDetail.form.name", "Connector Name"),
284
+ htmlFor: "channel-connector-name",
246
285
  required: !0,
247
- children: /* @__PURE__ */ v(p, {
248
- placeholder: "e.g., Production Web Widget",
249
- value: U.name,
250
- onChange: (e) => W({
251
- ...U,
286
+ error: Q("name"),
287
+ children: /* @__PURE__ */ b(te, {
288
+ id: "channel-connector-name",
289
+ placeholder: C("botlit.channelDetail.form.namePlaceholder", "e.g., Production Slack"),
290
+ value: H.name,
291
+ maxLength: lt,
292
+ "aria-invalid": !!Q("name"),
293
+ onChange: (e) => U({
294
+ ...H,
252
295
  name: e.target.value
253
296
  })
254
297
  })
255
298
  }),
256
- /* @__PURE__ */ v(f, {
257
- label: "Description",
258
- children: /* @__PURE__ */ v(m, {
259
- placeholder: "What is this channel connector for?",
260
- value: U.description,
261
- onChange: (e) => W({
262
- ...U,
299
+ /* @__PURE__ */ b(m, {
300
+ label: C("botlit.channelDetail.form.description", "Description"),
301
+ htmlFor: "channel-connector-description",
302
+ children: /* @__PURE__ */ b(ne, {
303
+ id: "channel-connector-description",
304
+ placeholder: C("botlit.channelDetail.form.descriptionPlaceholder", "What is this channel connector for?"),
305
+ value: H.description,
306
+ maxLength: ut,
307
+ onChange: (e) => U({
308
+ ...H,
263
309
  description: e.target.value
264
310
  }),
265
311
  rows: 3
266
312
  })
267
313
  }),
268
- /* @__PURE__ */ y("div", {
314
+ /* @__PURE__ */ x("div", {
269
315
  className: "grid grid-cols-2 gap-4",
270
- children: [/* @__PURE__ */ v(f, {
271
- label: "Channel Type",
316
+ children: [/* @__PURE__ */ b(m, {
317
+ label: C("botlit.channelDetail.form.type", "Channel Type"),
318
+ htmlFor: "channel-connector-type",
272
319
  required: !0,
273
- children: /* @__PURE__ */ y("select", {
274
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
275
- value: U.type,
276
- onChange: (e) => W({
277
- ...U,
320
+ children: /* @__PURE__ */ b("select", {
321
+ id: "channel-connector-type",
322
+ className: D,
323
+ value: H.type,
324
+ onChange: (e) => U({
325
+ ...H,
278
326
  type: e.target.value,
279
327
  credentialsRefId: ""
280
328
  }),
281
- children: [
282
- /* @__PURE__ */ v("option", {
283
- value: "WEB_WIDGET",
284
- children: "Web Widget"
285
- }),
286
- /* @__PURE__ */ v("option", {
287
- value: "SLACK",
288
- children: "Slack"
289
- }),
290
- /* @__PURE__ */ v("option", {
291
- value: "TEAMS",
292
- children: "Microsoft Teams"
293
- }),
294
- /* @__PURE__ */ v("option", {
295
- value: "DISCORD",
296
- children: "Discord"
297
- }),
298
- /* @__PURE__ */ v("option", {
299
- value: "WHATSAPP",
300
- children: "WhatsApp"
301
- }),
302
- /* @__PURE__ */ v("option", {
303
- value: "WEBHOOK",
304
- children: "Webhook"
305
- }),
306
- /* @__PURE__ */ v("option", {
307
- value: "CUSTOM",
308
- children: "Custom"
309
- })
310
- ]
329
+ children: E.map((e) => /* @__PURE__ */ b("option", {
330
+ value: e,
331
+ children: Pe(e, C)
332
+ }, e))
311
333
  })
312
- }), /* @__PURE__ */ v(f, {
313
- label: "Visibility",
314
- children: /* @__PURE__ */ y("select", {
315
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
316
- value: U.visibility,
317
- onChange: (e) => W({
318
- ...U,
334
+ }), /* @__PURE__ */ b(m, {
335
+ label: C("botlit.channelDetail.form.visibility", "Visibility"),
336
+ htmlFor: "channel-connector-visibility",
337
+ children: /* @__PURE__ */ b("select", {
338
+ id: "channel-connector-visibility",
339
+ className: D,
340
+ value: H.visibility,
341
+ onChange: (e) => U({
342
+ ...H,
319
343
  visibility: e.target.value
320
344
  }),
321
- children: [
322
- /* @__PURE__ */ v("option", {
323
- value: "PRIVATE",
324
- children: "Private"
325
- }),
326
- /* @__PURE__ */ v("option", {
327
- value: "WORKSPACE",
328
- children: "Workspace"
329
- }),
330
- /* @__PURE__ */ v("option", {
331
- value: "PUBLIC",
332
- children: "Public"
333
- })
334
- ]
345
+ children: En
335
346
  })
336
347
  })]
337
348
  }),
338
- /* @__PURE__ */ y("label", {
349
+ /* @__PURE__ */ x("label", {
339
350
  className: "flex items-start gap-2 text-sm",
340
- children: [/* @__PURE__ */ v("input", {
351
+ children: [/* @__PURE__ */ b("input", {
341
352
  type: "checkbox",
342
353
  className: "mt-1",
343
- checked: Wt,
344
- onChange: (e) => Gt(e.target.checked)
345
- }), /* @__PURE__ */ y("span", { children: [/* @__PURE__ */ v("span", {
354
+ checked: cn,
355
+ onChange: (e) => ln(e.target.checked)
356
+ }), /* @__PURE__ */ x("span", { children: [/* @__PURE__ */ b("span", {
346
357
  className: "font-medium",
347
- children: "Activate now"
348
- }), /* @__PURE__ */ v("span", {
358
+ children: C("botlit.channelDetail.form.activateNow", "Activate now")
359
+ }), /* @__PURE__ */ b("span", {
349
360
  className: "block text-text-secondary",
350
- children: "Only an active connector receives messages. Leave unchecked to save it as a draft and activate it later."
361
+ children: C("botlit.channelDetail.form.activateNowHint", "Only an active connector receives messages. Leave unchecked to save it as a draft and activate it later.")
351
362
  })] })]
352
363
  })
353
364
  ]
354
365
  })] }),
355
- K && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(l, { children: [/* @__PURE__ */ y(u, {
366
+ J && /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ x(d, { children: [/* @__PURE__ */ x(f, {
356
367
  className: "flex items-center gap-2",
357
- children: [/* @__PURE__ */ v(w, { size: 18 }), "Platform Connection"]
358
- }), /* @__PURE__ */ v(c, { children: q ? "Enter the credentials of your platform app, or link a channel that is already set up." : "Link a channel that is already set up for this platform." })] }), /* @__PURE__ */ y(s, {
368
+ children: [/* @__PURE__ */ b(tt, { size: 18 }), C("botlit.channelDetail.platform.title", "Platform Connection")]
369
+ }), /* @__PURE__ */ b(u, { children: Y ? C("botlit.channelDetail.platform.descriptionCredentials", "Enter the credentials of your platform app, or link a channel that is already set up.") : C("botlit.channelDetail.platform.descriptionExisting", "Link a channel that is already set up for this platform.") })] }), /* @__PURE__ */ x(l, {
359
370
  className: "space-y-4",
360
- children: [q && /* @__PURE__ */ y("div", {
371
+ children: [Y && /* @__PURE__ */ x("div", {
361
372
  className: "flex gap-4 text-sm",
362
373
  role: "radiogroup",
363
- children: [/* @__PURE__ */ y("label", {
374
+ "aria-label": C("botlit.channelDetail.platform.mode", "Connection method"),
375
+ children: [/* @__PURE__ */ x("label", {
364
376
  className: "flex items-center gap-2",
365
- children: [/* @__PURE__ */ v("input", {
377
+ children: [/* @__PURE__ */ b("input", {
366
378
  type: "radio",
367
379
  name: "connection-mode",
368
- checked: J === "new",
369
- onChange: () => qt("new")
370
- }), "Connect with credentials"]
371
- }), /* @__PURE__ */ y("label", {
380
+ checked: X === "new",
381
+ onChange: () => dn("new")
382
+ }), C("botlit.channelDetail.platform.modeNew", "Connect with credentials")]
383
+ }), /* @__PURE__ */ x("label", {
372
384
  className: "flex items-center gap-2",
373
- children: [/* @__PURE__ */ v("input", {
385
+ children: [/* @__PURE__ */ b("input", {
374
386
  type: "radio",
375
387
  name: "connection-mode",
376
- checked: J === "existing",
377
- onChange: () => qt("existing")
378
- }), "Use an existing channel"]
388
+ checked: X === "existing",
389
+ onChange: () => dn("existing")
390
+ }), C("botlit.channelDetail.platform.modeExisting", "Use an existing channel")]
379
391
  })]
380
- }), J === "new" && q ? /* @__PURE__ */ v(ie, {
381
- definition: q,
382
- values: G,
383
- onChange: Jt
384
- }) : /* @__PURE__ */ v(f, {
385
- label: "Channel",
386
- description: "Channels of this platform in your organization",
387
- children: /* @__PURE__ */ y("select", {
388
- "aria-label": "Channel",
389
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
390
- value: U.credentialsRefId,
391
- onChange: (e) => W({
392
- ...U,
392
+ }), X === "new" && Y ? /* @__PURE__ */ b(ce, {
393
+ definition: Y,
394
+ values: q,
395
+ onChange: fn
396
+ }) : /* @__PURE__ */ b(m, {
397
+ label: C("botlit.channelDetail.platform.channel", "Channel"),
398
+ htmlFor: "channel-connector-channel",
399
+ description: C("botlit.channelDetail.platform.channelHint", "Channels of this platform in your organization"),
400
+ required: !0,
401
+ error: Q("channel"),
402
+ children: /* @__PURE__ */ x("select", {
403
+ id: "channel-connector-channel",
404
+ className: D,
405
+ value: H.credentialsRefId,
406
+ "aria-invalid": !!Q("channel"),
407
+ onChange: (e) => U({
408
+ ...H,
393
409
  credentialsRefId: e.target.value
394
410
  }),
395
- children: [/* @__PURE__ */ v("option", {
411
+ children: [/* @__PURE__ */ b("option", {
396
412
  value: "",
397
- children: Y.length > 0 ? "Select a channel..." : "No channels of this platform yet"
398
- }), Y.map((e) => /* @__PURE__ */ v("option", {
413
+ children: pn.length > 0 ? C("botlit.channelDetail.platform.channelPlaceholder", "Select a channel...") : C("botlit.channelDetail.platform.noChannels", "No channels of this platform yet")
414
+ }), pn.map((e) => /* @__PURE__ */ b("option", {
399
415
  value: e.id,
400
416
  children: e.name
401
417
  }, e.id))]
402
418
  })
403
419
  })]
404
420
  })] }),
405
- U.type === "WEB_WIDGET" && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(l, { children: /* @__PURE__ */ y(u, {
406
- className: "flex items-center gap-2",
407
- children: [/* @__PURE__ */ v(Ke, { size: 18 }), "Widget Configuration"]
408
- }) }), /* @__PURE__ */ y(s, {
409
- className: "space-y-4",
410
- children: [
411
- /* @__PURE__ */ v(f, {
412
- label: "Allowed Origins",
413
- description: "Comma-separated list of domains",
414
- children: /* @__PURE__ */ v(p, {
415
- placeholder: "e.g., https://example.com, https://app.example.com",
416
- value: X.allowedOrigins,
417
- onChange: (e) => Z({
418
- ...X,
419
- allowedOrigins: e.target.value
420
- })
421
- })
422
- }),
423
- /* @__PURE__ */ y("div", {
424
- className: "grid grid-cols-2 gap-4",
425
- children: [/* @__PURE__ */ v(f, {
426
- label: "Primary Color",
427
- children: /* @__PURE__ */ y("div", {
428
- className: "flex gap-2",
429
- children: [/* @__PURE__ */ v("input", {
430
- type: "color",
431
- value: X.primaryColor,
432
- onChange: (e) => Z({
433
- ...X,
434
- primaryColor: e.target.value
435
- }),
436
- className: "h-10 w-16 rounded border border-border-default"
437
- }), /* @__PURE__ */ v(p, {
438
- value: X.primaryColor,
439
- onChange: (e) => Z({
440
- ...X,
441
- primaryColor: e.target.value
442
- })
443
- })]
444
- })
445
- }), /* @__PURE__ */ v(f, {
446
- label: "Font Family",
447
- children: /* @__PURE__ */ v(p, {
448
- value: X.fontFamily,
449
- onChange: (e) => Z({
450
- ...X,
451
- fontFamily: e.target.value
452
- })
453
- })
454
- })]
455
- }),
456
- /* @__PURE__ */ v(f, {
457
- label: "Starter Prompts",
458
- description: "One per line",
459
- children: /* @__PURE__ */ v(m, {
460
- placeholder: "What can you help me with?",
461
- value: X.starterPrompts,
462
- onChange: (e) => Z({
463
- ...X,
464
- starterPrompts: e.target.value
465
- }),
466
- rows: 3
467
- })
468
- })
469
- ]
470
- })] })
421
+ H.type === "WEB_WIDGET" && /* @__PURE__ */ x("div", {
422
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
423
+ children: [/* @__PURE__ */ b(Ye, {
424
+ size: 18,
425
+ "aria-hidden": "true",
426
+ className: "mt-0.5 shrink-0 text-text-secondary"
427
+ }), /* @__PURE__ */ b("p", {
428
+ className: "text-text-secondary",
429
+ children: C("botlit.channelDetail.webWidget.note", "To put an assistant on your website, publish it from the agent: open the agent and use its Website panel, which sets the allowed sites and gives you the embed code.")
430
+ })]
431
+ })
471
432
  ]
472
433
  })
473
434
  });
474
- if (ot) return /* @__PURE__ */ v(a, {
475
- title: "Loading...",
476
- children: /* @__PURE__ */ v("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
435
+ if (gt) return /* @__PURE__ */ b(a, {
436
+ title: C("botlit.common.loading", "Loading..."),
437
+ children: /* @__PURE__ */ b("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
438
+ });
439
+ if (M && !Me(M)) return /* @__PURE__ */ b(a, {
440
+ title: C("botlit.channelDetail.loadError.title", "Connector unavailable"),
441
+ children: /* @__PURE__ */ b(oe, {
442
+ resource: C("botlit.channelDetail.resource", "this channel connector"),
443
+ error: M,
444
+ onRetry: () => void _t()
445
+ })
477
446
  });
478
- if (!A) return /* @__PURE__ */ v(a, {
479
- title: "Connector Not Found",
480
- children: /* @__PURE__ */ v(re, {
447
+ if (!j) return /* @__PURE__ */ b(a, {
448
+ title: C("botlit.channelDetail.notFound.title", "Connector Not Found"),
449
+ children: /* @__PURE__ */ b(ae, {
481
450
  illustration: "empty-notifications",
482
- title: "Connector Not Found",
483
- description: "This channel connector doesn't exist.",
484
- action: /* @__PURE__ */ v(d, {
485
- onClick: () => O("channels"),
486
- children: "Back to Channels"
451
+ title: C("botlit.channelDetail.notFound.title", "Connector Not Found"),
452
+ description: C("botlit.channelDetail.notFound.description", "This channel connector doesn't exist in this workspace."),
453
+ action: /* @__PURE__ */ b(p, {
454
+ onClick: () => k("channels"),
455
+ children: C("botlit.channelDetail.backToChannels", "Back to Channels")
487
456
  })
488
457
  })
489
458
  });
490
- let Q = ct?.filter((e) => e.connectorId === A.id) || [], rn = g(A.type, D, "CUSTOM"), $ = me(A);
491
- return /* @__PURE__ */ v(a, {
492
- title: /* @__PURE__ */ y("div", {
459
+ let $ = g(j.type, E, "CUSTOM"), On = N.filter((e) => e.isActive).length, kn = (e) => yt.find((t) => t.id === e.appId)?.name ?? de(e, "appName") ?? C("botlit.channelRoutes.unknownBot", "Unknown bot");
460
+ return /* @__PURE__ */ b(a, {
461
+ title: /* @__PURE__ */ x("div", {
493
462
  className: "flex items-center gap-3",
494
463
  children: [
495
- /* @__PURE__ */ v(d, {
464
+ /* @__PURE__ */ b(p, {
496
465
  variant: "ghost",
497
466
  size: "icon",
498
- onClick: () => O("channels"),
499
- children: /* @__PURE__ */ v(ze, { size: 20 })
467
+ "aria-label": C("botlit.channelDetail.backToChannels", "Back to Channels"),
468
+ onClick: () => void yn("channels"),
469
+ children: /* @__PURE__ */ b(We, { size: 20 })
500
470
  }),
501
- /* @__PURE__ */ v("div", {
471
+ /* @__PURE__ */ b("div", {
502
472
  className: "p-2 rounded-lg bg-action-primary-bg/10",
503
- children: /* @__PURE__ */ v(rt, { type: rn })
473
+ children: /* @__PURE__ */ b(pt, { type: $ })
504
474
  }),
505
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
475
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
506
476
  className: "flex items-center gap-2",
507
- children: [/* @__PURE__ */ v("span", { children: A.name }), /* @__PURE__ */ v(ne, { status: A.status })]
508
- }), /* @__PURE__ */ v("p", {
477
+ children: [/* @__PURE__ */ b("span", { children: j.name }), /* @__PURE__ */ b(ie, { status: j.status })]
478
+ }), /* @__PURE__ */ b("p", {
509
479
  className: "text-sm font-normal text-text-secondary",
510
- children: A.description
480
+ children: j.description
511
481
  })] })
512
482
  ]
513
483
  }),
514
- actions: /* @__PURE__ */ y("div", {
484
+ actions: /* @__PURE__ */ x("div", {
515
485
  className: "flex gap-2",
516
- children: [/* @__PURE__ */ v(i, {
517
- permission: r.CHANNEL_CREATE,
518
- children: /* @__PURE__ */ v(d, {
486
+ children: [/* @__PURE__ */ b(s, {
487
+ permission: o.CHANNEL_CREATE,
488
+ children: /* @__PURE__ */ b(p, {
519
489
  variant: "outline",
520
- leftIcon: /* @__PURE__ */ v(C, { size: 16 }),
521
- onClick: () => B(!0),
522
- children: "Add Route"
490
+ leftIcon: /* @__PURE__ */ b(Qe, { size: 16 }),
491
+ onClick: () => V(!0),
492
+ children: C("botlit.channelDetail.routes.add", "Add Route")
523
493
  })
524
- }), R ? /* @__PURE__ */ y(Ie, { children: [/* @__PURE__ */ v(d, {
494
+ }), B ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(p, {
495
+ type: "button",
525
496
  variant: "outline",
526
- onClick: () => z(!1),
527
- children: "Cancel"
528
- }), /* @__PURE__ */ v(d, {
529
- leftIcon: /* @__PURE__ */ v(Ye, { size: 16 }),
530
- onClick: $t,
531
- isLoading: M.loading,
532
- children: "Save"
533
- })] }) : /* @__PURE__ */ y(Ie, { children: [
534
- /* @__PURE__ */ v(i, {
535
- permission: r.CHANNEL_UPDATE,
536
- children: /* @__PURE__ */ v(d, {
537
- variant: A.status === "ACTIVE" ? "outline" : "primary",
538
- leftIcon: A.status === "ACTIVE" ? /* @__PURE__ */ v(Je, { size: 16 }) : /* @__PURE__ */ v(qe, { size: 16 }),
539
- onClick: () => void Qt(),
540
- isLoading: M.loading && !R,
541
- children: A.status === "ACTIVE" ? "Deactivate" : "Activate"
497
+ onClick: () => void vn(),
498
+ children: C("botlit.common.cancel", "Cancel")
499
+ }), /* @__PURE__ */ b(p, {
500
+ type: "submit",
501
+ form: ft,
502
+ leftIcon: /* @__PURE__ */ b(nt, { size: 16 }),
503
+ isLoading: Ct.loading,
504
+ children: C("botlit.common.save", "Save")
505
+ })] }) : /* @__PURE__ */ x(y, { children: [
506
+ /* @__PURE__ */ b(s, {
507
+ permission: o.CHANNEL_UPDATE,
508
+ children: /* @__PURE__ */ b(p, {
509
+ variant: j.status === "ACTIVE" ? "outline" : "primary",
510
+ leftIcon: j.status === "ACTIVE" ? /* @__PURE__ */ b(et, { size: 16 }) : /* @__PURE__ */ b($e, { size: 16 }),
511
+ onClick: () => void xn(),
512
+ isLoading: Ct.loading && !B,
513
+ children: j.status === "ACTIVE" ? C("botlit.channelDetail.actions.deactivate", "Deactivate") : C("botlit.channelDetail.actions.activate", "Activate")
542
514
  })
543
515
  }),
544
- /* @__PURE__ */ v(i, {
545
- permission: r.CHANNEL_UPDATE,
546
- children: /* @__PURE__ */ v(d, {
516
+ /* @__PURE__ */ b(s, {
517
+ permission: o.CHANNEL_UPDATE,
518
+ children: /* @__PURE__ */ b(p, {
547
519
  variant: "outline",
548
- leftIcon: /* @__PURE__ */ v(Ue, { size: 16 }),
549
- onClick: nn,
550
- children: "Edit"
520
+ leftIcon: /* @__PURE__ */ b(Je, { size: 16 }),
521
+ onClick: Tn,
522
+ children: C("botlit.common.edit", "Edit")
551
523
  })
552
524
  }),
553
- Vt ? /* @__PURE__ */ y("div", {
554
- className: "flex gap-2",
555
- children: [/* @__PURE__ */ v(d, {
556
- variant: "outline",
557
- size: "sm",
558
- onClick: () => Ht(!1),
559
- children: "Cancel"
560
- }), /* @__PURE__ */ v(d, {
561
- variant: "destructive",
562
- size: "sm",
563
- onClick: () => {
564
- ee("medium"), en();
565
- },
566
- isLoading: mt.loading,
567
- children: "Confirm"
568
- })]
569
- }) : /* @__PURE__ */ v(i, {
570
- permission: r.CHANNEL_DELETE,
571
- children: /* @__PURE__ */ v(d, {
525
+ /* @__PURE__ */ b(s, {
526
+ permission: o.CHANNEL_DELETE,
527
+ children: /* @__PURE__ */ b(p, {
572
528
  variant: "destructive",
573
- leftIcon: /* @__PURE__ */ v(Qe, { size: 16 }),
574
- onClick: () => Ht(!0),
575
- children: "Delete"
529
+ leftIcon: /* @__PURE__ */ b(at, { size: 16 }),
530
+ isLoading: Tt.loading,
531
+ disabled: !I,
532
+ title: I ? void 0 : C("botlit.channelDetail.delete.waitForRoutes", "Available once this connector’s routes have loaded."),
533
+ onClick: () => void Cn(),
534
+ children: C("botlit.common.delete", "Delete")
576
535
  })
577
536
  })
578
537
  ] })]
579
538
  }),
580
- children: /* @__PURE__ */ y("div", {
539
+ children: /* @__PURE__ */ x("div", {
581
540
  className: "space-y-6",
582
541
  children: [
583
- /* @__PURE__ */ v(Fe, {
584
- icon: /* @__PURE__ */ v(w, { size: 18 }),
585
- children: "This connector links BotManor to one messaging platform. From here you add routes — each mapping a specific location on the channel (a Slack channel, a widget, a number) to the bot that should answer there — tweak the connector’s settings, and manage its connection. Set up at least one route so messages on this channel reach a bot."
542
+ /* @__PURE__ */ b(Ve, {
543
+ icon: /* @__PURE__ */ b(tt, { size: 18 }),
544
+ children: C("botlit.channelDetail.purpose", "This connector links BotManor to one messaging platform. From here you add routes — each mapping a location on the channel (a Slack channel, a number, or * for every location) to the bot that should answer there — change the connector settings, and manage its connection. Add at least one route that is turned on so messages on this channel reach a bot.")
586
545
  }),
587
- /* @__PURE__ */ v(Pe, {
588
- storageKey: `botlit-channel-${A.id}`,
546
+ /* @__PURE__ */ b(Be, {
547
+ storageKey: `botlit-channel-${j.id}`,
589
548
  steps: [
590
549
  {
591
550
  id: "route",
592
- label: "Add a route",
593
- description: "Point an incoming location on this channel at one of your bots.",
594
- icon: /* @__PURE__ */ v(C, { size: 16 }),
595
- onClick: () => B(!0),
596
- done: Q.length > 0
551
+ label: C("botlit.channelDetail.next.route", "Add a route"),
552
+ description: C("botlit.channelDetail.next.routeDescription", "Point an incoming location on this channel at one of your bots."),
553
+ icon: /* @__PURE__ */ b(Qe, { size: 16 }),
554
+ onClick: () => V(!0),
555
+ done: On > 0
597
556
  },
598
557
  {
599
558
  id: "edit",
600
- label: "Review connector settings",
601
- description: "Confirm the name, visibility and channel-specific configuration.",
602
- icon: /* @__PURE__ */ v(Xe, { size: 16 }),
603
- onClick: nn
559
+ label: C("botlit.channelDetail.next.edit", "Review connector settings"),
560
+ description: C("botlit.channelDetail.next.editDescription", "Confirm the name, visibility and channel-specific configuration."),
561
+ icon: /* @__PURE__ */ b(rt, { size: 16 }),
562
+ onClick: Tn
604
563
  },
605
564
  {
606
565
  id: "bots",
607
- label: "Check your bots",
608
- description: "Make sure the bot you are routing to is active and configured.",
609
- icon: /* @__PURE__ */ v(S, { size: 16 }),
610
- onClick: () => O("bots")
566
+ label: C("botlit.channelDetail.next.bots", "Check your bots"),
567
+ description: C("botlit.channelDetail.next.botsDescription", "Make sure the bot you are routing to is active and configured."),
568
+ icon: /* @__PURE__ */ b(Ze, { size: 16 }),
569
+ onClick: () => void yn("bots")
611
570
  }
612
571
  ]
613
572
  }),
614
- Ut && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(l, {
615
- className: "flex flex-row items-center justify-between",
616
- children: [/* @__PURE__ */ v(u, { children: "Add Route" }), /* @__PURE__ */ v(d, {
617
- variant: "ghost",
618
- size: "icon",
619
- onClick: () => B(!1),
620
- children: /* @__PURE__ */ v(et, { size: 16 })
621
- })]
622
- }), /* @__PURE__ */ y(s, {
623
- className: "space-y-4",
624
- children: [
625
- /* @__PURE__ */ y("div", {
626
- className: "grid grid-cols-2 gap-4",
627
- children: [/* @__PURE__ */ v(f, {
628
- label: "Location ID",
629
- required: !0,
630
- children: /* @__PURE__ */ v(p, {
631
- placeholder: "* for every location, or a Slack channel ID",
632
- value: V.locationId,
633
- onChange: (e) => H({
634
- ...V,
635
- locationId: e.target.value
636
- })
637
- })
638
- }), /* @__PURE__ */ v(f, {
639
- label: "Location Name",
640
- children: /* @__PURE__ */ v(p, {
641
- placeholder: "Friendly name (optional)",
642
- value: V.locationName,
643
- onChange: (e) => H({
644
- ...V,
645
- locationName: e.target.value
646
- })
647
- })
648
- })]
649
- }),
650
- /* @__PURE__ */ v(f, {
651
- label: "Connect to Bot",
652
- required: !0,
653
- children: /* @__PURE__ */ y("select", {
654
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
655
- value: V.botId,
656
- onChange: (e) => H({
657
- ...V,
658
- botId: e.target.value
659
- }),
660
- children: [/* @__PURE__ */ v("option", {
661
- value: "",
662
- children: "Select a bot..."
663
- }), ut?.map((e) => /* @__PURE__ */ v("option", {
664
- value: e.id,
665
- children: e.name
666
- }, e.id))]
667
- })
668
- }),
669
- /* @__PURE__ */ y("div", {
670
- className: "flex justify-end gap-2",
671
- children: [/* @__PURE__ */ v(d, {
672
- variant: "outline",
673
- onClick: () => B(!1),
674
- children: "Cancel"
675
- }), /* @__PURE__ */ v(d, {
676
- onClick: tn,
677
- isLoading: gt.loading,
678
- disabled: !V.locationId || !V.botId,
679
- children: "Add Route"
680
- })]
681
- })
682
- ]
683
- })] }),
684
- R && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(l, { children: /* @__PURE__ */ v(u, { children: "Edit Channel" }) }), /* @__PURE__ */ y(s, {
573
+ B && /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(f, { children: C("botlit.channelDetail.edit.title", "Edit Channel") }) }), /* @__PURE__ */ b(l, { children: /* @__PURE__ */ x("form", {
574
+ id: ft,
575
+ noValidate: !0,
685
576
  className: "space-y-4",
577
+ onSubmit: (e) => void Sn(e),
686
578
  children: [
687
- /* @__PURE__ */ v(f, {
688
- label: "Connector Name",
579
+ Dn,
580
+ /* @__PURE__ */ b(m, {
581
+ label: C("botlit.channelDetail.form.name", "Connector Name"),
582
+ htmlFor: "channel-connector-edit-name",
689
583
  required: !0,
690
- children: /* @__PURE__ */ v(p, {
691
- value: U.name,
692
- onChange: (e) => W({
693
- ...U,
584
+ error: Q("name"),
585
+ children: /* @__PURE__ */ b(te, {
586
+ id: "channel-connector-edit-name",
587
+ value: H.name,
588
+ maxLength: lt,
589
+ "aria-invalid": !!Q("name"),
590
+ onChange: (e) => U({
591
+ ...H,
694
592
  name: e.target.value
695
593
  })
696
594
  })
697
595
  }),
698
- /* @__PURE__ */ v(f, {
699
- label: "Description",
700
- children: /* @__PURE__ */ v(m, {
701
- value: U.description,
702
- onChange: (e) => W({
703
- ...U,
596
+ /* @__PURE__ */ b(m, {
597
+ label: C("botlit.channelDetail.form.description", "Description"),
598
+ htmlFor: "channel-connector-edit-description",
599
+ children: /* @__PURE__ */ b(ne, {
600
+ id: "channel-connector-edit-description",
601
+ value: H.description,
602
+ maxLength: ut,
603
+ onChange: (e) => U({
604
+ ...H,
704
605
  description: e.target.value
705
606
  }),
706
607
  rows: 2
707
608
  })
708
609
  }),
709
- /* @__PURE__ */ v(f, {
710
- label: "Visibility",
711
- children: /* @__PURE__ */ y("select", {
712
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
713
- value: U.visibility,
714
- onChange: (e) => W({
715
- ...U,
610
+ /* @__PURE__ */ b(m, {
611
+ label: C("botlit.channelDetail.form.visibility", "Visibility"),
612
+ htmlFor: "channel-connector-edit-visibility",
613
+ children: /* @__PURE__ */ b("select", {
614
+ id: "channel-connector-edit-visibility",
615
+ className: D,
616
+ value: H.visibility,
617
+ onChange: (e) => U({
618
+ ...H,
716
619
  visibility: e.target.value
717
620
  }),
718
- children: [
719
- /* @__PURE__ */ v("option", {
720
- value: "PRIVATE",
721
- children: "Private"
722
- }),
723
- /* @__PURE__ */ v("option", {
724
- value: "WORKSPACE",
725
- children: "Workspace"
726
- }),
727
- /* @__PURE__ */ v("option", {
728
- value: "PUBLIC",
729
- children: "Public"
730
- })
731
- ]
621
+ children: En
732
622
  })
733
623
  })
734
624
  ]
735
- })] }),
736
- /* @__PURE__ */ y("div", {
625
+ }) })] }),
626
+ /* @__PURE__ */ x("div", {
737
627
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
738
628
  children: [
739
- /* @__PURE__ */ v(o, { children: /* @__PURE__ */ y(s, {
629
+ /* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
740
630
  className: "pt-6 text-center",
741
631
  children: [
742
- /* @__PURE__ */ v("div", {
632
+ /* @__PURE__ */ b("div", {
743
633
  className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
744
- children: /* @__PURE__ */ v(rt, { type: rn })
634
+ children: /* @__PURE__ */ b(pt, { type: $ })
745
635
  }),
746
- /* @__PURE__ */ v("p", {
747
- className: "text-lg font-bold capitalize",
748
- children: A.type.toLowerCase().replace("_", " ")
636
+ /* @__PURE__ */ b("p", {
637
+ className: "text-lg font-bold",
638
+ children: Pe(j.type, C)
749
639
  }),
750
- /* @__PURE__ */ v("p", {
640
+ /* @__PURE__ */ b("p", {
751
641
  className: "text-sm text-text-secondary",
752
- children: "Channel Type"
642
+ children: C("botlit.channelDetail.overview.type", "Channel Type")
753
643
  })
754
644
  ]
755
645
  }) }),
756
- /* @__PURE__ */ y(Ne, {
646
+ /* @__PURE__ */ x(ze, {
757
647
  treatment: "glass",
758
648
  glow: !0,
759
649
  className: "p-6 text-center",
760
- children: [/* @__PURE__ */ v("p", {
650
+ children: [/* @__PURE__ */ b("p", {
761
651
  className: "text-3xl font-bold tabular-nums text-text-primary",
762
- children: Q.length
763
- }), /* @__PURE__ */ v("p", {
652
+ children: I ? On : "—"
653
+ }), /* @__PURE__ */ b("p", {
764
654
  className: "text-sm text-text-secondary",
765
- children: "Active Routes"
655
+ children: I ? C("botlit.channelDetail.overview.activeRoutes", "Active routes of {{count}}", { count: N.length }) : P ? C("botlit.channelDetail.overview.routesUnavailable", "Routes could not be loaded") : C("botlit.channelDetail.overview.routesLoading", "Counting routes...")
766
656
  })]
767
657
  }),
768
- /* @__PURE__ */ v(o, { children: /* @__PURE__ */ y(s, {
658
+ /* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
769
659
  className: "pt-6 text-center",
770
- children: [/* @__PURE__ */ v("p", {
771
- className: "text-3xl font-bold text-text-primary capitalize",
772
- children: A.visibility.toLowerCase()
773
- }), /* @__PURE__ */ v("p", {
774
- className: "text-sm text-text-secondary",
775
- children: "Visibility"
776
- })]
660
+ children: [
661
+ /* @__PURE__ */ b("p", {
662
+ className: "text-3xl font-bold tabular-nums text-text-primary",
663
+ children: j.unroutedMessageCount
664
+ }),
665
+ /* @__PURE__ */ b("p", {
666
+ className: "text-sm text-text-secondary",
667
+ children: C("botlit.channelDetail.overview.unrouted", "Unanswered inbound messages")
668
+ }),
669
+ j.lastUnroutedAt && /* @__PURE__ */ b("p", {
670
+ className: "mt-1 text-xs text-text-secondary",
671
+ children: C("botlit.channelDetail.overview.lastUnrouted", "Last {{when}}", { when: h(j.lastUnroutedAt) })
672
+ })
673
+ ]
777
674
  }) }),
778
- /* @__PURE__ */ v(o, { children: /* @__PURE__ */ y(s, {
675
+ /* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
779
676
  className: "pt-6 text-center",
780
- children: [/* @__PURE__ */ v("p", {
677
+ children: [/* @__PURE__ */ b("p", {
781
678
  className: "text-3xl font-bold text-text-primary",
782
- children: A.revision
783
- }), /* @__PURE__ */ v("p", {
679
+ children: C(`botlit.visibility.${j.visibility.toLowerCase()}`, j.visibility.charAt(0) + j.visibility.slice(1).toLowerCase())
680
+ }), /* @__PURE__ */ b("p", {
784
681
  className: "text-sm text-text-secondary",
785
- children: "Revision"
682
+ children: C("botlit.channelDetail.overview.visibility", "Visibility")
786
683
  })]
787
684
  }) })
788
685
  ]
789
686
  }),
790
- $ && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(l, { children: /* @__PURE__ */ y(u, {
791
- className: "flex items-center gap-2",
792
- children: [/* @__PURE__ */ v(Ke, { size: 18 }), "Widget Configuration"]
793
- }) }), /* @__PURE__ */ y(s, { children: [/* @__PURE__ */ y("div", {
794
- className: "grid grid-cols-2 md:grid-cols-3 gap-6",
795
- children: [
796
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
797
- className: "text-sm text-text-secondary",
798
- children: "Allowed Origins"
799
- }), $.allowedOrigins.length > 0 ? /* @__PURE__ */ v("div", {
800
- className: "flex flex-wrap gap-1 mt-1",
801
- children: $.allowedOrigins.map((e) => /* @__PURE__ */ v(h, {
802
- variant: "outline",
803
- className: "font-mono text-xs",
804
- children: e
805
- }, e))
806
- }) : /* @__PURE__ */ v("p", {
807
- className: "font-medium",
808
- children: "Any origin"
809
- })] }),
810
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
811
- className: "text-sm text-text-secondary",
812
- children: "Theme"
813
- }), /* @__PURE__ */ y("div", {
814
- className: "flex items-center gap-2 mt-1",
815
- children: [/* @__PURE__ */ v("div", {
816
- className: "w-6 h-6 rounded border border-border-subtle",
817
- style: { backgroundColor: $.primaryColor }
818
- }), /* @__PURE__ */ v("span", {
819
- className: "font-mono text-sm",
820
- children: $.primaryColor
821
- })]
822
- })] }),
823
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
824
- className: "text-sm text-text-secondary",
825
- children: "Font Family"
826
- }), /* @__PURE__ */ v("p", {
827
- className: "font-medium",
828
- children: $.fontFamily
829
- })] })
830
- ]
831
- }), $.starterPrompts.length > 0 && /* @__PURE__ */ y("div", {
832
- className: "mt-4 pt-4 border-t border-border-subtle",
833
- children: [/* @__PURE__ */ v("p", {
834
- className: "text-sm text-text-secondary mb-2",
835
- children: "Starter Prompts"
836
- }), /* @__PURE__ */ v("div", {
837
- className: "flex flex-wrap gap-2",
838
- children: $.starterPrompts.map((e, t) => /* @__PURE__ */ v(h, {
839
- variant: "secondary",
840
- children: e
841
- }, t))
687
+ j.unroutedMessageCount > 0 && /* @__PURE__ */ x("div", {
688
+ role: "status",
689
+ className: "flex items-start gap-3 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-4 text-sm",
690
+ children: [/* @__PURE__ */ b(Ye, {
691
+ size: 18,
692
+ "aria-hidden": "true",
693
+ className: "mt-0.5 shrink-0 text-status-warning-text"
694
+ }), /* @__PURE__ */ b("p", {
695
+ className: "text-text-primary",
696
+ children: C("botlit.channelDetail.unroutedHint", "Some messages on this channel got no answer: no route matched their location, the route was turned off, or its bot was not active. Add or turn on a route, or activate the bot.")
842
697
  })]
843
- })] })] }),
844
- Ct && /* @__PURE__ */ v(ae, {
845
- channel: wt,
846
- loading: Tt,
847
- error: Et,
848
- connectorActive: A.status === "ACTIVE",
849
- workspaceId: it,
850
- hint: se[A.type]?.inboundHint,
851
- onRefresh: () => void Dt()
852
698
  }),
853
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(l, {
854
- className: "flex flex-row items-center justify-between",
855
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(u, { children: "Routes" }), /* @__PURE__ */ v(c, { children: "Routes connect this channel to your bots" })] }), /* @__PURE__ */ v(i, {
856
- permission: r.CHANNEL_CREATE,
857
- children: /* @__PURE__ */ v(d, {
858
- variant: "outline",
859
- size: "sm",
860
- leftIcon: /* @__PURE__ */ v(C, { size: 14 }),
861
- onClick: () => B(!0),
862
- children: "Add Route"
863
- })
699
+ $ === "WEB_WIDGET" && /* @__PURE__ */ x("div", {
700
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
701
+ children: [/* @__PURE__ */ b(Ye, {
702
+ size: 18,
703
+ "aria-hidden": "true",
704
+ className: "mt-0.5 shrink-0 text-text-secondary"
705
+ }), /* @__PURE__ */ b("p", {
706
+ className: "text-text-secondary",
707
+ children: C("botlit.channelDetail.webWidget.note", "To put an assistant on your website, publish it from the agent: open the agent and use its Website panel, which sets the allowed sites and gives you the embed code.")
864
708
  })]
865
- }), /* @__PURE__ */ v(s, { children: Q.length > 0 ? /* @__PURE__ */ v("div", {
709
+ }),
710
+ Nt && /* @__PURE__ */ b(le, {
711
+ channel: Pt,
712
+ loading: Ft,
713
+ error: It,
714
+ connectorActive: j.status === "ACTIVE",
715
+ workspaceId: mt,
716
+ hint: ye[j.type]?.inboundHint,
717
+ onRefresh: () => void Lt()
718
+ }),
719
+ /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(d, {
720
+ className: "flex flex-row items-center justify-between",
721
+ children: /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(f, { children: C("botlit.channelDetail.routes.title", "Routes") }), /* @__PURE__ */ b(u, { children: C("botlit.channelDetail.routes.description", "Routes connect this channel to your bots. A route that is off is ignored.") })] })
722
+ }), /* @__PURE__ */ b(l, { children: P ? /* @__PURE__ */ b(oe, {
723
+ resource: C("botlit.channelRoutes.resource", "channel routes"),
724
+ error: P,
725
+ onRetry: () => void F()
726
+ }) : N.length > 0 ? /* @__PURE__ */ b("ul", {
866
727
  className: "space-y-3",
867
- children: Q.map((e) => /* @__PURE__ */ y("div", {
868
- className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
869
- children: [/* @__PURE__ */ y("div", {
728
+ children: N.map((e) => /* @__PURE__ */ x("li", {
729
+ className: "flex flex-wrap items-center justify-between gap-3 p-4 border border-border-subtle rounded-lg",
730
+ children: [/* @__PURE__ */ x("div", {
870
731
  className: "flex items-center gap-4",
871
- children: [/* @__PURE__ */ v("div", {
732
+ children: [/* @__PURE__ */ b("div", {
872
733
  className: "p-2 rounded-lg bg-bg-sunken",
873
- children: /* @__PURE__ */ v(S, {
734
+ children: /* @__PURE__ */ b(Ze, {
874
735
  size: 18,
875
736
  className: "text-text-secondary"
876
737
  })
877
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
878
- className: "font-medium",
879
- children: he(e, "locationName") ?? e.locationId
880
- }), /* @__PURE__ */ y("p", {
738
+ }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("p", {
739
+ className: "flex items-center gap-2 font-medium",
740
+ children: [de(e, "locationName") ?? e.locationId, /* @__PURE__ */ b(re, {
741
+ variant: e.isActive ? "success" : "outline",
742
+ children: e.isActive ? C("botlit.channelRoutes.status.on", "On") : C("botlit.channelRoutes.status.off", "Off")
743
+ })]
744
+ }), /* @__PURE__ */ b("p", {
881
745
  className: "text-sm text-text-secondary",
882
- children: ["Connected to: ", he(e, "appName") ?? e.appId]
746
+ children: C("botlit.channelDetail.routes.connectedTo", "Connected to: {{bot}}", { bot: kn(e) })
883
747
  })] })]
884
- }), /* @__PURE__ */ y("div", {
885
- className: "flex items-center gap-2",
886
- children: [/* @__PURE__ */ y(h, {
748
+ }), /* @__PURE__ */ b(s, {
749
+ permission: o.CHANNEL_UPDATE,
750
+ children: /* @__PURE__ */ b(p, {
887
751
  variant: "outline",
888
- children: ["Rev ", e.revision]
889
- }), /* @__PURE__ */ v(d, {
890
- variant: "ghost",
891
752
  size: "sm",
892
- children: /* @__PURE__ */ v(We, { size: 14 })
893
- })]
753
+ leftIcon: e.isActive ? /* @__PURE__ */ b(et, { size: 14 }) : /* @__PURE__ */ b($e, { size: 14 }),
754
+ isLoading: tn === e.id,
755
+ onClick: () => void wn(e),
756
+ children: e.isActive ? C("botlit.channelRoutes.actions.turnOff", "Turn off") : C("botlit.channelRoutes.actions.turnOn", "Turn on")
757
+ })
894
758
  })]
895
759
  }, e.id))
896
- }) : /* @__PURE__ */ v(re, {
760
+ }) : /* @__PURE__ */ b(ae, {
897
761
  illustration: "empty-data",
898
- title: "No routes configured",
899
- description: "Add a route to connect this channel to a bot.",
900
- action: /* @__PURE__ */ v(i, {
901
- permission: r.CHANNEL_CREATE,
902
- children: /* @__PURE__ */ v(d, {
903
- leftIcon: /* @__PURE__ */ v(C, { size: 16 }),
904
- onClick: () => B(!0),
905
- children: "Add Route"
762
+ title: C("botlit.channels.empty.routes.title", "No routes configured"),
763
+ description: C("botlit.channelDetail.routes.emptyDescription", "Add a route to connect this channel to a bot."),
764
+ action: /* @__PURE__ */ b(s, {
765
+ permission: o.CHANNEL_CREATE,
766
+ children: /* @__PURE__ */ b(p, {
767
+ leftIcon: /* @__PURE__ */ b(Qe, { size: 16 }),
768
+ onClick: () => V(!0),
769
+ children: C("botlit.channelDetail.routes.add", "Add Route")
906
770
  })
907
771
  })
908
772
  }) })] }),
909
- A.type === "SLACK" && A.credentialsRefId && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(l, { children: [/* @__PURE__ */ y(u, {
773
+ /* @__PURE__ */ b(se, {
774
+ open: en,
775
+ onOpenChange: V,
776
+ connectorId: j.id,
777
+ onCreated: () => void F()
778
+ }),
779
+ j.type === "SLACK" && j.credentialsRefId && /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ x(d, { children: [/* @__PURE__ */ x(f, {
910
780
  className: "flex items-center gap-2",
911
- children: [/* @__PURE__ */ v(T, { size: 18 }), "Your Slack Account"]
912
- }), /* @__PURE__ */ v(c, { children: "Connect your personal Slack account to receive direct messages from this bot" })] }), /* @__PURE__ */ y(s, { children: [It && /* @__PURE__ */ y("div", {
781
+ children: [/* @__PURE__ */ b(w, { size: 18 }), C("botlit.channelDetail.slack.title", "Your Slack Account")]
782
+ }), /* @__PURE__ */ b(u, { children: C("botlit.channelDetail.slack.description", "Connect your personal Slack account to receive direct messages from this bot") })] }), /* @__PURE__ */ x(l, { children: [qt && /* @__PURE__ */ x("div", {
783
+ role: "alert",
913
784
  className: "mb-4 flex items-start gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
914
- children: [/* @__PURE__ */ v("span", { children: It }), /* @__PURE__ */ v("button", {
915
- onClick: () => L(null),
785
+ children: [/* @__PURE__ */ b("span", { children: qt }), /* @__PURE__ */ b("button", {
786
+ type: "button",
787
+ "aria-label": C("botlit.common.dismiss", "Dismiss"),
788
+ onClick: () => Jt(null),
916
789
  className: "ml-auto cursor-pointer text-status-error-text/70 hover:text-status-error-text",
917
- children: /* @__PURE__ */ v(et, { size: 14 })
790
+ children: /* @__PURE__ */ b(st, { size: 14 })
918
791
  })]
919
- }), jt ? /* @__PURE__ */ y("div", {
792
+ }), Ht ? /* @__PURE__ */ x("div", {
920
793
  className: "flex items-center gap-2 py-4 text-text-secondary",
921
- children: [/* @__PURE__ */ v(Ge, {
794
+ children: [/* @__PURE__ */ b(Xe, {
922
795
  size: 16,
923
796
  className: "animate-spin"
924
- }), /* @__PURE__ */ v("span", {
797
+ }), /* @__PURE__ */ b("span", {
925
798
  className: "text-sm",
926
- children: "Linking Slack connection..."
799
+ children: C("botlit.channelDetail.slack.linking", "Linking Slack connection...")
927
800
  })]
928
- }) : Ot ? /* @__PURE__ */ y("div", {
801
+ }) : zt ? /* @__PURE__ */ x("div", {
929
802
  className: "flex items-center gap-2 py-4 text-text-secondary",
930
- children: [/* @__PURE__ */ v(Ge, {
803
+ children: [/* @__PURE__ */ b(Xe, {
931
804
  size: 16,
932
805
  className: "animate-spin"
933
- }), /* @__PURE__ */ v("span", {
806
+ }), /* @__PURE__ */ b("span", {
934
807
  className: "text-sm",
935
- children: "Checking connection..."
808
+ children: C("botlit.channelDetail.slack.checking", "Checking connection...")
936
809
  })]
937
- }) : F && F.dmAllowed ? /* @__PURE__ */ y("div", {
810
+ }) : R && R.dmAllowed ? /* @__PURE__ */ x("div", {
938
811
  className: "space-y-4",
939
812
  children: [
940
- /* @__PURE__ */ y("div", {
813
+ /* @__PURE__ */ x("div", {
941
814
  className: "flex items-center gap-3 p-3 rounded-lg bg-bg-sunken",
942
815
  children: [
943
- /* @__PURE__ */ v(He, {
816
+ /* @__PURE__ */ b(qe, {
944
817
  size: 20,
945
818
  className: "text-status-success-text shrink-0"
946
819
  }),
947
- /* @__PURE__ */ y("div", {
820
+ /* @__PURE__ */ x("div", {
948
821
  className: "min-w-0 flex-1",
949
822
  children: [
950
- /* @__PURE__ */ v("p", {
823
+ /* @__PURE__ */ b("p", {
951
824
  className: "font-medium text-sm",
952
- children: F.externalDisplayName || F.externalUsername || F.externalUserId
825
+ children: R.externalDisplayName || R.externalUsername || R.externalUserId
953
826
  }),
954
- F.externalUsername && F.externalDisplayName && /* @__PURE__ */ y("p", {
827
+ R.externalUsername && R.externalDisplayName && /* @__PURE__ */ x("p", {
955
828
  className: "text-xs text-text-secondary",
956
- children: ["@", F.externalUsername]
829
+ children: ["@", R.externalUsername]
957
830
  }),
958
- F.connectedAt && /* @__PURE__ */ y("p", {
831
+ R.connectedAt && /* @__PURE__ */ b("p", {
959
832
  className: "text-xs text-text-secondary",
960
- children: ["Connected ", new Date(F.connectedAt).toLocaleDateString()]
833
+ children: C("botlit.channelDetail.slack.connectedOn", "Connected {{date}}", { date: new Date(R.connectedAt).toLocaleDateString() })
961
834
  })
962
835
  ]
963
836
  }),
964
- /* @__PURE__ */ v("div", {
837
+ /* @__PURE__ */ b("div", {
965
838
  className: "flex items-center gap-1",
966
- children: F.isTokenExpired && /* @__PURE__ */ v(h, {
839
+ children: R.isTokenExpired && /* @__PURE__ */ b(re, {
967
840
  variant: "outline",
968
841
  className: "text-xs text-status-warning-text border-status-warning-border",
969
- children: "Token expired"
842
+ children: C("botlit.channelDetail.slack.tokenExpired", "Token expired")
970
843
  })
971
844
  })
972
845
  ]
973
846
  }),
974
- /* @__PURE__ */ y("div", {
847
+ /* @__PURE__ */ x("div", {
975
848
  className: "flex items-center justify-between p-3 border border-border-subtle rounded-lg",
976
- children: [/* @__PURE__ */ y("div", {
849
+ children: [/* @__PURE__ */ x("div", {
977
850
  className: "flex items-center gap-2",
978
- children: [F.notificationsEnabled ? /* @__PURE__ */ v(Be, {
851
+ children: [R.notificationsEnabled ? /* @__PURE__ */ b(Ge, {
979
852
  size: 16,
980
853
  className: "text-primary"
981
- }) : /* @__PURE__ */ v(Ve, {
854
+ }) : /* @__PURE__ */ b(Ke, {
982
855
  size: 16,
983
856
  className: "text-text-secondary"
984
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
857
+ }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
985
858
  className: "text-sm font-medium",
986
- children: "DM Notifications"
987
- }), /* @__PURE__ */ v("p", {
859
+ children: C("botlit.channelDetail.slack.notifications", "DM Notifications")
860
+ }), /* @__PURE__ */ b("p", {
988
861
  className: "text-xs text-text-secondary",
989
- children: F.notificationsEnabled ? "You will receive bot DMs" : "DM notifications are paused"
862
+ children: R.notificationsEnabled ? C("botlit.channelDetail.slack.notificationsOn", "You will receive bot DMs") : C("botlit.channelDetail.slack.notificationsOff", "DM notifications are paused")
990
863
  })] })]
991
- }), /* @__PURE__ */ v(d, {
864
+ }), /* @__PURE__ */ b(p, {
992
865
  variant: "outline",
993
866
  size: "sm",
994
- onClick: zt,
995
- isLoading: Nt,
996
- children: F.notificationsEnabled ? "Disable" : "Enable"
867
+ onClick: () => void Zt(),
868
+ isLoading: Wt,
869
+ children: R.notificationsEnabled ? C("botlit.common.disable", "Disable") : C("botlit.common.enable", "Enable")
997
870
  })]
998
871
  }),
999
- /* @__PURE__ */ y("div", {
872
+ /* @__PURE__ */ x("div", {
1000
873
  className: "flex gap-2 justify-end pt-2",
1001
- children: [F.isTokenExpired && /* @__PURE__ */ v(d, {
874
+ children: [R.isTokenExpired && /* @__PURE__ */ b(p, {
1002
875
  variant: "outline",
1003
876
  size: "sm",
1004
- leftIcon: /* @__PURE__ */ v(T, { size: 14 }),
1005
- onClick: Rt,
1006
- children: "Reconnect"
1007
- }), /* @__PURE__ */ v(d, {
877
+ leftIcon: /* @__PURE__ */ b(w, { size: 14 }),
878
+ onClick: Xt,
879
+ children: C("botlit.channelDetail.slack.reconnect", "Reconnect")
880
+ }), /* @__PURE__ */ b(p, {
1008
881
  variant: "destructive",
1009
882
  size: "sm",
1010
- leftIcon: /* @__PURE__ */ v($e, { size: 14 }),
1011
- onClick: Bt,
1012
- isLoading: Ft,
1013
- children: "Disconnect"
883
+ leftIcon: /* @__PURE__ */ b(ot, { size: 14 }),
884
+ onClick: () => void Qt(),
885
+ isLoading: Kt,
886
+ children: C("botlit.channelDetail.slack.disconnect", "Disconnect")
1014
887
  })]
1015
888
  })
1016
889
  ]
1017
- }) : /* @__PURE__ */ y("div", {
890
+ }) : /* @__PURE__ */ x("div", {
1018
891
  className: "flex flex-col items-center gap-4 py-8 text-center",
1019
892
  children: [
1020
- /* @__PURE__ */ v("div", {
893
+ /* @__PURE__ */ b("div", {
1021
894
  className: "p-4 rounded-full bg-bg-sunken",
1022
- children: /* @__PURE__ */ v(T, {
895
+ children: /* @__PURE__ */ b(w, {
1023
896
  size: 32,
1024
897
  className: "text-text-secondary"
1025
898
  })
1026
899
  }),
1027
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
900
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
1028
901
  className: "font-medium",
1029
- children: "No personal account connected"
1030
- }), /* @__PURE__ */ v("p", {
902
+ children: C("botlit.channelDetail.slack.notConnected", "No personal account connected")
903
+ }), /* @__PURE__ */ b("p", {
1031
904
  className: "text-sm text-text-secondary mt-1",
1032
- children: "Connect your Slack account so the bot can send you direct messages"
905
+ children: C("botlit.channelDetail.slack.notConnectedHint", "Connect your Slack account so the bot can send you direct messages")
1033
906
  })] }),
1034
- /* @__PURE__ */ v(d, {
1035
- leftIcon: /* @__PURE__ */ v(T, { size: 16 }),
1036
- onClick: Rt,
1037
- children: "Connect with Slack"
907
+ /* @__PURE__ */ b(p, {
908
+ leftIcon: /* @__PURE__ */ b(w, { size: 16 }),
909
+ onClick: Xt,
910
+ children: C("botlit.channelDetail.slack.connect", "Connect with Slack")
1038
911
  })
1039
912
  ]
1040
913
  })] })] }),
1041
- A.defaultPolicyBindings && /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(l, { children: [/* @__PURE__ */ y(u, {
914
+ j.defaultPolicyBindings && /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ x(d, { children: [/* @__PURE__ */ x(f, {
1042
915
  className: "flex items-center gap-2",
1043
- children: [/* @__PURE__ */ v(Ze, { size: 18 }), "Default Policy Bindings"]
1044
- }), /* @__PURE__ */ v(c, { children: "Default policies applied to all routes on this connector" })] }), /* @__PURE__ */ v(s, { children: /* @__PURE__ */ v("div", {
916
+ children: [/* @__PURE__ */ b(it, { size: 18 }), C("botlit.channelDetail.policies.title", "Default Policy Bindings")]
917
+ }), /* @__PURE__ */ b(u, { children: C("botlit.channelDetail.policies.description", "Default policies applied to all routes on this connector") })] }), /* @__PURE__ */ b(l, { children: /* @__PURE__ */ b("div", {
1045
918
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
1046
- children: Object.entries(A.defaultPolicyBindings).map(([e, t]) => t ? /* @__PURE__ */ y("div", {
919
+ children: Object.entries(j.defaultPolicyBindings).map(([e, t]) => t ? /* @__PURE__ */ x("div", {
1047
920
  className: "p-3 bg-bg-sunken rounded-lg",
1048
- children: [/* @__PURE__ */ v("p", {
921
+ children: [/* @__PURE__ */ b("p", {
1049
922
  className: "text-xs text-text-secondary capitalize",
1050
923
  children: e.replace("PolicyId", "").replace(/([A-Z])/g, " $1")
1051
- }), /* @__PURE__ */ v("p", {
924
+ }), /* @__PURE__ */ b("p", {
1052
925
  className: "font-medium text-sm truncate",
1053
926
  children: String(t)
1054
927
  })]
1055
928
  }, e) : null)
1056
929
  }) })] }),
1057
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(l, { children: /* @__PURE__ */ y(u, {
930
+ /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(d, { children: /* @__PURE__ */ x(f, {
1058
931
  className: "flex items-center gap-2",
1059
- children: [/* @__PURE__ */ v(Xe, { size: 18 }), "Metadata"]
1060
- }) }), /* @__PURE__ */ v(s, { children: /* @__PURE__ */ y("div", {
932
+ children: [/* @__PURE__ */ b(rt, { size: 18 }), C("botlit.channelDetail.metadata.title", "Details")]
933
+ }) }), /* @__PURE__ */ b(l, { children: /* @__PURE__ */ x("dl", {
1061
934
  className: "grid grid-cols-2 md:grid-cols-4 gap-6 text-sm",
1062
935
  children: [
1063
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
936
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
1064
937
  className: "text-text-secondary",
1065
- children: "Created"
1066
- }), /* @__PURE__ */ v("p", {
938
+ children: C("botlit.channelDetail.metadata.created", "Created")
939
+ }), /* @__PURE__ */ b("dd", {
1067
940
  className: "font-medium",
1068
- children: Ce(A.createdAt)
941
+ children: h(j.createdAt)
1069
942
  })] }),
1070
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
943
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
1071
944
  className: "text-text-secondary",
1072
- children: "Updated"
1073
- }), /* @__PURE__ */ v("p", {
945
+ children: C("botlit.channelDetail.metadata.updated", "Updated")
946
+ }), /* @__PURE__ */ b("dd", {
1074
947
  className: "font-medium",
1075
- children: Ce(A.updatedAt)
948
+ children: h(j.updatedAt)
1076
949
  })] }),
1077
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
950
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
1078
951
  className: "text-text-secondary",
1079
- children: "Linked channel"
1080
- }), /* @__PURE__ */ v("p", {
952
+ children: C("botlit.channelDetail.metadata.linkedChannel", "Linked channel")
953
+ }), /* @__PURE__ */ b("dd", {
1081
954
  className: "font-medium break-all",
1082
- children: wt?.name ?? A.credentialsRefId ?? "Not configured"
955
+ children: Pt?.name ?? j.credentialsRefId ?? C("botlit.channelDetail.metadata.notConfigured", "Not configured")
1083
956
  })] }),
1084
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
957
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
1085
958
  className: "text-text-secondary",
1086
- children: "Tags"
1087
- }), /* @__PURE__ */ v("div", {
1088
- className: "flex gap-1",
1089
- children: A.tags.length > 0 ? A.tags.map((e) => /* @__PURE__ */ v(h, {
1090
- variant: "secondary",
1091
- className: "text-xs",
1092
- children: e
1093
- }, e)) : /* @__PURE__ */ v("span", {
1094
- className: "text-text-secondary",
1095
- children: "None"
1096
- })
959
+ children: C("botlit.channelDetail.metadata.revision", "Revision")
960
+ }), /* @__PURE__ */ b("dd", {
961
+ className: "font-medium tabular-nums",
962
+ children: j.revision
1097
963
  })] })
1098
964
  ]
1099
965
  }) })] })