@burdenoff/microfe-botmanor 2026.1203.3 → 2026.1203.5

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 (135) hide show
  1. package/dist/botlit/BotlitRoutes.js +0 -1
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/BotmanorRootInner.js +38 -41
  4. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  5. package/dist/botlit/components/A2ACardVerificationCard.js +0 -1
  6. package/dist/botlit/components/A2ACardVerificationCard.js.map +1 -1
  7. package/dist/botlit/components/AgentA2APanel.js +20 -21
  8. package/dist/botlit/components/AgentA2APanel.js.map +1 -1
  9. package/dist/botlit/components/AgentApprovalPanel.js +22 -23
  10. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  11. package/dist/botlit/components/AgentBindingsPanel.js +66 -68
  12. package/dist/botlit/components/AgentBindingsPanel.js.map +1 -1
  13. package/dist/botlit/components/AiOperationsPanel.js +34 -35
  14. package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
  15. package/dist/botlit/components/BotAgentsPanel.js +59 -60
  16. package/dist/botlit/components/BotAgentsPanel.js.map +1 -1
  17. package/dist/botlit/components/BotVersionHistoryPanel.js +19 -20
  18. package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -1
  19. package/dist/botlit/components/BucketDialogs.js +0 -1
  20. package/dist/botlit/components/BucketDialogs.js.map +1 -1
  21. package/dist/botlit/components/ChannelRoutesPanel.js +82 -84
  22. package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
  23. package/dist/botlit/components/CreateChannelRouteDialog.js +4 -5
  24. package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -1
  25. package/dist/botlit/components/DescribeBotDialog.js +0 -1
  26. package/dist/botlit/components/DescribeBotDialog.js.map +1 -1
  27. package/dist/botlit/components/GettingStartedChecklist.js +9 -10
  28. package/dist/botlit/components/GettingStartedChecklist.js.map +1 -1
  29. package/dist/botlit/components/HandoffConfigPanel.js +0 -1
  30. package/dist/botlit/components/HandoffConfigPanel.js.map +1 -1
  31. package/dist/botlit/components/RetentionStatusPanel.js +10 -12
  32. package/dist/botlit/components/RetentionStatusPanel.js.map +1 -1
  33. package/dist/botlit/components/StewardApprovalsInbox.js +201 -212
  34. package/dist/botlit/components/StewardApprovalsInbox.js.map +1 -1
  35. package/dist/botlit/components/StoreOwnPackagesCard.js +21 -22
  36. package/dist/botlit/components/StoreOwnPackagesCard.js.map +1 -1
  37. package/dist/botlit/components/StorePackageDraftCard.js +38 -39
  38. package/dist/botlit/components/StorePackageDraftCard.js.map +1 -1
  39. package/dist/botlit/components/StorePolicyBundleCard.js +27 -29
  40. package/dist/botlit/components/StorePolicyBundleCard.js.map +1 -1
  41. package/dist/botlit/components/StoreSubmissionsCard.js +64 -65
  42. package/dist/botlit/components/StoreSubmissionsCard.js.map +1 -1
  43. package/dist/botlit/components/VersionHistoryPanel.js +18 -19
  44. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  45. package/dist/botlit/hooks/internal/workspaceGateway.d.ts +6 -0
  46. package/dist/botlit/hooks/internal/workspaceGateway.js +40 -40
  47. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
  48. package/dist/botlit/hooks/useToolApprovals.d.ts +8 -3
  49. package/dist/botlit/hooks/useToolApprovals.js +68 -73
  50. package/dist/botlit/hooks/useToolApprovals.js.map +1 -1
  51. package/dist/botlit/pages/A2AAgentDetailPage.js +331 -332
  52. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  53. package/dist/botlit/pages/A2ARegistryPage.js +39 -41
  54. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  55. package/dist/botlit/pages/AgentApprovalsPage.js +24 -25
  56. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  57. package/dist/botlit/pages/AgentBuilderPage.js +470 -471
  58. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  59. package/dist/botlit/pages/AgentDetailPage.js +68 -69
  60. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/AgentsListPage.js +277 -278
  62. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  63. package/dist/botlit/pages/AiOperationsPage.js +44 -46
  64. package/dist/botlit/pages/AiOperationsPage.js.map +1 -1
  65. package/dist/botlit/pages/BotChannelsTab.js +354 -356
  66. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  67. package/dist/botlit/pages/BotDetailPage.js +138 -139
  68. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  69. package/dist/botlit/pages/BotWorkflowTab.js +23 -24
  70. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  71. package/dist/botlit/pages/BotsListPage.js +32 -33
  72. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  73. package/dist/botlit/pages/BucketDetailPage.js +110 -112
  74. package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
  75. package/dist/botlit/pages/BucketsPage.js +115 -117
  76. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  77. package/dist/botlit/pages/ChannelDetailPage.js +105 -107
  78. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  79. package/dist/botlit/pages/ChannelsPage.js +38 -40
  80. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  81. package/dist/botlit/pages/DashboardPage.js +26 -27
  82. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  83. package/dist/botlit/pages/ExecutionDetailPage.js +70 -71
  84. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  85. package/dist/botlit/pages/ExecutionsPage.js +219 -220
  86. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  87. package/dist/botlit/pages/HandoffsPage.js +208 -210
  88. package/dist/botlit/pages/HandoffsPage.js.map +1 -1
  89. package/dist/botlit/pages/InstalledPackagesPage.js +179 -181
  90. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  91. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +194 -195
  92. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  93. package/dist/botlit/pages/KnowledgeBasesPage.js +38 -39
  94. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  95. package/dist/botlit/pages/MCPServerDetailPage.js +178 -180
  96. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  97. package/dist/botlit/pages/MCPServersPage.js +42 -43
  98. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  99. package/dist/botlit/pages/PoliciesPage.js +77 -78
  100. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  101. package/dist/botlit/pages/PolicyDetailPage.js +517 -519
  102. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  103. package/dist/botlit/pages/PromptStudioPage.js +81 -83
  104. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  105. package/dist/botlit/pages/PromptTemplateDetailPage.js +137 -139
  106. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  107. package/dist/botlit/pages/PromptTemplatesPage.js +28 -30
  108. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  109. package/dist/botlit/pages/RetrievalProfileDetailPage.js +64 -65
  110. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  111. package/dist/botlit/pages/RetrievalProfilesPage.js +59 -60
  112. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  113. package/dist/botlit/pages/SettingsPage.js +30 -31
  114. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  115. package/dist/botlit/pages/SkillDetailPage.js +205 -207
  116. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  117. package/dist/botlit/pages/SkillsPage.js +68 -69
  118. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  119. package/dist/botlit/pages/StorePackageDetailPage.js +39 -41
  120. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  121. package/dist/botlit/pages/StorePage.js +169 -171
  122. package/dist/botlit/pages/StorePage.js.map +1 -1
  123. package/dist/botlit/pages/ToolApprovalsPage.js +61 -62
  124. package/dist/botlit/pages/ToolApprovalsPage.js.map +1 -1
  125. package/dist/botlit/providers/WorkspaceFlagScope.d.ts +7 -0
  126. package/dist/botlit/providers/WorkspaceFlagScope.js +17 -0
  127. package/dist/botlit/providers/WorkspaceFlagScope.js.map +1 -0
  128. package/dist/botlit/providers/workspaceFlagKeys.d.ts +18 -0
  129. package/dist/botlit/providers/workspaceFlagKeys.js +8 -0
  130. package/dist/botlit/providers/workspaceFlagKeys.js.map +1 -0
  131. package/dist/index.js +0 -1
  132. package/package.json +4 -1
  133. package/dist/botlit/hooks/index.js +0 -21
  134. package/dist/botlit/index.js +0 -12
  135. package/dist/botlit/permissions/index.js +0 -4
@@ -1,29 +1,27 @@
1
1
  import { Card as e, CardContent as t, CardHeader as n, CardTitle as r } from "../components/Card.js";
2
2
  import { Button as i } from "../components/Button.js";
3
- import { BOTMANOR_PERMISSIONS as a } from "../permissions/botmanorPermissions.js";
4
- import { BotmanorPermissionGate as o, useBotmanorPermission as s } from "../permissions/useBotmanorPermissions.js";
5
- import { Badge as c } from "../components/Badge.js";
6
- import { EmptyState as l } from "../components/EmptyState.js";
7
- import { Input as u } from "../components/Input.js";
8
- import { ChannelSelectorSheet as d } from "../components/ChannelSelectorSheet.js";
9
- import { useAllChannelConnectors as f, useBotChannelRoutes as p, useChannelConnector as m, useCreateChannelConnector as h, useCreateChannelRoute as g, useDeleteChannelRoute as _, useFindChannelConnector as v, useUpdateChannelConnector as y } from "../hooks/useChannels.js";
10
- import { useMyIntegrationConnections as b } from "../hooks/useMyIntegrationConnections.js";
11
- import { linkableConnections as x } from "../utils/handoffInbox.js";
12
- import { InboundWebhookCard as S } from "../components/ChannelSetupPanels.js";
13
- import { useBotlit as C } from "../providers/BotlitProvider.js";
14
- import { PLATFORM_CREDENTIALS as w, connectorPlatform as T, useInboundChannel as E } from "../hooks/useChannelSetup.js";
15
- import { isNative as D, nativeCopyText as O, nativeNotify as k, nativeOpenUrl as A, nativeToast as j } from "../../utils/nativeBridge.js";
16
- import "../hooks/index.js";
17
- import { useGlobalChannels as M, useLinkIntegrationConnection as N, useMyUserPlatformConnection as P, useRevokeSlackConnection as F, useToggleSlackNotifications as ee } from "../hooks/useUserPlatformConnection.js";
18
- import { ensureActiveConnector as I } from "../utils/channelConnectors.js";
19
- import { confirmAction as L } from "../utils/confirmAction.js";
20
- import { useTr as R } from "../../shared/hooks/useTr.js";
21
- import "../permissions/index.js";
3
+ import { Badge as a } from "../components/Badge.js";
4
+ import { EmptyState as o } from "../components/EmptyState.js";
5
+ import { Input as s } from "../components/Input.js";
6
+ import { ChannelSelectorSheet as c } from "../components/ChannelSelectorSheet.js";
7
+ import { useMyIntegrationConnections as l } from "../hooks/useMyIntegrationConnections.js";
8
+ import { linkableConnections as u } from "../utils/handoffInbox.js";
9
+ import { InboundWebhookCard as d } from "../components/ChannelSetupPanels.js";
10
+ import { useBotlit as f } from "../providers/BotlitProvider.js";
11
+ import { isNative as p, nativeCopyText as m, nativeNotify as h, nativeOpenUrl as g, nativeToast as _ } from "../../utils/nativeBridge.js";
12
+ import { useAllChannelConnectors as v, useBotChannelRoutes as y, useChannelConnector as b, useCreateChannelConnector as x, useCreateChannelRoute as S, useDeleteChannelRoute as C, useFindChannelConnector as w, useUpdateChannelConnector as T } from "../hooks/useChannels.js";
13
+ import { PLATFORM_CREDENTIALS as E, connectorPlatform as D, useInboundChannel as O } from "../hooks/useChannelSetup.js";
14
+ import { useGlobalChannels as k, useLinkIntegrationConnection as A, useMyUserPlatformConnection as j, useRevokeSlackConnection as M, useToggleSlackNotifications as N } from "../hooks/useUserPlatformConnection.js";
15
+ import { ensureActiveConnector as P } from "../utils/channelConnectors.js";
16
+ import { confirmAction as ee } from "../utils/confirmAction.js";
17
+ import { useTr as F } from "../../shared/hooks/useTr.js";
18
+ import { BOTMANOR_PERMISSIONS as I } from "../permissions/botmanorPermissions.js";
19
+ import { BotmanorPermissionGate as L, useBotmanorPermission as R } from "../permissions/useBotmanorPermissions.js";
22
20
  import { ChannelType as z } from "../../generated/global-types.js";
23
- import { useCallback as B, useMemo as V, useState as H } from "react";
24
- import { ThemedSelect as te } from "@burdenoff/fe-libs/ui";
25
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
26
- import { Bell as ne, BellOff as re, CheckCircle2 as K, Code as q, ExternalLink as J, Globe as Y, Loader2 as ie, Mail as X, MessageCircle as ae, MessageSquare as Z, Plus as oe, Radio as se, Slack as ce, Trash2 as le, Unlink as ue, Users as de, Webhook as fe } from "lucide-react";
21
+ import { useCallback as B, useMemo as te, useState as V } from "react";
22
+ import { ThemedSelect as ne } from "@burdenoff/fe-libs/ui";
23
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
24
+ import { Bell as re, BellOff as ie, CheckCircle2 as G, Code as K, ExternalLink as q, Globe as J, Loader2 as ae, Mail as Y, MessageCircle as X, MessageSquare as Z, Plus as oe, Radio as se, Slack as ce, Trash2 as le, Unlink as ue, Users as de, Webhook as fe } from "lucide-react";
27
25
  import { toast as Q } from "sonner";
28
26
  // src/botlit/pages/BotChannelsTab.tsx
29
27
  var pe = {
@@ -67,303 +65,303 @@ function $(e) {
67
65
  case "SLACK": return {
68
66
  label: "Slack",
69
67
  badgeClass: "bg-bg-sunken text-text-secondary",
70
- icon: /* @__PURE__ */ W(ce, { size: 18 }),
68
+ icon: /* @__PURE__ */ U(ce, { size: 18 }),
71
69
  accentBg: "bg-accent",
72
70
  accentText: "text-text-primary"
73
71
  };
74
72
  case "TEAMS": return {
75
73
  label: "Teams",
76
74
  badgeClass: "bg-bg-sunken text-text-secondary",
77
- icon: /* @__PURE__ */ W(de, { size: 18 }),
75
+ icon: /* @__PURE__ */ U(de, { size: 18 }),
78
76
  accentBg: "bg-accent",
79
77
  accentText: "text-text-primary"
80
78
  };
81
79
  case "DISCORD": return {
82
80
  label: "Discord",
83
81
  badgeClass: "bg-bg-sunken text-text-secondary",
84
- icon: /* @__PURE__ */ W(ae, { size: 18 }),
82
+ icon: /* @__PURE__ */ U(X, { size: 18 }),
85
83
  accentBg: "bg-accent",
86
84
  accentText: "text-text-primary"
87
85
  };
88
86
  case "WHATSAPP": return {
89
87
  label: "WhatsApp",
90
88
  badgeClass: "bg-bg-sunken text-text-secondary",
91
- icon: /* @__PURE__ */ W(Z, { size: 18 }),
89
+ icon: /* @__PURE__ */ U(Z, { size: 18 }),
92
90
  accentBg: "bg-accent",
93
91
  accentText: "text-text-primary"
94
92
  };
95
93
  case "EMAIL": return {
96
94
  label: "Email",
97
95
  badgeClass: "bg-bg-sunken text-text-secondary",
98
- icon: /* @__PURE__ */ W(X, { size: 18 }),
96
+ icon: /* @__PURE__ */ U(Y, { size: 18 }),
99
97
  accentBg: "bg-accent",
100
98
  accentText: "text-text-primary"
101
99
  };
102
100
  case "SMS": return {
103
101
  label: "SMS",
104
102
  badgeClass: "bg-bg-sunken text-text-secondary",
105
- icon: /* @__PURE__ */ W(Z, { size: 18 }),
103
+ icon: /* @__PURE__ */ U(Z, { size: 18 }),
106
104
  accentBg: "bg-accent",
107
105
  accentText: "text-text-primary"
108
106
  };
109
107
  case "WEBHOOK": return {
110
108
  label: "Webhook",
111
109
  badgeClass: "bg-bg-sunken text-text-secondary",
112
- icon: /* @__PURE__ */ W(fe, { size: 18 }),
110
+ icon: /* @__PURE__ */ U(fe, { size: 18 }),
113
111
  accentBg: "bg-accent",
114
112
  accentText: "text-text-primary"
115
113
  };
116
114
  case "WEB_WIDGET": return {
117
115
  label: "Web Widget",
118
116
  badgeClass: "bg-bg-sunken text-text-secondary",
119
- icon: /* @__PURE__ */ W(Y, { size: 18 }),
117
+ icon: /* @__PURE__ */ U(J, { size: 18 }),
120
118
  accentBg: "bg-accent",
121
119
  accentText: "text-text-primary"
122
120
  };
123
121
  case "CUSTOM": return {
124
122
  label: "Custom",
125
123
  badgeClass: "bg-bg-sunken text-text-secondary",
126
- icon: /* @__PURE__ */ W(q, { size: 18 }),
124
+ icon: /* @__PURE__ */ U(K, { size: 18 }),
127
125
  accentBg: "bg-accent",
128
126
  accentText: "text-text-primary"
129
127
  };
130
128
  default: return {
131
129
  label: e,
132
130
  badgeClass: "bg-bg-sunken text-text-secondary",
133
- icon: /* @__PURE__ */ W(se, { size: 18 }),
131
+ icon: /* @__PURE__ */ U(se, { size: 18 }),
134
132
  accentBg: "bg-accent",
135
133
  accentText: "text-text-primary"
136
134
  };
137
135
  }
138
136
  }
139
- var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s, onReconnect: l }) => {
140
- let d = R(), { data: f, loading: p } = m(t), h = f?.credentialsRefId ?? n, { data: g, loading: v, refetch: y } = P(h), { toggle: S, loading: C } = ee(), { revoke: w, loading: T } = F(), { link: E } = N(), [A] = _(), [M, I] = H(""), [z, B] = H(!1), U = $(r), q = !v && !g?.dmAllowed, J = b(q), Y = V(() => x(J.data, r), [J.data, r]), X = Y.some((e) => e.id === M) ? M : Y[0]?.id ?? "";
141
- return p ? /* @__PURE__ */ W("div", { className: "h-32 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }) : /* @__PURE__ */ G("div", {
137
+ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: o, onReconnect: c }) => {
138
+ let d = F(), { data: f, loading: g } = b(t), v = f?.credentialsRefId ?? n, { data: y, loading: x, refetch: S } = j(v), { toggle: w, loading: T } = N(), { revoke: E, loading: D } = M(), { link: O } = A(), [k] = C(), [P, R] = V(""), [z, B] = V(!1), H = $(r), K = !x && !y?.dmAllowed, q = l(K), J = te(() => u(q.data, r), [q.data, r]), Y = J.some((e) => e.id === P) ? P : J[0]?.id ?? "";
139
+ return g ? /* @__PURE__ */ U("div", { className: "h-32 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }) : /* @__PURE__ */ W("div", {
142
140
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 space-y-3",
143
- children: [/* @__PURE__ */ G("div", {
141
+ children: [/* @__PURE__ */ W("div", {
144
142
  className: "flex items-center justify-between",
145
- children: [/* @__PURE__ */ W("span", {
143
+ children: [/* @__PURE__ */ U("span", {
146
144
  className: "text-xs text-text-secondary font-medium uppercase tracking-wide",
147
145
  children: d("botlit.botChannels.connectedWorkspace", "Connected workspace")
148
- }), /* @__PURE__ */ W(o, {
149
- permission: a.CHANNEL_DELETE,
150
- children: /* @__PURE__ */ W(i, {
146
+ }), /* @__PURE__ */ U(L, {
147
+ permission: I.CHANNEL_DELETE,
148
+ children: /* @__PURE__ */ U(i, {
151
149
  variant: "ghost",
152
150
  size: "icon",
153
151
  onClick: async () => {
154
- if (await L({
155
- title: d("botlit.botChannels.removeThisPlatformChannelFrom", "Remove this {{platform}} channel from the bot?", { platform: U.label }),
152
+ if (await ee({
153
+ title: d("botlit.botChannels.removeThisPlatformChannelFrom", "Remove this {{platform}} channel from the bot?", { platform: H.label }),
156
154
  confirmLabel: d("botlit.channels.actions.remove", "Remove"),
157
155
  cancelLabel: d("botlit.common.cancel", "Cancel"),
158
156
  tone: "danger"
159
157
  })) try {
160
- await A(e), s(), Q.success(d("botlit.botChannels.platformChannelRemoved", "{{platform}} channel removed", { platform: U.label })), D() && k("success");
158
+ await k(e), o(), Q.success(d("botlit.botChannels.platformChannelRemoved", "{{platform}} channel removed", { platform: H.label })), p() && h("success");
161
159
  } catch (e) {
162
- Q.error(e instanceof Error ? e.message : d("botlit.botChannels.failedToRemove", "Failed to remove")), D() && k("error");
160
+ Q.error(e instanceof Error ? e.message : d("botlit.botChannels.failedToRemove", "Failed to remove")), p() && h("error");
163
161
  }
164
162
  },
165
163
  className: "h-7 w-7 text-text-secondary hover:text-status-error-text",
166
164
  title: d("botlit.botChannels.removeChannel", "Remove channel"),
167
- children: /* @__PURE__ */ W(le, { size: 13 })
165
+ children: /* @__PURE__ */ U(le, { size: 13 })
168
166
  })
169
167
  })]
170
- }), v ? /* @__PURE__ */ G("div", {
168
+ }), x ? /* @__PURE__ */ W("div", {
171
169
  className: "flex items-center gap-2 py-2 text-text-secondary",
172
- children: [/* @__PURE__ */ W(ie, {
170
+ children: [/* @__PURE__ */ U(ae, {
173
171
  size: 14,
174
172
  className: "animate-spin"
175
- }), /* @__PURE__ */ W("span", {
173
+ }), /* @__PURE__ */ U("span", {
176
174
  className: "text-xs",
177
- children: d("botlit.botChannels.checkingConnection", "Checking {{platform}} connection…", { platform: U.label })
175
+ children: d("botlit.botChannels.checkingConnection", "Checking {{platform}} connection…", { platform: H.label })
178
176
  })]
179
- }) : g?.dmAllowed ? /* @__PURE__ */ G("div", {
177
+ }) : y?.dmAllowed ? /* @__PURE__ */ W("div", {
180
178
  className: "space-y-2",
181
179
  children: [
182
- /* @__PURE__ */ G("div", {
180
+ /* @__PURE__ */ W("div", {
183
181
  className: "flex items-center gap-3 p-3 rounded-lg bg-bg-surface border border-border-subtle",
184
182
  children: [
185
- /* @__PURE__ */ W(K, {
183
+ /* @__PURE__ */ U(G, {
186
184
  size: 16,
187
185
  className: "text-status-success-text shrink-0"
188
186
  }),
189
- /* @__PURE__ */ G("div", {
187
+ /* @__PURE__ */ W("div", {
190
188
  className: "min-w-0 flex-1",
191
189
  children: [
192
- /* @__PURE__ */ W("p", {
190
+ /* @__PURE__ */ U("p", {
193
191
  className: "font-medium text-sm",
194
- children: g.externalDisplayName || g.externalUsername || g.externalUserId
192
+ children: y.externalDisplayName || y.externalUsername || y.externalUserId
195
193
  }),
196
- g.externalUsername && /* @__PURE__ */ G("p", {
194
+ y.externalUsername && /* @__PURE__ */ W("p", {
197
195
  className: "text-xs text-text-secondary",
198
- children: ["@", g.externalUsername]
196
+ children: ["@", y.externalUsername]
199
197
  }),
200
- g.connectedAt && /* @__PURE__ */ W("p", {
198
+ y.connectedAt && /* @__PURE__ */ U("p", {
201
199
  className: "text-xs text-text-secondary",
202
- children: d("botlit.botChannels.connectedOn", "Connected {{date}}", { date: new Date(g.connectedAt).toLocaleDateString() })
200
+ children: d("botlit.botChannels.connectedOn", "Connected {{date}}", { date: new Date(y.connectedAt).toLocaleDateString() })
203
201
  })
204
202
  ]
205
203
  }),
206
- g.isTokenExpired && /* @__PURE__ */ W(c, {
204
+ y.isTokenExpired && /* @__PURE__ */ U(a, {
207
205
  variant: "outline",
208
206
  className: "text-xs text-status-warning-text border-status-warning-border",
209
207
  children: d("botlit.botChannels.tokenExpired", "Token expired")
210
208
  })
211
209
  ]
212
210
  }),
213
- g.integrationConnectionId && /* @__PURE__ */ G("div", {
211
+ y.integrationConnectionId && /* @__PURE__ */ W("div", {
214
212
  className: "space-y-1.5",
215
- children: [/* @__PURE__ */ W("label", {
213
+ children: [/* @__PURE__ */ U("label", {
216
214
  className: "text-xs font-medium text-text-secondary",
217
215
  children: d("botlit.botChannels.integrationConnectionId", "Integration Connection ID")
218
- }), /* @__PURE__ */ W(u, {
219
- value: g.integrationConnectionId,
216
+ }), /* @__PURE__ */ U(s, {
217
+ value: y.integrationConnectionId,
220
218
  readOnly: !0,
221
219
  className: "text-xs font-mono bg-bg-sunken/50 cursor-default",
222
220
  onClick: (e) => {
223
- e.currentTarget.select(), O(g.integrationConnectionId), Q.success(d("botlit.botChannels.connectionIdCopiedToClipboard", "Connection ID copied to clipboard")), D() && j(d("botlit.botChannels.copied", "Copied"));
221
+ e.currentTarget.select(), m(y.integrationConnectionId), Q.success(d("botlit.botChannels.connectionIdCopiedToClipboard", "Connection ID copied to clipboard")), p() && _(d("botlit.botChannels.copied", "Copied"));
224
222
  },
225
223
  title: d("botlit.botChannels.clickToCopy", "Click to copy")
226
224
  })]
227
225
  }),
228
- /* @__PURE__ */ G("div", {
226
+ /* @__PURE__ */ W("div", {
229
227
  className: "flex items-center justify-between p-3 border border-border-subtle rounded-lg bg-bg-surface",
230
- children: [/* @__PURE__ */ G("div", {
228
+ children: [/* @__PURE__ */ W("div", {
231
229
  className: "flex items-center gap-2",
232
- children: [g.notificationsEnabled ? /* @__PURE__ */ W(ne, {
230
+ children: [y.notificationsEnabled ? /* @__PURE__ */ U(re, {
233
231
  size: 14,
234
232
  className: "text-primary"
235
- }) : /* @__PURE__ */ W(re, {
233
+ }) : /* @__PURE__ */ U(ie, {
236
234
  size: 14,
237
235
  className: "text-text-secondary"
238
- }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("p", {
236
+ }), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
239
237
  className: "text-sm font-medium",
240
238
  children: d("botlit.botChannels.dmNotifications", "DM Notifications")
241
- }), /* @__PURE__ */ W("p", {
239
+ }), /* @__PURE__ */ U("p", {
242
240
  className: "text-xs text-text-secondary",
243
- children: g.notificationsEnabled ? d("botlit.botChannels.botWillDmYouOn", "Bot will DM you on {{platform}}", { platform: U.label }) : d("botlit.botChannels.dmNotificationsPaused", "DM notifications paused")
241
+ children: y.notificationsEnabled ? d("botlit.botChannels.botWillDmYouOn", "Bot will DM you on {{platform}}", { platform: H.label }) : d("botlit.botChannels.dmNotificationsPaused", "DM notifications paused")
244
242
  })] })]
245
- }), /* @__PURE__ */ W(i, {
243
+ }), /* @__PURE__ */ U(i, {
246
244
  variant: "outline",
247
245
  size: "sm",
248
- isLoading: C,
246
+ isLoading: T,
249
247
  onClick: async () => {
250
- await S(g.id, !g.notificationsEnabled) && await y();
248
+ await w(y.id, !y.notificationsEnabled) && await S();
251
249
  },
252
- children: g.notificationsEnabled ? d("botlit.botChannels.disable", "Disable") : d("botlit.botChannels.enable", "Enable")
250
+ children: y.notificationsEnabled ? d("botlit.botChannels.disable", "Disable") : d("botlit.botChannels.enable", "Enable")
253
251
  })]
254
252
  }),
255
- /* @__PURE__ */ G("div", {
253
+ /* @__PURE__ */ W("div", {
256
254
  className: "flex gap-2 justify-end pt-1",
257
- children: [g.isTokenExpired && /* @__PURE__ */ W(i, {
255
+ children: [y.isTokenExpired && /* @__PURE__ */ U(i, {
258
256
  variant: "outline",
259
257
  size: "sm",
260
- leftIcon: U.icon,
261
- onClick: l,
258
+ leftIcon: H.icon,
259
+ onClick: c,
262
260
  children: d("botlit.botChannels.reconnect", "Reconnect")
263
- }), /* @__PURE__ */ W(i, {
261
+ }), /* @__PURE__ */ U(i, {
264
262
  variant: "destructive",
265
263
  size: "sm",
266
- leftIcon: /* @__PURE__ */ W(ue, { size: 13 }),
267
- isLoading: T,
264
+ leftIcon: /* @__PURE__ */ U(ue, { size: 13 }),
265
+ isLoading: D,
268
266
  onClick: async () => {
269
- await w(g.id) && await y();
267
+ await E(y.id) && await S();
270
268
  },
271
269
  children: d("botlit.botChannels.disconnect", "Disconnect")
272
270
  })]
273
271
  })
274
272
  ]
275
- }) : /* @__PURE__ */ G("div", {
273
+ }) : /* @__PURE__ */ W("div", {
276
274
  className: "space-y-3 py-2",
277
275
  children: [
278
- /* @__PURE__ */ G("div", {
276
+ /* @__PURE__ */ W("div", {
279
277
  className: "flex items-center gap-2 p-3 rounded-lg bg-bg-surface border border-border-subtle",
280
- children: [/* @__PURE__ */ W("div", {
278
+ children: [/* @__PURE__ */ U("div", {
281
279
  className: "p-2 rounded-full bg-bg-sunken shrink-0",
282
- children: /* @__PURE__ */ W("span", {
280
+ children: /* @__PURE__ */ U("span", {
283
281
  className: "text-text-secondary",
284
- children: U.icon
282
+ children: H.icon
285
283
  })
286
- }), /* @__PURE__ */ G("div", {
284
+ }), /* @__PURE__ */ W("div", {
287
285
  className: "flex-1 min-w-0",
288
- children: [/* @__PURE__ */ W("p", {
286
+ children: [/* @__PURE__ */ U("p", {
289
287
  className: "font-medium text-sm",
290
288
  children: d("botlit.botChannels.noPersonalAccountConnected", "No personal account connected")
291
- }), /* @__PURE__ */ W("p", {
289
+ }), /* @__PURE__ */ U("p", {
292
290
  className: "text-xs text-text-secondary mt-0.5",
293
- children: d("botlit.botChannels.connectForDirectMessages", "Connect your {{platform}} account to receive bot DMs", { platform: U.label })
291
+ children: d("botlit.botChannels.connectForDirectMessages", "Connect your {{platform}} account to receive bot DMs", { platform: H.label })
294
292
  })]
295
293
  })]
296
294
  }),
297
- /* @__PURE__ */ G("div", {
295
+ /* @__PURE__ */ W("div", {
298
296
  className: "p-3 rounded-lg bg-bg-sunken/50 space-y-2",
299
- children: [/* @__PURE__ */ W("p", {
297
+ children: [/* @__PURE__ */ U("p", {
300
298
  className: "text-xs font-medium text-text-secondary",
301
299
  children: d("botlit.botChannels.connectYourAccount", "Connect your account:")
302
- }), /* @__PURE__ */ G("ol", {
300
+ }), /* @__PURE__ */ W("ol", {
303
301
  className: "list-decimal list-inside space-y-1 text-xs text-text-secondary",
304
302
  children: [
305
- /* @__PURE__ */ W("li", { children: d("botlit.botChannels.clickOpenIntegrationsBelowOpens", "Click \"Open Integrations\" below (opens in new tab)") }),
306
- /* @__PURE__ */ W("li", { children: d("botlit.botChannels.connectViaOAuth", "Connect your {{platform}} account via OAuth", { platform: U.label }) }),
307
- /* @__PURE__ */ W("li", { children: d("botlit.botChannels.comeBackChooseTheAccount", "Come back, choose the account below and click \"Link account\"") })
303
+ /* @__PURE__ */ U("li", { children: d("botlit.botChannels.clickOpenIntegrationsBelowOpens", "Click \"Open Integrations\" below (opens in new tab)") }),
304
+ /* @__PURE__ */ U("li", { children: d("botlit.botChannels.connectViaOAuth", "Connect your {{platform}} account via OAuth", { platform: H.label }) }),
305
+ /* @__PURE__ */ U("li", { children: d("botlit.botChannels.comeBackChooseTheAccount", "Come back, choose the account below and click \"Link account\"") })
308
306
  ]
309
307
  })]
310
308
  }),
311
- /* @__PURE__ */ W(i, {
309
+ /* @__PURE__ */ U(i, {
312
310
  variant: "outline",
313
311
  size: "sm",
314
- leftIcon: U.icon,
315
- onClick: l,
312
+ leftIcon: H.icon,
313
+ onClick: c,
316
314
  className: "w-full",
317
315
  children: d("botlit.botChannels.openIntegrations", "Open Integrations →")
318
316
  }),
319
- J.loading ? /* @__PURE__ */ W("p", {
317
+ q.loading ? /* @__PURE__ */ U("p", {
320
318
  role: "status",
321
319
  className: "text-xs text-text-secondary",
322
320
  children: d("botlit.botChannels.loadingYourConnectedAccounts", "Loading your connected accounts…")
323
- }) : J.error ? /* @__PURE__ */ G("div", {
321
+ }) : q.error ? /* @__PURE__ */ W("div", {
324
322
  role: "alert",
325
323
  className: "flex flex-wrap items-center gap-2 text-xs text-status-error-text",
326
- children: [/* @__PURE__ */ W("span", { children: J.error.message }), /* @__PURE__ */ W(i, {
324
+ children: [/* @__PURE__ */ U("span", { children: q.error.message }), /* @__PURE__ */ U(i, {
327
325
  size: "sm",
328
326
  variant: "outline",
329
- onClick: () => void J.refetch(),
327
+ onClick: () => void q.refetch(),
330
328
  children: d("botlit.botChannels.tryAgain", "Try again")
331
329
  })]
332
- }) : Y.length === 0 ? /* @__PURE__ */ G("div", {
330
+ }) : J.length === 0 ? /* @__PURE__ */ W("div", {
333
331
  className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
334
- children: [/* @__PURE__ */ W("span", { children: d("botlit.botChannels.noConnectedAccount", "No connected {{platform}} account yet. Connect one in Integrations, then refresh.", { platform: U.label }) }), /* @__PURE__ */ W(i, {
332
+ children: [/* @__PURE__ */ U("span", { children: d("botlit.botChannels.noConnectedAccount", "No connected {{platform}} account yet. Connect one in Integrations, then refresh.", { platform: H.label }) }), /* @__PURE__ */ U(i, {
335
333
  size: "sm",
336
334
  variant: "outline",
337
- onClick: () => void J.refetch(),
335
+ onClick: () => void q.refetch(),
338
336
  children: d("botlit.botChannels.refresh", "Refresh")
339
337
  })]
340
- }) : /* @__PURE__ */ G("div", {
338
+ }) : /* @__PURE__ */ W("div", {
341
339
  className: "flex gap-2",
342
340
  children: [
343
- /* @__PURE__ */ W("label", {
341
+ /* @__PURE__ */ U("label", {
344
342
  className: "sr-only",
345
343
  htmlFor: `link-connection-${e}`,
346
- children: d("botlit.botChannels.yourPlatformAccount", "Your {{platform}} account", { platform: U.label })
344
+ children: d("botlit.botChannels.yourPlatformAccount", "Your {{platform}} account", { platform: H.label })
347
345
  }),
348
- /* @__PURE__ */ W(te, {
346
+ /* @__PURE__ */ U(ne, {
349
347
  id: `link-connection-${e}`,
350
348
  className: "h-9 flex-1 rounded-md border border-border-default bg-bg-surface px-3 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
351
- value: X,
352
- onChange: (e) => I(e.target.value),
353
- children: Y.map((e) => /* @__PURE__ */ W("option", {
349
+ value: Y,
350
+ onChange: (e) => R(e.target.value),
351
+ children: J.map((e) => /* @__PURE__ */ U("option", {
354
352
  value: e.id,
355
353
  children: e.externalAccountName ?? e.externalAccountEmail ?? e.name
356
354
  }, e.id))
357
355
  }),
358
- /* @__PURE__ */ W(i, {
356
+ /* @__PURE__ */ U(i, {
359
357
  size: "sm",
360
358
  onClick: async () => {
361
- if (!X) Q.error(d("botlit.botChannels.chooseAConnectedPlatformAccount", "Choose a connected {{platform}} account first", { platform: U.label }));
359
+ if (!Y) Q.error(d("botlit.botChannels.chooseAConnectedPlatformAccount", "Choose a connected {{platform}} account first", { platform: H.label }));
362
360
  else {
363
361
  B(!0);
364
362
  try {
365
- let e = await E(X, h);
366
- e ? (Q.success(d("botlit.botChannels.accountConnectedTheBotCan", "{{account}} connected! The bot can now send you direct messages.", { account: e.externalDisplayName ?? e.externalUsername ?? d("botlit.botChannels.account", "Account") })), await y(), I("")) : Q.error(d("botlit.botChannels.failedToLinkTheAccount", "Failed to link the account. Reconnect it in Integrations and try again."));
363
+ let e = await O(Y, v);
364
+ e ? (Q.success(d("botlit.botChannels.accountConnectedTheBotCan", "{{account}} connected! The bot can now send you direct messages.", { account: e.externalDisplayName ?? e.externalUsername ?? d("botlit.botChannels.account", "Account") })), await S(), R("")) : Q.error(d("botlit.botChannels.failedToLinkTheAccount", "Failed to link the account. Reconnect it in Integrations and try again."));
367
365
  } catch (e) {
368
366
  Q.error(e instanceof Error ? e.message : d("botlit.botChannels.failedToLinkConnection", "Failed to link connection"));
369
367
  } finally {
@@ -372,7 +370,7 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
372
370
  }
373
371
  },
374
372
  isLoading: z,
375
- disabled: !X || z,
373
+ disabled: !Y || z,
376
374
  children: d("botlit.botChannels.linkAccount", "Link account")
377
375
  })
378
376
  ]
@@ -380,8 +378,8 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
380
378
  ]
381
379
  })]
382
380
  });
383
- }, ye = ({ channel: s, routes: l, botId: u, botName: d, onRoutesChanged: f }) => {
384
- let p = R(), { basePath: m } = C(), [_] = g(), [b] = h(), [x] = y(), S = v(), [w, T] = H(!1), E = s.platform, O = $(E), k = _e(s.adapterType), j = w, M = B((e) => {
381
+ }, ye = ({ channel: o, routes: s, botId: c, botName: l, onRoutesChanged: u }) => {
382
+ let d = F(), { basePath: m } = f(), [h] = S(), [_] = x(), [v] = T(), y = w(), [b, C] = V(!1), E = o.platform, D = $(E), O = _e(o.adapterType), k = b, A = B((e) => {
385
383
  let t = pe[E];
386
384
  if (!t) return;
387
385
  let n = window.location.origin + window.location.pathname + window.location.search, r = `${m ? m.replace(/\/(botmanor|botlit)(\/.*)?$/, "/integrations") : "/integrations"}/connections/add?${new URLSearchParams({
@@ -389,280 +387,280 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
389
387
  returnTo: n,
390
388
  channelId: e
391
389
  }).toString()}`;
392
- D() && /^https?:\/\//.test(r) ? A(r) : window.open(r, "_blank");
393
- }, [E, m]), N = B(async () => {
394
- T(!0);
390
+ p() && /^https?:\/\//.test(r) ? g(r) : window.open(r, "_blank");
391
+ }, [E, m]), j = B(async () => {
392
+ C(!0);
395
393
  try {
396
- let e = await S(s.id), t = await I(s, e, {
397
- create: b,
398
- activate: (e) => x({
394
+ let e = await y(o.id), t = await P(o, e, {
395
+ create: _,
396
+ activate: (e) => v({
399
397
  connectorId: e,
400
398
  input: { status: "ACTIVE" }
401
399
  })
402
400
  });
403
- await _({
401
+ await h({
404
402
  connectorId: t.id,
405
- appId: u,
403
+ appId: c,
406
404
  locationId: "*",
407
405
  metadata: {
408
406
  locationName: "All channels & DMs",
409
- appName: d
407
+ appName: l
410
408
  }
411
- }), await f(), M(s.id);
409
+ }), await u(), A(o.id);
412
410
  } catch (e) {
413
- Q.error(e instanceof Error ? e.message : p("botlit.botChannels.failedToConnectPlatform", "Failed to connect {{platform}}", { platform: O.label })), T(!1);
411
+ Q.error(e instanceof Error ? e.message : d("botlit.botChannels.failedToConnectPlatform", "Failed to connect {{platform}}", { platform: D.label })), C(!1);
414
412
  }
415
413
  }, [
416
- u,
417
- d,
418
- s,
419
- S,
420
- b,
421
- x,
414
+ c,
415
+ l,
416
+ o,
417
+ y,
422
418
  _,
423
- O.label,
424
- M,
425
- f,
426
- p
427
- ]), P = B(() => {
428
- M(s.id);
429
- }, [s.id, M]);
430
- return /* @__PURE__ */ G(e, { children: [/* @__PURE__ */ G(n, {
419
+ v,
420
+ h,
421
+ D.label,
422
+ A,
423
+ u,
424
+ d
425
+ ]), M = B(() => {
426
+ A(o.id);
427
+ }, [o.id, A]);
428
+ return /* @__PURE__ */ W(e, { children: [/* @__PURE__ */ W(n, {
431
429
  className: "flex flex-row items-center justify-between pb-3",
432
- children: [/* @__PURE__ */ G("div", {
430
+ children: [/* @__PURE__ */ W("div", {
433
431
  className: "flex items-center gap-2.5",
434
- children: [/* @__PURE__ */ W("div", {
435
- className: `p-1.5 rounded-md ${O.accentBg}`,
436
- children: /* @__PURE__ */ W("span", {
437
- className: O.accentText,
438
- children: O.icon
432
+ children: [/* @__PURE__ */ U("div", {
433
+ className: `p-1.5 rounded-md ${D.accentBg}`,
434
+ children: /* @__PURE__ */ U("span", {
435
+ className: D.accentText,
436
+ children: D.icon
439
437
  })
440
- }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(r, {
438
+ }), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(r, {
441
439
  className: "text-base",
442
- children: s.name
443
- }), k && /* @__PURE__ */ W("p", {
440
+ children: o.name
441
+ }), O && /* @__PURE__ */ U("p", {
444
442
  className: "text-xs text-text-secondary mt-0.5",
445
- children: k
443
+ children: O
446
444
  })] })]
447
- }), /* @__PURE__ */ G("div", {
445
+ }), /* @__PURE__ */ W("div", {
448
446
  className: "flex items-center gap-1.5",
449
- children: [/* @__PURE__ */ W("span", {
450
- className: `px-2 py-0.5 text-xs font-semibold rounded-full ${O.badgeClass}`,
451
- children: O.label
452
- }), l.some((e) => e.isActive) ? /* @__PURE__ */ W(c, {
447
+ children: [/* @__PURE__ */ U("span", {
448
+ className: `px-2 py-0.5 text-xs font-semibold rounded-full ${D.badgeClass}`,
449
+ children: D.label
450
+ }), s.some((e) => e.isActive) ? /* @__PURE__ */ U(a, {
453
451
  variant: "outline",
454
452
  className: "text-xs text-status-success-text border-status-success-border bg-status-success-bg-subtle",
455
- children: p("botlit.botChannels.active", "Active")
456
- }) : l.length > 0 && /* @__PURE__ */ W(c, {
453
+ children: d("botlit.botChannels.active", "Active")
454
+ }) : s.length > 0 && /* @__PURE__ */ U(a, {
457
455
  variant: "outline",
458
456
  className: "text-xs",
459
- title: p("botlit.botChannels.turnTheRouteOnIn", "Turn the route on in Channels"),
460
- children: p("botlit.botChannels.off", "Off")
457
+ title: d("botlit.botChannels.turnTheRouteOnIn", "Turn the route on in Channels"),
458
+ children: d("botlit.botChannels.off", "Off")
461
459
  })]
462
460
  })]
463
- }), /* @__PURE__ */ W(t, { children: l.length > 0 ? /* @__PURE__ */ W("div", {
461
+ }), /* @__PURE__ */ U(t, { children: s.length > 0 ? /* @__PURE__ */ U("div", {
464
462
  className: "space-y-3",
465
- children: l.map((e) => /* @__PURE__ */ W(ve, {
463
+ children: s.map((e) => /* @__PURE__ */ U(ve, {
466
464
  routeId: e.id,
467
465
  connectorId: e.connectorId,
468
- channelId: s.id,
466
+ channelId: o.id,
469
467
  platform: E,
470
- onRemoved: f,
471
- onReconnect: P
468
+ onRemoved: u,
469
+ onReconnect: M
472
470
  }, e.id))
473
- }) : /* @__PURE__ */ G("div", {
471
+ }) : /* @__PURE__ */ W("div", {
474
472
  className: "flex flex-col items-center gap-4 py-8 text-center",
475
473
  children: [
476
- /* @__PURE__ */ W("div", {
474
+ /* @__PURE__ */ U("div", {
477
475
  className: "p-4 rounded-full bg-bg-sunken",
478
- children: /* @__PURE__ */ W("span", {
476
+ children: /* @__PURE__ */ U("span", {
479
477
  className: "text-text-secondary",
480
- children: O.icon
478
+ children: D.icon
481
479
  })
482
480
  }),
483
- /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("p", {
481
+ /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
484
482
  className: "font-medium text-sm",
485
- children: p("botlit.botChannels.notConnectedToThisBot", "Not connected to this bot")
486
- }), /* @__PURE__ */ W("p", {
483
+ children: d("botlit.botChannels.notConnectedToThisBot", "Not connected to this bot")
484
+ }), /* @__PURE__ */ U("p", {
487
485
  className: "text-xs text-text-secondary mt-1",
488
- children: p("botlit.botChannels.enableExplanation", "Enable {{platform}} for this bot. Users will connect their personal accounts separately.", { platform: O.label })
486
+ children: d("botlit.botChannels.enableExplanation", "Enable {{platform}} for this bot. Users will connect their personal accounts separately.", { platform: D.label })
489
487
  })] }),
490
- /* @__PURE__ */ W(o, {
491
- permission: a.CHANNEL_CREATE,
492
- children: /* @__PURE__ */ W(i, {
493
- leftIcon: O.icon,
494
- onClick: N,
495
- isLoading: j,
496
- children: p("botlit.botChannels.setUpChannel", "Set up {{platform}} channel", { platform: O.label })
488
+ /* @__PURE__ */ U(L, {
489
+ permission: I.CHANNEL_CREATE,
490
+ children: /* @__PURE__ */ U(i, {
491
+ leftIcon: D.icon,
492
+ onClick: j,
493
+ isLoading: k,
494
+ children: d("botlit.botChannels.setUpChannel", "Set up {{platform}} channel", { platform: D.label })
497
495
  })
498
496
  })
499
497
  ]
500
498
  }) })] });
501
- }, be = ({ connector: s, routes: l, botId: u, botName: d, onRoutesChanged: f }) => {
502
- let p = R(), { navigateTo: m, workspaceId: h } = C(), [v] = g(), [b] = _(), [x] = y(), [O, A] = H(!1), j = $(s.type), M = s.status === "ACTIVE", N = T(s.type) ? s.credentialsRefId : null, { data: P, loading: F, error: ee, refetch: I } = E(N), z = B(async () => {
503
- A(!0);
499
+ }, be = ({ connector: o, routes: s, botId: c, botName: l, onRoutesChanged: u }) => {
500
+ let m = F(), { navigateTo: g, workspaceId: _ } = f(), [v] = S(), [y] = C(), [b] = T(), [x, w] = V(!1), k = $(o.type), A = o.status === "ACTIVE", j = D(o.type) ? o.credentialsRefId : null, { data: M, loading: N, error: P, refetch: R } = O(j), z = B(async () => {
501
+ w(!0);
504
502
  try {
505
503
  let e = await v({
506
- connectorId: s.id,
507
- appId: u,
504
+ connectorId: o.id,
505
+ appId: c,
508
506
  locationId: "*",
509
507
  metadata: {
510
508
  locationName: "All locations",
511
- appName: d
509
+ appName: l
512
510
  }
513
511
  });
514
- if (!M) try {
515
- await x({
516
- connectorId: s.id,
512
+ if (!A) try {
513
+ await b({
514
+ connectorId: o.id,
517
515
  input: { status: "ACTIVE" }
518
516
  });
519
517
  } catch (t) {
520
- throw await b(e.id).catch(() => void 0), await f(), t;
518
+ throw await y(e.id).catch(() => void 0), await u(), t;
521
519
  }
522
- await f(), N && await I(), Q.success(p("botlit.botChannels.channelNowAnswersWithBot", "{{channel}} now answers with {{bot}}", {
523
- channel: s.name,
524
- bot: d
525
- })), D() && k("success");
520
+ await u(), j && await R(), Q.success(m("botlit.botChannels.channelNowAnswersWithBot", "{{channel}} now answers with {{bot}}", {
521
+ channel: o.name,
522
+ bot: l
523
+ })), p() && h("success");
526
524
  } catch (e) {
527
- Q.error(e instanceof Error ? e.message : p("botlit.botChannels.failedToRouteChannel", "Failed to route {{channel}}", { channel: s.name })), D() && k("error");
525
+ Q.error(e instanceof Error ? e.message : m("botlit.botChannels.failedToRouteChannel", "Failed to route {{channel}}", { channel: o.name })), p() && h("error");
528
526
  } finally {
529
- A(!1);
527
+ w(!1);
530
528
  }
531
529
  }, [
532
- M,
533
- u,
534
- d,
535
- s.id,
536
- s.name,
530
+ A,
531
+ c,
532
+ l,
533
+ o.id,
534
+ o.name,
537
535
  v,
538
- b,
539
- N,
540
- f,
541
- I,
542
- p,
543
- x
544
- ]), V = B(async (e) => {
545
- if (await L({
546
- title: p("botlit.botChannels.removeChannelFromThisBot", "Remove {{channel}} from this bot?", { channel: s.name }),
547
- confirmLabel: p("botlit.channels.actions.remove", "Remove"),
548
- cancelLabel: p("botlit.common.cancel", "Cancel"),
536
+ y,
537
+ j,
538
+ u,
539
+ R,
540
+ m,
541
+ b
542
+ ]), te = B(async (e) => {
543
+ if (await ee({
544
+ title: m("botlit.botChannels.removeChannelFromThisBot", "Remove {{channel}} from this bot?", { channel: o.name }),
545
+ confirmLabel: m("botlit.channels.actions.remove", "Remove"),
546
+ cancelLabel: m("botlit.common.cancel", "Cancel"),
549
547
  tone: "danger"
550
548
  })) try {
551
- await b(e), await f(), Q.success(p("botlit.botChannels.channelRemovedFromTheBot", "{{channel}} removed from the bot", { channel: s.name })), D() && k("success");
549
+ await y(e), await u(), Q.success(m("botlit.botChannels.channelRemovedFromTheBot", "{{channel}} removed from the bot", { channel: o.name })), p() && h("success");
552
550
  } catch (e) {
553
- Q.error(e instanceof Error ? e.message : p("botlit.botChannels.failedToRemove", "Failed to remove")), D() && k("error");
551
+ Q.error(e instanceof Error ? e.message : m("botlit.botChannels.failedToRemove", "Failed to remove")), p() && h("error");
554
552
  }
555
553
  }, [
556
- s.name,
557
- b,
558
- f,
559
- p
554
+ o.name,
555
+ y,
556
+ u,
557
+ m
560
558
  ]);
561
- return /* @__PURE__ */ G(e, { children: [/* @__PURE__ */ G(n, {
559
+ return /* @__PURE__ */ W(e, { children: [/* @__PURE__ */ W(n, {
562
560
  className: "flex flex-row items-center justify-between pb-3",
563
- children: [/* @__PURE__ */ G("div", {
561
+ children: [/* @__PURE__ */ W("div", {
564
562
  className: "flex items-center gap-2.5",
565
- children: [/* @__PURE__ */ W("div", {
566
- className: `p-1.5 rounded-md ${j.accentBg}`,
567
- children: /* @__PURE__ */ W("span", {
568
- className: j.accentText,
569
- children: j.icon
563
+ children: [/* @__PURE__ */ U("div", {
564
+ className: `p-1.5 rounded-md ${k.accentBg}`,
565
+ children: /* @__PURE__ */ U("span", {
566
+ className: k.accentText,
567
+ children: k.icon
570
568
  })
571
- }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(r, {
569
+ }), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(r, {
572
570
  className: "text-base",
573
- children: s.name
574
- }), s.description && /* @__PURE__ */ W("p", {
571
+ children: o.name
572
+ }), o.description && /* @__PURE__ */ U("p", {
575
573
  className: "text-xs text-text-secondary mt-0.5",
576
- children: s.description
574
+ children: o.description
577
575
  })] })]
578
- }), /* @__PURE__ */ G("div", {
576
+ }), /* @__PURE__ */ W("div", {
579
577
  className: "flex items-center gap-1.5",
580
- children: [/* @__PURE__ */ W("span", {
581
- className: `px-2 py-0.5 text-xs font-semibold rounded-full ${j.badgeClass}`,
582
- children: j.label
583
- }), /* @__PURE__ */ W(c, {
578
+ children: [/* @__PURE__ */ U("span", {
579
+ className: `px-2 py-0.5 text-xs font-semibold rounded-full ${k.badgeClass}`,
580
+ children: k.label
581
+ }), /* @__PURE__ */ U(a, {
584
582
  variant: "outline",
585
583
  className: "text-xs",
586
- children: M ? p("botlit.botChannels.active", "Active") : p("botlit.botChannels.draft", "Draft")
584
+ children: A ? m("botlit.botChannels.active", "Active") : m("botlit.botChannels.draft", "Draft")
587
585
  })]
588
586
  })]
589
- }), /* @__PURE__ */ G(t, {
587
+ }), /* @__PURE__ */ W(t, {
590
588
  className: "space-y-4",
591
589
  children: [
592
- l.length > 0 ? /* @__PURE__ */ W("div", {
590
+ s.length > 0 ? /* @__PURE__ */ U("div", {
593
591
  className: "space-y-2",
594
- children: l.map((e) => /* @__PURE__ */ G("div", {
592
+ children: s.map((e) => /* @__PURE__ */ W("div", {
595
593
  className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-sunken/30 px-3 py-2",
596
- children: [/* @__PURE__ */ G("span", {
594
+ children: [/* @__PURE__ */ W("span", {
597
595
  className: "text-sm",
598
596
  children: [
599
- e.isActive ? p("botlit.botChannels.answers", "Answers") : p("botlit.botChannels.turnedOffFor", "Turned off for"),
597
+ e.isActive ? m("botlit.botChannels.answers", "Answers") : m("botlit.botChannels.turnedOffFor", "Turned off for"),
600
598
  " ",
601
- e.locationId === "*" ? p("botlit.botChannels.everyLocation", "every location") : /* @__PURE__ */ W("code", { children: e.locationId }),
602
- !e.isActive && /* @__PURE__ */ W("span", {
599
+ e.locationId === "*" ? m("botlit.botChannels.everyLocation", "every location") : /* @__PURE__ */ U("code", { children: e.locationId }),
600
+ !e.isActive && /* @__PURE__ */ U("span", {
603
601
  className: "ml-2 text-xs text-text-secondary",
604
- children: p("botlit.botChannels.turnItOnInChannels", "(turn it on in Channels to answer here)")
602
+ children: m("botlit.botChannels.turnItOnInChannels", "(turn it on in Channels to answer here)")
605
603
  })
606
604
  ]
607
- }), /* @__PURE__ */ W(o, {
608
- permission: a.CHANNEL_DELETE,
609
- children: /* @__PURE__ */ W(i, {
605
+ }), /* @__PURE__ */ U(L, {
606
+ permission: I.CHANNEL_DELETE,
607
+ children: /* @__PURE__ */ U(i, {
610
608
  variant: "ghost",
611
609
  size: "icon",
612
- onClick: () => void V(e.id),
610
+ onClick: () => void te(e.id),
613
611
  className: "h-7 w-7 text-text-secondary hover:text-status-error-text",
614
- title: p("botlit.botChannels.removeChannel", "Remove channel"),
615
- "aria-label": p("botlit.botChannels.removeChannelFromTheBot", "Remove {{channel}} from the bot", { channel: s.name }),
616
- children: /* @__PURE__ */ W(le, { size: 14 })
612
+ title: m("botlit.botChannels.removeChannel", "Remove channel"),
613
+ "aria-label": m("botlit.botChannels.removeChannelFromTheBot", "Remove {{channel}} from the bot", { channel: o.name }),
614
+ children: /* @__PURE__ */ U(le, { size: 14 })
617
615
  })
618
616
  })]
619
617
  }, e.id))
620
- }) : /* @__PURE__ */ G("div", {
618
+ }) : /* @__PURE__ */ W("div", {
621
619
  className: "flex flex-col items-center gap-3 py-6 text-center",
622
- children: [/* @__PURE__ */ W("p", {
620
+ children: [/* @__PURE__ */ U("p", {
623
621
  className: "text-sm text-text-secondary",
624
- children: M ? p("botlit.botChannels.routeEveryMessageOfThis", "Route every message of this channel to {{bot}}.", { bot: d }) : p("botlit.botChannels.activateThisConnectorAndRoute", "Activate this connector and route every message of it to {{bot}}.", { bot: d })
625
- }), /* @__PURE__ */ W(o, {
626
- permission: a.CHANNEL_CREATE,
627
- children: /* @__PURE__ */ W(o, {
628
- permission: M ? a.CHANNEL_CREATE : a.CHANNEL_UPDATE,
629
- children: /* @__PURE__ */ W(i, {
630
- leftIcon: j.icon,
622
+ children: A ? m("botlit.botChannels.routeEveryMessageOfThis", "Route every message of this channel to {{bot}}.", { bot: l }) : m("botlit.botChannels.activateThisConnectorAndRoute", "Activate this connector and route every message of it to {{bot}}.", { bot: l })
623
+ }), /* @__PURE__ */ U(L, {
624
+ permission: I.CHANNEL_CREATE,
625
+ children: /* @__PURE__ */ U(L, {
626
+ permission: A ? I.CHANNEL_CREATE : I.CHANNEL_UPDATE,
627
+ children: /* @__PURE__ */ U(i, {
628
+ leftIcon: k.icon,
631
629
  onClick: () => void z(),
632
- isLoading: O,
633
- children: p("botlit.botChannels.routeToThisBot", "Route to this bot")
630
+ isLoading: x,
631
+ children: m("botlit.botChannels.routeToThisBot", "Route to this bot")
634
632
  })
635
633
  })
636
634
  })]
637
635
  }),
638
- N && l.length > 0 && /* @__PURE__ */ W(S, {
639
- channel: P,
640
- loading: F,
641
- error: ee,
642
- connectorActive: M,
643
- workspaceId: h,
644
- hint: w[s.type]?.inboundHint,
645
- usesInboundUrl: w[s.type]?.usesInboundUrl ?? !0,
646
- onRefresh: () => void I()
636
+ j && s.length > 0 && /* @__PURE__ */ U(d, {
637
+ channel: M,
638
+ loading: N,
639
+ error: P,
640
+ connectorActive: A,
641
+ workspaceId: _,
642
+ hint: E[o.type]?.inboundHint,
643
+ usesInboundUrl: E[o.type]?.usesInboundUrl ?? !0,
644
+ onRefresh: () => void R()
647
645
  }),
648
- /* @__PURE__ */ W(i, {
646
+ /* @__PURE__ */ U(i, {
649
647
  variant: "ghost",
650
648
  size: "sm",
651
- leftIcon: /* @__PURE__ */ W(J, { size: 14 }),
652
- onClick: () => m(`channels/${s.id}`),
653
- children: p("botlit.botChannels.openConnector", "Open connector")
649
+ leftIcon: /* @__PURE__ */ U(q, { size: 14 }),
650
+ onClick: () => g(`channels/${o.id}`),
651
+ children: m("botlit.botChannels.openConnector", "Open connector")
654
652
  })
655
653
  ]
656
654
  })] });
657
655
  }, xe = ({ route: e, oauthChannels: t, botId: n, botName: r, onRoutesChanged: i }) => {
658
- let { data: a } = m(e.connectorId), o = t.find((e) => e.id === a?.credentialsRefId);
659
- return a ? !o || !me.has(o.platform) ? /* @__PURE__ */ W(be, {
656
+ let { data: a } = b(e.connectorId), o = t.find((e) => e.id === a?.credentialsRefId);
657
+ return a ? !o || !me.has(o.platform) ? /* @__PURE__ */ U(be, {
660
658
  connector: a,
661
659
  routes: [e],
662
660
  botId: n,
663
661
  botName: r,
664
662
  onRoutesChanged: i
665
- }) : /* @__PURE__ */ W(ye, {
663
+ }) : /* @__PURE__ */ U(ye, {
666
664
  channel: o,
667
665
  routes: [e],
668
666
  botId: n,
@@ -670,7 +668,7 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
670
668
  onRoutesChanged: i
671
669
  }) : null;
672
670
  }, Se = ({ channels: e, routes: t, connectors: n }) => {
673
- let r = R(), a = [
671
+ let r = F(), a = [
674
672
  {
675
673
  id: "channels",
676
674
  label: r("botlit.botChannels.failedToLoadChannels", "Failed to load channels:"),
@@ -687,13 +685,13 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
687
685
  ...n
688
686
  }
689
687
  ];
690
- return /* @__PURE__ */ W(U, { children: a.map(({ id: e, label: t, error: n, retry: a }) => n ? /* @__PURE__ */ G("div", {
688
+ return /* @__PURE__ */ U(H, { children: a.map(({ id: e, label: t, error: n, retry: a }) => n ? /* @__PURE__ */ W("div", {
691
689
  className: "flex items-center justify-between 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",
692
- children: [/* @__PURE__ */ G("span", { children: [
690
+ children: [/* @__PURE__ */ W("span", { children: [
693
691
  t,
694
692
  " ",
695
693
  n.message
696
- ] }), /* @__PURE__ */ W(i, {
694
+ ] }), /* @__PURE__ */ U(i, {
697
695
  variant: "ghost",
698
696
  size: "sm",
699
697
  onClick: () => void a(),
@@ -701,130 +699,130 @@ var ve = ({ routeId: e, connectorId: t, channelId: n, platform: r, onRemoved: s,
701
699
  })]
702
700
  }, e) : null) });
703
701
  }, Ce = ({ botId: n, botName: r }) => {
704
- let c = R(), { organizationId: u } = C(), m = V(() => ({
702
+ let a = F(), { organizationId: s } = f(), l = te(() => ({
705
703
  channelType: z.Communication,
706
- organizationId: u || void 0
707
- }), [u]), { data: h, loading: g, error: _, refetch: v } = M(m), { data: y, loading: b, error: x, refetch: S } = p(n), [w, T] = H(!1), [E, D] = H(null), { data: O, loading: k, error: A, refetch: j } = f(), N = B(async () => {
708
- await Promise.all([S(), j()]);
709
- }, [S, j]), P = h.filter((e) => me.has(e.platform)), F = P.filter((e) => e.status === "ACTIVE" && (!u || e.organizationId === u)), ee = new Set(y.map((e) => O.find((t) => t.id === e.connectorId)).map((e) => e?.credentialsRefId).filter((e) => !!e)), I = !g && !b && !k && !_ && !x && !A, L = F.filter((e) => I && !ee.has(e.id)), te = new Set(P.map((e) => e.id)), ne = new Set(y.map((e) => e.connectorId)), re = s(a.CHANNEL_UPDATE), K = O.filter((e) => I && he.has(e.status) && (e.status === "ACTIVE" || re) && !ne.has(e.id) && !(e.credentialsRefId && te.has(e.credentialsRefId))), q = [...K.map((e) => ({
704
+ organizationId: s || void 0
705
+ }), [s]), { data: u, loading: d, error: p, refetch: m } = k(l), { data: h, loading: g, error: _, refetch: b } = y(n), [x, S] = V(!1), [C, w] = V(null), { data: T, loading: E, error: D, refetch: O } = v(), A = B(async () => {
706
+ await Promise.all([b(), O()]);
707
+ }, [b, O]), j = u.filter((e) => me.has(e.platform)), M = j.filter((e) => e.status === "ACTIVE" && (!s || e.organizationId === s)), N = new Set(h.map((e) => T.find((t) => t.id === e.connectorId)).map((e) => e?.credentialsRefId).filter((e) => !!e)), P = !d && !g && !E && !p && !_ && !D, ee = M.filter((e) => P && !N.has(e.id)), ne = new Set(j.map((e) => e.id)), re = new Set(h.map((e) => e.connectorId)), ie = R(I.CHANNEL_UPDATE), G = T.filter((e) => P && he.has(e.status) && (e.status === "ACTIVE" || ie) && !re.has(e.id) && !(e.credentialsRefId && ne.has(e.credentialsRefId))), K = [...G.map((e) => ({
710
708
  id: `${ge}${e.id}`,
711
709
  name: e.name,
712
710
  platform: e.type,
713
711
  description: e.description ?? void 0
714
- })), ...L], J = {}, Y = {};
715
- q.forEach((e) => {
712
+ })), ...ee], q = {}, J = {};
713
+ K.forEach((e) => {
716
714
  let t = e.platform, n = $(t);
717
- Y[t] = n, J[t] = n.icon;
715
+ J[t] = n, q[t] = n.icon;
718
716
  });
719
- let ie = B((e, t) => {
720
- D(e);
721
- }, []), X = E?.startsWith(ge) ? O.find((e) => `${ge}${e.id}` === E) : void 0, ae = P.length > 0 || K.length > 0;
722
- if (g && h.length === 0 || b && y.length === 0 || k && O.length === 0) return /* @__PURE__ */ G("div", {
717
+ let ae = B((e, t) => {
718
+ w(e);
719
+ }, []), Y = C?.startsWith(ge) ? T.find((e) => `${ge}${e.id}` === C) : void 0, X = j.length > 0 || G.length > 0;
720
+ if (d && u.length === 0 || g && h.length === 0 || E && T.length === 0) return /* @__PURE__ */ W("div", {
723
721
  className: "space-y-4",
724
722
  children: [
725
- /* @__PURE__ */ W("div", { className: "h-10 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg w-52" }),
726
- /* @__PURE__ */ W("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
727
- /* @__PURE__ */ W("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
723
+ /* @__PURE__ */ U("div", { className: "h-10 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg w-52" }),
724
+ /* @__PURE__ */ U("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }),
725
+ /* @__PURE__ */ U("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
728
726
  ]
729
727
  });
730
- let Z = y.length > 0;
731
- return /* @__PURE__ */ G("div", {
728
+ let Z = h.length > 0;
729
+ return /* @__PURE__ */ W("div", {
732
730
  className: "space-y-4",
733
731
  children: [
734
- /* @__PURE__ */ G("div", {
732
+ /* @__PURE__ */ W("div", {
735
733
  className: "flex items-start justify-between gap-3",
736
- children: [/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("h3", {
734
+ children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
737
735
  className: "font-semibold text-base",
738
- children: c("botlit.botChannels.channelConnections", "Channel Connections")
739
- }), /* @__PURE__ */ W("p", {
736
+ children: a("botlit.botChannels.channelConnections", "Channel Connections")
737
+ }), /* @__PURE__ */ U("p", {
740
738
  className: "text-sm text-text-secondary mt-0.5",
741
- children: c("botlit.botChannels.communicationPlatformsAvailableForThis", "Communication platforms available for this bot")
742
- })] }), Z && q.length > 0 && /* @__PURE__ */ W(o, {
743
- permission: a.CHANNEL_CREATE,
744
- children: /* @__PURE__ */ W(i, {
739
+ children: a("botlit.botChannels.communicationPlatformsAvailableForThis", "Communication platforms available for this bot")
740
+ })] }), Z && K.length > 0 && /* @__PURE__ */ U(L, {
741
+ permission: I.CHANNEL_CREATE,
742
+ children: /* @__PURE__ */ U(i, {
745
743
  variant: "outline",
746
744
  size: "sm",
747
- leftIcon: /* @__PURE__ */ W(oe, { size: 14 }),
748
- onClick: () => T(!0),
749
- children: c("botlit.botChannels.connectChannel", "Connect Channel")
745
+ leftIcon: /* @__PURE__ */ U(oe, { size: 14 }),
746
+ onClick: () => S(!0),
747
+ children: a("botlit.botChannels.connectChannel", "Connect Channel")
750
748
  })
751
749
  })]
752
750
  }),
753
- /* @__PURE__ */ W(Se, {
751
+ /* @__PURE__ */ U(Se, {
754
752
  channels: {
755
- error: _,
756
- retry: v
753
+ error: p,
754
+ retry: m
757
755
  },
758
756
  routes: {
759
- error: x,
760
- retry: S
757
+ error: _,
758
+ retry: b
761
759
  },
762
760
  connectors: {
763
- error: A,
764
- retry: j
761
+ error: D,
762
+ retry: O
765
763
  }
766
764
  }),
767
- I && !ae && !Z && /* @__PURE__ */ W(e, { children: /* @__PURE__ */ W(t, {
765
+ P && !X && !Z && /* @__PURE__ */ U(e, { children: /* @__PURE__ */ U(t, {
768
766
  className: "py-12",
769
- children: /* @__PURE__ */ W(l, {
767
+ children: /* @__PURE__ */ U(o, {
770
768
  illustration: "empty-notifications",
771
- title: c("botlit.botChannels.noChannelsAvailable", "No channels available"),
772
- description: c("botlit.botChannels.noChannelConnectorsExistIn", "No channel connectors exist in this workspace yet. Create one under Channels, then route it to this bot here.")
769
+ title: a("botlit.botChannels.noChannelsAvailable", "No channels available"),
770
+ description: a("botlit.botChannels.noChannelConnectorsExistIn", "No channel connectors exist in this workspace yet. Create one under Channels, then route it to this bot here.")
773
771
  })
774
772
  }) }),
775
- I && ae && !Z && !E && /* @__PURE__ */ W(e, { children: /* @__PURE__ */ W(t, {
773
+ P && X && !Z && !C && /* @__PURE__ */ U(e, { children: /* @__PURE__ */ U(t, {
776
774
  className: "py-12",
777
- children: /* @__PURE__ */ W(l, {
775
+ children: /* @__PURE__ */ U(o, {
778
776
  illustration: "empty-notifications",
779
- title: c("botlit.botChannels.noChannelsConnected", "No channels connected"),
780
- description: c("botlit.botChannels.connectAChannelSlackTeams", "Connect a channel — Slack, Teams, Discord, WhatsApp, a web widget or a webhook — to let people talk to this bot there."),
781
- action: /* @__PURE__ */ W(o, {
782
- permission: a.CHANNEL_CREATE,
783
- children: /* @__PURE__ */ W(i, {
784
- leftIcon: /* @__PURE__ */ W(oe, { size: 16 }),
785
- onClick: () => T(!0),
786
- children: c("botlit.botChannels.connectChannel", "Connect Channel")
777
+ title: a("botlit.botChannels.noChannelsConnected", "No channels connected"),
778
+ description: a("botlit.botChannels.connectAChannelSlackTeams", "Connect a channel — Slack, Teams, Discord, WhatsApp, a web widget or a webhook — to let people talk to this bot there."),
779
+ action: /* @__PURE__ */ U(L, {
780
+ permission: I.CHANNEL_CREATE,
781
+ children: /* @__PURE__ */ U(i, {
782
+ leftIcon: /* @__PURE__ */ U(oe, { size: 16 }),
783
+ onClick: () => S(!0),
784
+ children: a("botlit.botChannels.connectChannel", "Connect Channel")
787
785
  })
788
786
  })
789
787
  })
790
788
  }) }),
791
- (Z || E) && /* @__PURE__ */ G("div", {
789
+ (Z || C) && /* @__PURE__ */ W("div", {
792
790
  className: "space-y-4",
793
791
  children: [
794
- y.map((e) => /* @__PURE__ */ W(xe, {
792
+ h.map((e) => /* @__PURE__ */ U(xe, {
795
793
  route: e,
796
- oauthChannels: P,
794
+ oauthChannels: j,
797
795
  botId: n,
798
796
  botName: r,
799
- onRoutesChanged: N
797
+ onRoutesChanged: A
800
798
  }, e.id)),
801
- X && /* @__PURE__ */ W(be, {
802
- connector: X,
799
+ Y && /* @__PURE__ */ U(be, {
800
+ connector: Y,
803
801
  routes: [],
804
802
  botId: n,
805
803
  botName: r,
806
804
  onRoutesChanged: async () => {
807
- await N(), D(null);
805
+ await A(), w(null);
808
806
  }
809
- }, X.id),
810
- E && !X && /* @__PURE__ */ W(U, { children: P.filter((e) => e.id === E).map((e) => /* @__PURE__ */ W(ye, {
807
+ }, Y.id),
808
+ C && !Y && /* @__PURE__ */ U(H, { children: j.filter((e) => e.id === C).map((e) => /* @__PURE__ */ U(ye, {
811
809
  channel: e,
812
- routes: y.filter((e) => !1),
810
+ routes: h.filter((e) => !1),
813
811
  botId: n,
814
812
  botName: r,
815
813
  onRoutesChanged: async () => {
816
- await N(), D(null);
814
+ await A(), w(null);
817
815
  }
818
816
  }, e.id)) })
819
817
  ]
820
818
  }),
821
- /* @__PURE__ */ W(d, {
822
- open: w,
823
- onClose: () => T(!1),
824
- onSelectChannel: ie,
825
- availableChannels: q,
826
- platformIcons: J,
827
- platformMeta: Y
819
+ /* @__PURE__ */ U(c, {
820
+ open: x,
821
+ onClose: () => S(!1),
822
+ onSelectChannel: ae,
823
+ availableChannels: K,
824
+ platformIcons: q,
825
+ platformMeta: J
828
826
  })
829
827
  ]
830
828
  });