@burdenoff/microfe-botmanor 2026.1120.9 → 2026.1120.10

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