@burdenoff/microfe-integrations 2026.715.2 → 2026.724.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
  2. package/dist/integrations/components/AddConnectionDialog.js +331 -241
  3. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  4. package/dist/integrations/components/ProviderIcon.d.ts.map +1 -1
  5. package/dist/integrations/components/ProviderIcon.js +3 -0
  6. package/dist/integrations/components/ProviderIcon.js.map +1 -1
  7. package/dist/integrations/hooks/useConnections.d.ts +12 -0
  8. package/dist/integrations/hooks/useConnections.d.ts.map +1 -1
  9. package/dist/integrations/hooks/useConnections.js +22 -4
  10. package/dist/integrations/hooks/useConnections.js.map +1 -1
  11. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
  12. package/dist/integrations/pages/AddConnectionWizard.js +308 -220
  13. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  14. package/dist/integrations/types/index.d.ts +1 -1
  15. package/dist/integrations/types/index.d.ts.map +1 -1
  16. package/dist/integrations/utils/constants.d.ts.map +1 -1
  17. package/dist/integrations/utils/constants.js +7 -0
  18. package/dist/integrations/utils/constants.js.map +1 -1
  19. package/dist/integrations/utils/integrationsHelpers.d.ts +17 -0
  20. package/dist/integrations/utils/integrationsHelpers.d.ts.map +1 -1
  21. package/dist/integrations/utils/integrationsHelpers.js +10 -1
  22. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  23. package/dist/integrations/utils/mappers.js +1 -1
  24. package/dist/integrations/utils/mappers.js.map +1 -1
  25. package/package.json +1 -1
@@ -2,52 +2,52 @@ import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
4
4
  import { joinPath as r } from "../utils/navigation.js";
5
- import { getAuthTypeLabel as i, getCategoryLabel as ee } from "../utils/integrationsHelpers.js";
6
- import { useGetConnectionLazyQuery as te } from "../../generated/wspace-operations.js";
7
- import { useProvider as ne, useProviderByKey as re, useProviders as ie } from "../hooks/useProviders.js";
8
- import { useAuthenticateWithApiKey as ae, useAuthenticateWithBasicAuth as oe, useAuthenticateWithBearerToken as se, useAuthenticateWithServiceAccount as ce, useCreateConnection as le, useInitiateOAuth as ue } from "../hooks/useConnections.js";
9
- import { waitForOAuthPopupCompletion as de } from "../utils/oauthPopup.js";
10
- import { CredentialStorageSelector as fe } from "../components/CredentialStorageSelector.js";
11
- import { ProviderIcon as a } from "../components/ProviderIcon.js";
12
- import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
13
- import { AlertCircle as d, ArrowLeft as pe, ArrowRight as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Key as f, Link as ve, Loader2 as p, Lock as ye, Search as be, Shield as xe } from "lucide-react";
14
- import { useLocation as Se, useParams as Ce } from "react-router-dom";
15
- import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
17
- import { Button as g, GlassCard as _, IllustratedEmptyState as Te, PagePurpose as Ee } from "@burdenoff/fe-libs/ui";
5
+ import { getAuthTypeLabel as i, getCategoryLabel as ee, parseConfigSchema as te } from "../utils/integrationsHelpers.js";
6
+ import { useGetConnectionLazyQuery as ne } from "../../generated/wspace-operations.js";
7
+ import { useProvider as re, useProviderByKey as ie, useProviders as ae } from "../hooks/useProviders.js";
8
+ import { useAuthenticateWithApiKey as oe, useAuthenticateWithBasicAuth as se, useAuthenticateWithBearerToken as ce, useAuthenticateWithCustomConfig as le, useAuthenticateWithServiceAccount as ue, useCreateConnection as de, useInitiateOAuth as fe } from "../hooks/useConnections.js";
9
+ import { waitForOAuthPopupCompletion as pe } from "../utils/oauthPopup.js";
10
+ import { CredentialStorageSelector as me } from "../components/CredentialStorageSelector.js";
11
+ import { ProviderIcon as he } from "../components/ProviderIcon.js";
12
+ import { useCallback as a, useEffect as ge, useMemo as o, useRef as _e, useState as s } from "react";
13
+ import { AlertCircle as c, ArrowLeft as ve, ArrowRight as ye, Check as be, CheckCircle2 as xe, ExternalLink as Se, Key as Ce, Link as we, Loader2 as l, Lock as Te, Search as Ee, Shield as u } from "lucide-react";
14
+ import { useLocation as De, useParams as Oe } from "react-router-dom";
15
+ import { usePermissions as ke } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
17
+ import { Button as p, GlassCard as m, IllustratedEmptyState as Ae, PagePurpose as je } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/integrations/pages/AddConnectionWizard.tsx
19
- function v() {
20
- let { providerId: v } = Ce(), { basePath: y = "/", navigate: b, apiGatewayUrl: x } = e(), De = Se().search, S = c(() => new URLSearchParams(De), [De]), C = S.get("providerKey") ?? null, w = S.get("returnTo") ?? null, T = S.get("channelId") ?? null, E = !!(w && T), { provider: Oe, loading: ke } = re(C ?? ""), { providers: D, loading: O } = ie(), { hasPermission: Ae, isLoading: je } = we(), Me = Ae(n.CONNECTION_CREATE), { createConnection: Ne, loading: Pe } = le(), { initiateOAuth: Fe, loading: Ie } = ue(), { authenticateWithApiKey: Le, loading: Re } = ae(), { authenticateWithBasicAuth: ze, loading: Be } = oe(), { authenticateWithBearerToken: Ve, loading: He } = se(), { authenticateWithServiceAccount: k, loading: Ue } = ce(), [A] = te({ fetchPolicy: "network-only" }), [j, M] = u(v || C ? "configure" : "select_provider"), [N, P] = u(null), [F, We] = u(""), [I, L] = u(""), [R, Ge] = u(""), [z, Ke] = u(""), [B, qe] = u(""), [V, Je] = u(""), [H, Ye] = u(""), [U, Xe] = u({
19
+ function h() {
20
+ let { providerId: h } = Oe(), { basePath: g = "/", navigate: _, apiGatewayUrl: v } = e(), Me = De().search, y = o(() => new URLSearchParams(Me), [Me]), b = y.get("providerKey") ?? null, x = y.get("returnTo") ?? null, S = y.get("channelId") ?? null, C = !!(x && S), { provider: Ne, loading: Pe } = ie(b ?? ""), { providers: w, loading: T } = ae(), { hasPermission: Fe, isLoading: Ie } = ke(), Le = Fe(n.CONNECTION_CREATE), { createConnection: Re, loading: ze } = de(), { initiateOAuth: Be, loading: Ve } = fe(), { authenticateWithApiKey: E, loading: He } = oe(), { authenticateWithBasicAuth: D, loading: Ue } = se(), { authenticateWithBearerToken: O, loading: We } = ce(), { authenticateWithServiceAccount: k, loading: Ge } = ue(), { authenticateWithCustomConfig: A, loading: Ke } = le(), [qe] = ne({ fetchPolicy: "network-only" }), [j, M] = s(h || b ? "configure" : "select_provider"), [N, Je] = s(null), [P, Ye] = s(""), [F, I] = s(""), [L, Xe] = s(""), [R, Ze] = s(""), [z, Qe] = s(""), [B, $e] = s(""), [V, et] = s(""), [H, tt] = s({}), [U, nt] = s({
21
21
  mode: "managed",
22
22
  vaultId: "",
23
23
  secretId: "",
24
24
  managedSecretName: ""
25
- }), [W, G] = u(""), [K, Ze] = u(null), [Qe, $e] = u(!1), q = l(null), J = l(null);
26
- s(() => () => {
25
+ }), [W, G] = s(""), [K, rt] = s(null), [it, at] = s(!1), q = _e(null), J = _e(null);
26
+ ge(() => () => {
27
27
  J.current?.(), q.current && !q.current.closed && q.current.close();
28
28
  }, []);
29
- let Y = c(() => !v || !D ? null : D.find((e) => e.id === v) || null, [v, D]), { provider: et, loading: tt } = ne(v && !Y && !O ? v : ""), X = c(() => Oe ?? Y ?? et, [
30
- Oe,
29
+ let Y = o(() => !h || !w ? null : w.find((e) => e.id === h) || null, [h, w]), { provider: ot, loading: st } = re(h && !Y && !T ? h : ""), X = o(() => Ne ?? Y ?? ot, [
30
+ Ne,
31
31
  Y,
32
- et
32
+ ot
33
33
  ]);
34
- s(() => {
35
- X && !N && j === "configure" && (P(X), I || L(`${X.name} Connection`));
34
+ ge(() => {
35
+ X && !N && j === "configure" && (Je(X), F || I(`${X.name} Connection`));
36
36
  }, [
37
37
  X,
38
38
  N,
39
39
  j,
40
- I
40
+ F
41
41
  ]);
42
- let nt = c(() => {
43
- let e = (D ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
44
- if (!F) return e;
45
- let t = F.toLowerCase();
42
+ let ct = o(() => {
43
+ let e = (w ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
44
+ if (!P) return e;
45
+ let t = P.toLowerCase();
46
46
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
47
- }, [D, F]), rt = o((e) => {
48
- P(e), L(`${e.name} Connection`), M("configure");
49
- }, []), it = o(() => {
50
- if (!I.trim()) {
47
+ }, [w, P]), lt = a((e) => {
48
+ Je(e), I(`${e.name} Connection`), M("configure");
49
+ }, []), ut = a(() => {
50
+ if (!F.trim()) {
51
51
  G("Connection name is required");
52
52
  return;
53
53
  }
@@ -60,15 +60,15 @@ function v() {
60
60
  return;
61
61
  }
62
62
  G(""), M("authenticate");
63
- }, [I, U]), at = o(async () => {
63
+ }, [F, U]), dt = a(async () => {
64
64
  if (N) try {
65
65
  G("");
66
- let e = x ? `${x}/integrations/oauth/callback` : "/integrations/oauth/callback", t = E ? {
67
- returnTo: w,
68
- channelId: T
69
- } : void 0, n = K ?? await Ne({
70
- name: I.trim(),
71
- description: R.trim(),
66
+ let e = v ? `${v}/integrations/oauth/callback` : "/integrations/oauth/callback", t = C ? {
67
+ returnTo: x,
68
+ channelId: S
69
+ } : void 0, n = K ?? await Re({
70
+ name: F.trim(),
71
+ description: L.trim(),
72
72
  providerId: N.id,
73
73
  vaultId: U.vaultId,
74
74
  credentialSecretId: U.mode === "existing" ? U.secretId : void 0,
@@ -79,10 +79,10 @@ function v() {
79
79
  G("Failed to create connection"), M("error");
80
80
  return;
81
81
  }
82
- switch (Ze(n), N.authType) {
82
+ switch (rt(n), N.authType) {
83
83
  case "oauth2": {
84
- let t = await Fe(n, e, N.key);
85
- if (t?.redirectUrl) if (E) {
84
+ let t = await Be(n, e, N.key);
85
+ if (t?.redirectUrl) if (C) {
86
86
  window.location.href = t.redirectUrl;
87
87
  return;
88
88
  } else {
@@ -91,11 +91,11 @@ function v() {
91
91
  G("Popup was blocked. Please allow popups for this site and try again."), M("error");
92
92
  return;
93
93
  }
94
- q.current = i, $e(!0), J.current?.(), J.current = de({
94
+ q.current = i, at(!0), J.current?.(), J.current = pe({
95
95
  connectionId: n,
96
96
  popup: i,
97
97
  fetchConnectionStatus: async () => {
98
- let { data: e } = await A({ variables: { id: n } });
98
+ let { data: e } = await qe({ variables: { id: n } });
99
99
  return e?.getConnection ?? null;
100
100
  },
101
101
  onSuccess: () => {
@@ -105,7 +105,7 @@ function v() {
105
105
  G(e), M("error");
106
106
  },
107
107
  onSettled: () => {
108
- J.current = null, q.current = null, $e(!1);
108
+ J.current = null, q.current = null, at(!1);
109
109
  }
110
110
  });
111
111
  return;
@@ -114,29 +114,47 @@ function v() {
114
114
  break;
115
115
  }
116
116
  case "api_key":
117
- if (!z.trim()) {
117
+ if (!R.trim()) {
118
118
  G("API key is required");
119
119
  return;
120
120
  }
121
- await Le(n, z.trim()), M("success");
121
+ await E(n, R.trim()), M("success");
122
122
  break;
123
123
  case "basic_auth":
124
- if (!B.trim() || !V.trim()) {
124
+ if (!z.trim() || !B.trim()) {
125
125
  G("Username and password are required");
126
126
  return;
127
127
  }
128
- await ze(n, B.trim(), V.trim()), M("success");
128
+ await D(n, z.trim(), B.trim()), M("success");
129
129
  break;
130
130
  case "bearer_token":
131
- if (!H.trim()) {
131
+ if (!V.trim()) {
132
132
  G("Bearer token is required");
133
133
  return;
134
134
  }
135
- await Ve(n, H.trim()), M("success");
135
+ await O(n, V.trim()), M("success");
136
136
  break;
137
137
  case "service_account":
138
138
  await k(n, N.defaultScopes && N.defaultScopes.length > 0 ? N.defaultScopes : void 0), M("success");
139
139
  break;
140
+ case "custom": {
141
+ let e = te(N.configSchema);
142
+ if (!e) {
143
+ G("This provider does not declare a configuration form");
144
+ return;
145
+ }
146
+ for (let t of e.required) if (!H[t]?.trim()) {
147
+ G(`${e.properties[t]?.title ?? t} is required`);
148
+ return;
149
+ }
150
+ let t = {};
151
+ for (let n of Object.keys(e.properties)) {
152
+ let e = H[n]?.trim();
153
+ e && (t[n] = e);
154
+ }
155
+ await A(n, t), M("success");
156
+ break;
157
+ }
140
158
  default: M("success");
141
159
  }
142
160
  } catch (e) {
@@ -144,35 +162,37 @@ function v() {
144
162
  }
145
163
  }, [
146
164
  N,
147
- I,
165
+ F,
166
+ L,
148
167
  R,
149
168
  z,
150
169
  B,
151
170
  V,
152
171
  H,
153
- Ne,
154
- Fe,
155
- A,
156
- Le,
157
- ze,
158
- Ve,
159
- k,
172
+ Re,
173
+ Be,
174
+ qe,
160
175
  E,
161
- w,
162
- T,
176
+ D,
177
+ O,
178
+ k,
179
+ A,
180
+ C,
163
181
  x,
182
+ S,
183
+ v,
164
184
  K,
165
185
  U
166
- ]), ot = o(() => {
167
- if (!w || !K) return;
168
- let e = new URL(w, window.location.origin);
169
- e.searchParams.set("integrationConnectionId", K), T && e.searchParams.set("channelId", T), b?.(e.pathname + e.search);
186
+ ]), ft = a(() => {
187
+ if (!x || !K) return;
188
+ let e = new URL(x, window.location.origin);
189
+ e.searchParams.set("integrationConnectionId", K), S && e.searchParams.set("channelId", S), _?.(e.pathname + e.search);
170
190
  }, [
171
- w,
191
+ x,
172
192
  K,
173
- T,
174
- b
175
- ]), Z = Pe || Ie || Qe || Re || Be || He || Ue, st = C ? ke : O || tt, Q = [
193
+ S,
194
+ _
195
+ ]), Z = ze || Ve || it || He || Ue || We || Ge || Ke, pt = b ? Pe : T || st, Q = [
176
196
  {
177
197
  key: "select_provider",
178
198
  label: "Select Provider"
@@ -186,131 +206,131 @@ function v() {
186
206
  label: "Authenticate"
187
207
  }
188
208
  ], $ = Q.findIndex((e) => e.key === j);
189
- return je ? /* @__PURE__ */ m("div", {
209
+ return Ie ? /* @__PURE__ */ d("div", {
190
210
  className: "flex items-center justify-center py-20",
191
- children: /* @__PURE__ */ m(p, {
211
+ children: /* @__PURE__ */ d(l, {
192
212
  size: 48,
193
213
  className: "animate-spin text-primary"
194
214
  })
195
- }) : Me ? /* @__PURE__ */ h("div", {
215
+ }) : Le ? /* @__PURE__ */ f("div", {
196
216
  className: "space-y-6 p-6 max-w-3xl mx-auto",
197
217
  children: [
198
- /* @__PURE__ */ h("div", {
218
+ /* @__PURE__ */ f("div", {
199
219
  className: "flex items-center gap-4",
200
220
  children: [
201
- /* @__PURE__ */ m(g, {
221
+ /* @__PURE__ */ d(p, {
202
222
  variant: "ghost",
203
223
  size: "icon",
204
- onClick: () => b?.(r(y, "connections")),
224
+ onClick: () => _?.(r(g, "connections")),
205
225
  "aria-label": "Back",
206
- children: /* @__PURE__ */ m(pe, { size: 20 })
226
+ children: /* @__PURE__ */ d(ve, { size: 20 })
207
227
  }),
208
- /* @__PURE__ */ m("h1", {
228
+ /* @__PURE__ */ d("h1", {
209
229
  className: "text-2xl font-bold text-text-primary",
210
230
  children: "Add Connection"
211
231
  }),
212
- E && /* @__PURE__ */ m("span", {
232
+ C && /* @__PURE__ */ d("span", {
213
233
  className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-action-primary-bg/10 text-primary",
214
234
  children: "Bot Channel Setup"
215
235
  })
216
236
  ]
217
237
  }),
218
- j !== "success" && j !== "error" && /* @__PURE__ */ m(Ee, {
219
- icon: /* @__PURE__ */ m(ve, { size: 16 }),
220
- children: E ? "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel." : "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again."
238
+ j !== "success" && j !== "error" && /* @__PURE__ */ d(je, {
239
+ icon: /* @__PURE__ */ d(we, { size: 16 }),
240
+ children: C ? "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel." : "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again."
221
241
  }),
222
- j !== "success" && j !== "error" && /* @__PURE__ */ m("div", {
242
+ j !== "success" && j !== "error" && /* @__PURE__ */ d("div", {
223
243
  className: "flex items-center gap-2",
224
- children: Q.map((e, n) => /* @__PURE__ */ h("div", {
244
+ children: Q.map((e, n) => /* @__PURE__ */ f("div", {
225
245
  className: "flex items-center gap-2",
226
246
  children: [
227
- /* @__PURE__ */ m("div", {
247
+ /* @__PURE__ */ d("div", {
228
248
  className: t("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-action-primary-bg text-action-primary-text" : n === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
229
- children: n < $ ? /* @__PURE__ */ m(he, { size: 16 }) : n + 1
249
+ children: n < $ ? /* @__PURE__ */ d(be, { size: 16 }) : n + 1
230
250
  }),
231
- /* @__PURE__ */ m("span", {
251
+ /* @__PURE__ */ d("span", {
232
252
  className: t("text-sm font-medium hidden sm:inline", n === $ ? "text-text-primary" : "text-text-secondary"),
233
253
  children: e.label
234
254
  }),
235
- n < Q.length - 1 && /* @__PURE__ */ m("div", { className: "w-8 h-px bg-border" })
255
+ n < Q.length - 1 && /* @__PURE__ */ d("div", { className: "w-8 h-px bg-border" })
236
256
  ]
237
257
  }, e.key))
238
258
  }),
239
- W && j !== "error" && /* @__PURE__ */ h("div", {
259
+ W && j !== "error" && /* @__PURE__ */ f("div", {
240
260
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
241
- children: [/* @__PURE__ */ m(d, {
261
+ children: [/* @__PURE__ */ d(c, {
242
262
  size: 20,
243
263
  className: "text-status-error-text flex-shrink-0"
244
- }), /* @__PURE__ */ m("p", {
264
+ }), /* @__PURE__ */ d("p", {
245
265
  className: "text-sm text-status-error-text",
246
266
  children: W
247
267
  })]
248
268
  }),
249
- j === "configure" && st && !N && /* @__PURE__ */ m("div", {
269
+ j === "configure" && pt && !N && /* @__PURE__ */ d("div", {
250
270
  className: "flex items-center justify-center py-12",
251
- children: /* @__PURE__ */ m(p, {
271
+ children: /* @__PURE__ */ d(l, {
252
272
  size: 24,
253
273
  className: "animate-spin text-text-secondary"
254
274
  })
255
275
  }),
256
- j === "configure" && !st && !N && (v || C) && /* @__PURE__ */ h("div", {
276
+ j === "configure" && !pt && !N && (h || b) && /* @__PURE__ */ f("div", {
257
277
  className: "flex flex-col items-center justify-center py-12 text-center",
258
- children: [/* @__PURE__ */ m(d, {
278
+ children: [/* @__PURE__ */ d(c, {
259
279
  size: 32,
260
280
  className: "text-text-secondary mb-3"
261
- }), /* @__PURE__ */ m("p", {
281
+ }), /* @__PURE__ */ d("p", {
262
282
  className: "text-sm text-text-secondary",
263
283
  children: "This provider isn't available."
264
284
  })]
265
285
  }),
266
- j === "select_provider" && /* @__PURE__ */ h("div", {
286
+ j === "select_provider" && /* @__PURE__ */ f("div", {
267
287
  className: "space-y-4",
268
288
  children: [
269
- /* @__PURE__ */ h("div", {
289
+ /* @__PURE__ */ f("div", {
270
290
  className: "relative group",
271
- children: [/* @__PURE__ */ m(be, {
291
+ children: [/* @__PURE__ */ d(Ee, {
272
292
  size: 18,
273
293
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
274
- }), /* @__PURE__ */ m("input", {
294
+ }), /* @__PURE__ */ d("input", {
275
295
  type: "text",
276
296
  placeholder: "Search installed providers...",
277
297
  "aria-label": "Search installed providers",
278
- value: F,
279
- onChange: (e) => We(e.target.value),
298
+ value: P,
299
+ onChange: (e) => Ye(e.target.value),
280
300
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
281
301
  })]
282
302
  }),
283
- O && /* @__PURE__ */ m("div", {
303
+ T && /* @__PURE__ */ d("div", {
284
304
  className: "flex items-center justify-center py-12",
285
- children: /* @__PURE__ */ m(p, {
305
+ children: /* @__PURE__ */ d(l, {
286
306
  size: 24,
287
307
  className: "animate-spin text-text-secondary"
288
308
  })
289
309
  }),
290
- !O && nt.length === 0 && /* @__PURE__ */ m(Te, {
291
- illustration: F ? "empty-search" : "empty-data",
292
- title: F ? "No matching providers" : "No installed providers yet",
293
- description: F ? "No installed provider matches your search. Try a different term or install one from the catalog." : "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started.",
294
- action: /* @__PURE__ */ m(g, {
295
- onClick: () => b?.(r(y, "providers")),
310
+ !T && ct.length === 0 && /* @__PURE__ */ d(Ae, {
311
+ illustration: P ? "empty-search" : "empty-data",
312
+ title: P ? "No matching providers" : "No installed providers yet",
313
+ description: P ? "No installed provider matches your search. Try a different term or install one from the catalog." : "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started.",
314
+ action: /* @__PURE__ */ d(p, {
315
+ onClick: () => _?.(r(g, "providers")),
296
316
  children: "Browse Catalog"
297
317
  })
298
318
  }),
299
- /* @__PURE__ */ m("div", {
319
+ /* @__PURE__ */ d("div", {
300
320
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
301
- children: nt.map((e) => /* @__PURE__ */ h("button", {
321
+ children: ct.map((e) => /* @__PURE__ */ f("button", {
302
322
  type: "button",
303
- onClick: () => rt(e),
323
+ onClick: () => lt(e),
304
324
  className: t("flex items-start gap-3 p-4 rounded-xl border border-border-seam bg-bg-surface text-left", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "transition-[box-shadow,border-color] duration-200"),
305
- children: [/* @__PURE__ */ m(a, {
325
+ children: [/* @__PURE__ */ d(he, {
306
326
  provider: e,
307
327
  size: 40
308
- }), /* @__PURE__ */ h("div", {
328
+ }), /* @__PURE__ */ f("div", {
309
329
  className: "flex-1 min-w-0",
310
- children: [/* @__PURE__ */ m("h3", {
330
+ children: [/* @__PURE__ */ d("h3", {
311
331
  className: "font-medium text-text-primary truncate",
312
332
  children: e.name
313
- }), /* @__PURE__ */ h("p", {
333
+ }), /* @__PURE__ */ f("p", {
314
334
  className: "text-xs text-text-secondary mt-0.5",
315
335
  children: [
316
336
  ee(e.category),
@@ -323,85 +343,85 @@ function v() {
323
343
  })
324
344
  ]
325
345
  }),
326
- j === "configure" && N && /* @__PURE__ */ h("div", {
346
+ j === "configure" && N && /* @__PURE__ */ f("div", {
327
347
  className: "space-y-6",
328
348
  children: [
329
- /* @__PURE__ */ h(_, {
349
+ /* @__PURE__ */ f(m, {
330
350
  className: "flex items-center gap-3 p-4 border-border-seam",
331
- children: [/* @__PURE__ */ m(a, {
351
+ children: [/* @__PURE__ */ d(he, {
332
352
  provider: N,
333
353
  size: 40
334
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
354
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
335
355
  className: "font-medium text-text-primary",
336
356
  children: N.name
337
- }), /* @__PURE__ */ m("p", {
357
+ }), /* @__PURE__ */ d("p", {
338
358
  className: "text-xs text-text-secondary",
339
359
  children: i(N.authType)
340
360
  })] })]
341
361
  }),
342
- /* @__PURE__ */ h("div", {
362
+ /* @__PURE__ */ f("div", {
343
363
  className: "space-y-4",
344
364
  children: [
345
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
365
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
346
366
  htmlFor: "conn-name",
347
367
  className: "block text-sm font-semibold mb-2",
348
- children: ["Connection Name ", /* @__PURE__ */ m("span", {
368
+ children: ["Connection Name ", /* @__PURE__ */ d("span", {
349
369
  className: "text-status-error-text",
350
370
  children: "*"
351
371
  })]
352
- }), /* @__PURE__ */ m("input", {
372
+ }), /* @__PURE__ */ d("input", {
353
373
  type: "text",
354
374
  id: "conn-name",
355
375
  "aria-label": "Connection Name",
356
- value: I,
357
- onChange: (e) => L(e.target.value),
376
+ value: F,
377
+ onChange: (e) => I(e.target.value),
358
378
  placeholder: "e.g., My Slack Workspace",
359
379
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
360
380
  })] }),
361
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
381
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
362
382
  htmlFor: "conn-desc",
363
383
  className: "block text-sm font-semibold mb-2",
364
384
  children: "Description"
365
- }), /* @__PURE__ */ m("textarea", {
385
+ }), /* @__PURE__ */ d("textarea", {
366
386
  id: "conn-desc",
367
387
  "aria-label": "Description",
368
- value: R,
369
- onChange: (e) => Ge(e.target.value),
388
+ value: L,
389
+ onChange: (e) => Xe(e.target.value),
370
390
  rows: 3,
371
391
  placeholder: "Optional description...",
372
392
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
373
393
  })] }),
374
- /* @__PURE__ */ m(fe, {
394
+ /* @__PURE__ */ d(me, {
375
395
  value: U,
376
- onChange: Xe,
396
+ onChange: nt,
377
397
  providerAuthType: N.authType
378
398
  })
379
399
  ]
380
400
  }),
381
- /* @__PURE__ */ h("div", {
401
+ /* @__PURE__ */ f("div", {
382
402
  className: "flex gap-3",
383
- children: [/* @__PURE__ */ m(g, {
403
+ children: [/* @__PURE__ */ d(p, {
384
404
  variant: "outline",
385
- onClick: () => v || C ? b?.(r(y, "connections")) : M("select_provider"),
405
+ onClick: () => h || b ? _?.(r(g, "connections")) : M("select_provider"),
386
406
  children: "Back"
387
- }), /* @__PURE__ */ h(g, {
388
- onClick: it,
389
- children: ["Next ", /* @__PURE__ */ m(me, { size: 16 })]
407
+ }), /* @__PURE__ */ f(p, {
408
+ onClick: ut,
409
+ children: ["Next ", /* @__PURE__ */ d(ye, { size: 16 })]
390
410
  })]
391
411
  })
392
412
  ]
393
413
  }),
394
- j === "authenticate" && N && /* @__PURE__ */ h("div", {
414
+ j === "authenticate" && N && /* @__PURE__ */ f("div", {
395
415
  className: "space-y-6",
396
- children: [/* @__PURE__ */ h(_, {
416
+ children: [/* @__PURE__ */ f(m, {
397
417
  treatment: "glass",
398
418
  glow: !0,
399
419
  className: "border-border-seam p-5",
400
420
  children: [
401
- /* @__PURE__ */ h("h2", {
421
+ /* @__PURE__ */ f("h2", {
402
422
  className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
403
423
  children: [
404
- /* @__PURE__ */ m(xe, {
424
+ /* @__PURE__ */ d(u, {
405
425
  size: 18,
406
426
  className: "text-primary"
407
427
  }),
@@ -409,56 +429,56 @@ function v() {
409
429
  i(N.authType)
410
430
  ]
411
431
  }),
412
- N.authType === "oauth2" && /* @__PURE__ */ h("div", {
432
+ N.authType === "oauth2" && /* @__PURE__ */ f("div", {
413
433
  className: "space-y-4",
414
- children: [/* @__PURE__ */ h("p", {
434
+ children: [/* @__PURE__ */ f("p", {
415
435
  className: "text-sm text-text-secondary",
416
436
  children: [
417
437
  "You will be redirected to ",
418
438
  N.name,
419
439
  " to authorize access. After granting permission, you'll be redirected back."
420
440
  ]
421
- }), /* @__PURE__ */ h("div", {
441
+ }), /* @__PURE__ */ f("div", {
422
442
  className: "p-3 rounded-lg bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
423
- children: [/* @__PURE__ */ m(_e, { size: 16 }), E ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
443
+ children: [/* @__PURE__ */ d(Se, { size: 16 }), C ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
424
444
  })]
425
445
  }),
426
- N.authType === "api_key" && /* @__PURE__ */ h("div", {
446
+ N.authType === "api_key" && /* @__PURE__ */ f("div", {
427
447
  className: "space-y-4",
428
- children: [/* @__PURE__ */ h("p", {
448
+ children: [/* @__PURE__ */ f("p", {
429
449
  className: "text-sm text-text-secondary",
430
450
  children: [
431
451
  "Enter your ",
432
452
  N.name,
433
453
  " API key. You can typically find this in your account settings."
434
454
  ]
435
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
455
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
436
456
  htmlFor: "api-key",
437
457
  className: "block text-sm font-semibold mb-2",
438
- children: ["API Key ", /* @__PURE__ */ m("span", {
458
+ children: ["API Key ", /* @__PURE__ */ d("span", {
439
459
  className: "text-status-error-text",
440
460
  children: "*"
441
461
  })]
442
- }), /* @__PURE__ */ h("div", {
462
+ }), /* @__PURE__ */ f("div", {
443
463
  className: "relative",
444
- children: [/* @__PURE__ */ m(f, {
464
+ children: [/* @__PURE__ */ d(Ce, {
445
465
  size: 16,
446
466
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
447
- }), /* @__PURE__ */ m("input", {
467
+ }), /* @__PURE__ */ d("input", {
448
468
  type: "password",
449
469
  id: "api-key",
450
470
  "aria-label": "API Key",
451
- value: z,
452
- onChange: (e) => Ke(e.target.value),
471
+ value: R,
472
+ onChange: (e) => Ze(e.target.value),
453
473
  placeholder: "Enter your API key",
454
474
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
455
475
  })]
456
476
  })] })]
457
477
  }),
458
- N.authType === "basic_auth" && /* @__PURE__ */ h("div", {
478
+ N.authType === "basic_auth" && /* @__PURE__ */ f("div", {
459
479
  className: "space-y-4",
460
480
  children: [
461
- /* @__PURE__ */ h("p", {
481
+ /* @__PURE__ */ f("p", {
462
482
  className: "text-sm text-text-secondary",
463
483
  children: [
464
484
  "Enter your ",
@@ -466,88 +486,88 @@ function v() {
466
486
  " credentials."
467
487
  ]
468
488
  }),
469
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
489
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
470
490
  htmlFor: "username",
471
491
  className: "block text-sm font-semibold mb-2",
472
- children: ["Username ", /* @__PURE__ */ m("span", {
492
+ children: ["Username ", /* @__PURE__ */ d("span", {
473
493
  className: "text-status-error-text",
474
494
  children: "*"
475
495
  })]
476
- }), /* @__PURE__ */ m("input", {
496
+ }), /* @__PURE__ */ d("input", {
477
497
  type: "text",
478
498
  id: "username",
479
499
  "aria-label": "Username",
480
- value: B,
481
- onChange: (e) => qe(e.target.value),
500
+ value: z,
501
+ onChange: (e) => Qe(e.target.value),
482
502
  placeholder: "Username or email",
483
503
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
484
504
  })] }),
485
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
505
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
486
506
  htmlFor: "password",
487
507
  className: "block text-sm font-semibold mb-2",
488
- children: ["Password ", /* @__PURE__ */ m("span", {
508
+ children: ["Password ", /* @__PURE__ */ d("span", {
489
509
  className: "text-status-error-text",
490
510
  children: "*"
491
511
  })]
492
- }), /* @__PURE__ */ h("div", {
512
+ }), /* @__PURE__ */ f("div", {
493
513
  className: "relative",
494
- children: [/* @__PURE__ */ m(ye, {
514
+ children: [/* @__PURE__ */ d(Te, {
495
515
  size: 16,
496
516
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
497
- }), /* @__PURE__ */ m("input", {
517
+ }), /* @__PURE__ */ d("input", {
498
518
  type: "password",
499
519
  id: "password",
500
520
  "aria-label": "Password",
501
- value: V,
502
- onChange: (e) => Je(e.target.value),
521
+ value: B,
522
+ onChange: (e) => $e(e.target.value),
503
523
  placeholder: "Password",
504
524
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
505
525
  })]
506
526
  })] })
507
527
  ]
508
528
  }),
509
- N.authType === "bearer_token" && /* @__PURE__ */ h("div", {
529
+ N.authType === "bearer_token" && /* @__PURE__ */ f("div", {
510
530
  className: "space-y-4",
511
- children: [/* @__PURE__ */ h("p", {
531
+ children: [/* @__PURE__ */ f("p", {
512
532
  className: "text-sm text-text-secondary",
513
533
  children: [
514
534
  "Enter your ",
515
535
  N.name,
516
536
  " bearer token."
517
537
  ]
518
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
538
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
519
539
  htmlFor: "bearer-token",
520
540
  className: "block text-sm font-semibold mb-2",
521
- children: ["Bearer Token ", /* @__PURE__ */ m("span", {
541
+ children: ["Bearer Token ", /* @__PURE__ */ d("span", {
522
542
  className: "text-status-error-text",
523
543
  children: "*"
524
544
  })]
525
- }), /* @__PURE__ */ h("div", {
545
+ }), /* @__PURE__ */ f("div", {
526
546
  className: "relative",
527
- children: [/* @__PURE__ */ m(f, {
547
+ children: [/* @__PURE__ */ d(Ce, {
528
548
  size: 16,
529
549
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
530
- }), /* @__PURE__ */ m("input", {
550
+ }), /* @__PURE__ */ d("input", {
531
551
  type: "password",
532
552
  id: "bearer-token",
533
553
  "aria-label": "Bearer Token",
534
- value: H,
535
- onChange: (e) => Ye(e.target.value),
554
+ value: V,
555
+ onChange: (e) => et(e.target.value),
536
556
  placeholder: "Enter your token",
537
557
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
538
558
  })]
539
559
  })] })]
540
560
  }),
541
- N.authType === "service_account" && /* @__PURE__ */ m("div", {
561
+ N.authType === "service_account" && /* @__PURE__ */ d("div", {
542
562
  className: "space-y-4",
543
- children: /* @__PURE__ */ h("div", {
563
+ children: /* @__PURE__ */ f("div", {
544
564
  className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
545
565
  children: [
546
- /* @__PURE__ */ m("p", {
566
+ /* @__PURE__ */ d("p", {
547
567
  className: "text-sm font-semibold text-foreground",
548
568
  children: "No credentials needed"
549
569
  }),
550
- /* @__PURE__ */ h("p", {
570
+ /* @__PURE__ */ f("p", {
551
571
  className: "text-sm text-muted-foreground mt-1",
552
572
  children: [
553
573
  N.name,
@@ -557,46 +577,114 @@ function v() {
557
577
  " permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage."
558
578
  ]
559
579
  }),
560
- N.defaultScopes && N.defaultScopes.length > 0 && /* @__PURE__ */ h("p", {
580
+ N.defaultScopes && N.defaultScopes.length > 0 && /* @__PURE__ */ f("p", {
561
581
  className: "text-sm text-muted-foreground mt-2",
562
582
  children: ["Scopes: ", N.defaultScopes.join(", ")]
563
583
  })
564
584
  ]
565
585
  })
566
- })
586
+ }),
587
+ N.authType === "custom" && (() => {
588
+ let e = te(N.configSchema);
589
+ if (!e) return /* @__PURE__ */ f("div", {
590
+ className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-status-error-bg-subtle border border-border-default",
591
+ children: [/* @__PURE__ */ d(c, {
592
+ size: 16,
593
+ className: "text-status-error-text flex-shrink-0"
594
+ }), /* @__PURE__ */ d("span", {
595
+ className: "text-sm text-status-error-text",
596
+ children: "This provider does not declare a configuration form."
597
+ })]
598
+ });
599
+ let t = new Set(e.required);
600
+ return /* @__PURE__ */ f("div", {
601
+ className: "space-y-4",
602
+ children: [/* @__PURE__ */ f("p", {
603
+ className: "text-sm text-text-secondary",
604
+ children: [
605
+ "Enter your ",
606
+ N.name,
607
+ " configuration. Secret fields are stored encrypted and never shown again."
608
+ ]
609
+ }), Object.entries(e.properties).map(([e, n]) => /* @__PURE__ */ f("div", { children: [
610
+ /* @__PURE__ */ f("label", {
611
+ htmlFor: `custom-${e}`,
612
+ className: "block text-sm font-semibold mb-2",
613
+ children: [
614
+ n?.title ?? e,
615
+ " ",
616
+ t.has(e) && /* @__PURE__ */ d("span", {
617
+ className: "text-status-error-text",
618
+ children: "*"
619
+ })
620
+ ]
621
+ }),
622
+ n?.secret ? /* @__PURE__ */ d("textarea", {
623
+ id: `custom-${e}`,
624
+ "aria-label": n?.title ?? e,
625
+ value: H[e] ?? "",
626
+ onChange: (t) => tt((n) => ({
627
+ ...n,
628
+ [e]: t.target.value
629
+ })),
630
+ placeholder: n?.description,
631
+ rows: 4,
632
+ autoComplete: "off",
633
+ spellCheck: !1,
634
+ className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
635
+ }) : /* @__PURE__ */ d("input", {
636
+ id: `custom-${e}`,
637
+ "aria-label": n?.title ?? e,
638
+ type: "text",
639
+ value: H[e] ?? "",
640
+ onChange: (t) => tt((n) => ({
641
+ ...n,
642
+ [e]: t.target.value
643
+ })),
644
+ placeholder: n?.description,
645
+ autoComplete: "off",
646
+ className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
647
+ }),
648
+ n?.description && /* @__PURE__ */ d("p", {
649
+ className: "mt-1 text-xs text-text-secondary",
650
+ children: n.description
651
+ })
652
+ ] }, e))]
653
+ });
654
+ })()
567
655
  ]
568
- }), /* @__PURE__ */ h("div", {
656
+ }), /* @__PURE__ */ f("div", {
569
657
  className: "flex gap-3",
570
- children: [/* @__PURE__ */ m(g, {
658
+ children: [/* @__PURE__ */ d(p, {
571
659
  variant: "outline",
572
660
  onClick: () => M("configure"),
573
661
  disabled: Z,
574
662
  children: "Back"
575
- }), /* @__PURE__ */ h(g, {
576
- onClick: at,
663
+ }), /* @__PURE__ */ f(p, {
664
+ onClick: dt,
577
665
  disabled: Z,
578
- children: [Z ? /* @__PURE__ */ m(p, {
666
+ children: [Z ? /* @__PURE__ */ d(l, {
579
667
  size: 16,
580
668
  className: "animate-spin"
581
- }) : /* @__PURE__ */ m(he, { size: 16 }), N.authType === "oauth2" ? "Authorize" : "Connect"]
669
+ }) : /* @__PURE__ */ d(be, { size: 16 }), N.authType === "oauth2" ? "Authorize" : "Connect"]
582
670
  })]
583
671
  })]
584
672
  }),
585
- j === "success" && /* @__PURE__ */ h("div", {
673
+ j === "success" && /* @__PURE__ */ f("div", {
586
674
  className: "flex flex-col items-center justify-center py-12 text-center",
587
675
  children: [
588
- /* @__PURE__ */ m("div", {
676
+ /* @__PURE__ */ d("div", {
589
677
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
590
- children: /* @__PURE__ */ m(ge, {
678
+ children: /* @__PURE__ */ d(xe, {
591
679
  size: 48,
592
680
  className: "text-status-success-text"
593
681
  })
594
682
  }),
595
- /* @__PURE__ */ m("h2", {
683
+ /* @__PURE__ */ d("h2", {
596
684
  className: "text-xl font-bold text-text-primary mb-2",
597
685
  children: "Connection Created!"
598
686
  }),
599
- /* @__PURE__ */ h("p", {
687
+ /* @__PURE__ */ f("p", {
600
688
  className: "text-sm text-text-secondary mb-6 max-w-sm",
601
689
  children: [
602
690
  "Your ",
@@ -604,84 +692,84 @@ function v() {
604
692
  " connection has been set up successfully."
605
693
  ]
606
694
  }),
607
- /* @__PURE__ */ h("div", {
695
+ /* @__PURE__ */ f("div", {
608
696
  className: "flex gap-3",
609
697
  children: [
610
- E && K && /* @__PURE__ */ h(g, {
611
- onClick: ot,
612
- children: [/* @__PURE__ */ m(ve, { size: 16 }), "Link to Bot Channel"]
698
+ C && K && /* @__PURE__ */ f(p, {
699
+ onClick: ft,
700
+ children: [/* @__PURE__ */ d(we, { size: 16 }), "Link to Bot Channel"]
613
701
  }),
614
- !E && K && /* @__PURE__ */ m(g, {
615
- onClick: () => b?.(r(y, `connections/${K}`)),
702
+ !C && K && /* @__PURE__ */ d(p, {
703
+ onClick: () => _?.(r(g, `connections/${K}`)),
616
704
  children: "View Connection"
617
705
  }),
618
- /* @__PURE__ */ m(g, {
706
+ /* @__PURE__ */ d(p, {
619
707
  variant: "outline",
620
- onClick: () => b?.(r(y, "connections")),
708
+ onClick: () => _?.(r(g, "connections")),
621
709
  children: "All Connections"
622
710
  })
623
711
  ]
624
712
  })
625
713
  ]
626
714
  }),
627
- j === "error" && /* @__PURE__ */ h("div", {
715
+ j === "error" && /* @__PURE__ */ f("div", {
628
716
  className: "flex flex-col items-center justify-center py-12 text-center",
629
717
  children: [
630
- /* @__PURE__ */ m("div", {
718
+ /* @__PURE__ */ d("div", {
631
719
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
632
- children: /* @__PURE__ */ m(d, {
720
+ children: /* @__PURE__ */ d(c, {
633
721
  size: 48,
634
722
  className: "text-status-error-text"
635
723
  })
636
724
  }),
637
- /* @__PURE__ */ m("h2", {
725
+ /* @__PURE__ */ d("h2", {
638
726
  className: "text-xl font-bold text-text-primary mb-2",
639
727
  children: "Connection Failed"
640
728
  }),
641
- /* @__PURE__ */ m("p", {
729
+ /* @__PURE__ */ d("p", {
642
730
  className: "text-sm text-status-error-text mb-6 max-w-sm",
643
731
  children: W || "An unexpected error occurred."
644
732
  }),
645
- /* @__PURE__ */ h("div", {
733
+ /* @__PURE__ */ f("div", {
646
734
  className: "flex gap-3",
647
- children: [/* @__PURE__ */ m(g, {
735
+ children: [/* @__PURE__ */ d(p, {
648
736
  onClick: () => {
649
737
  G(""), M("authenticate");
650
738
  },
651
739
  children: "Try Again"
652
- }), /* @__PURE__ */ m(g, {
740
+ }), /* @__PURE__ */ d(p, {
653
741
  variant: "outline",
654
- onClick: () => b?.(r(y, "connections")),
742
+ onClick: () => _?.(r(g, "connections")),
655
743
  children: "Cancel"
656
744
  })]
657
745
  })
658
746
  ]
659
747
  })
660
748
  ]
661
- }) : /* @__PURE__ */ h("div", {
749
+ }) : /* @__PURE__ */ f("div", {
662
750
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
663
751
  children: [
664
- /* @__PURE__ */ m(xe, {
752
+ /* @__PURE__ */ d(u, {
665
753
  size: 48,
666
754
  className: "text-text-secondary mb-4"
667
755
  }),
668
- /* @__PURE__ */ m("h2", {
756
+ /* @__PURE__ */ d("h2", {
669
757
  className: "text-xl font-bold text-text-primary mb-2",
670
758
  children: "Access Denied"
671
759
  }),
672
- /* @__PURE__ */ m("p", {
760
+ /* @__PURE__ */ d("p", {
673
761
  className: "text-sm text-text-secondary mb-6 max-w-sm",
674
762
  children: "You don't have permission to create connections."
675
763
  }),
676
- /* @__PURE__ */ h(g, {
764
+ /* @__PURE__ */ f(p, {
677
765
  variant: "outline",
678
- onClick: () => b?.(r(y, "connections")),
679
- children: [/* @__PURE__ */ m(pe, { size: 16 }), " Back to Connections"]
766
+ onClick: () => _?.(r(g, "connections")),
767
+ children: [/* @__PURE__ */ d(ve, { size: 16 }), " Back to Connections"]
680
768
  })
681
769
  ]
682
770
  });
683
771
  }
684
772
  //#endregion
685
- export { v as AddConnectionWizard };
773
+ export { h as AddConnectionWizard };
686
774
 
687
775
  //# sourceMappingURL=AddConnectionWizard.js.map