@burdenoff/microfe-integrations 2026.1113.3 → 2026.1113.4

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.
@@ -1,83 +1,84 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
- import { useTr as ee } from "../hooks/useTr.js";
3
- import { useAuthTypeLabel as te } from "../hooks/useLabel.js";
4
- import { useFormatLastUsed as ne } from "../hooks/useFormatLastUsed.js";
5
- import { useFormatDate as re } from "../hooks/useFormatDate.js";
6
- import { useIntegrations as ie } from "../providers/IntegrationsProvider.js";
7
- import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
8
- import { INTEGRATION_FEATURE_FLAGS as ae } from "../constants/featureFlags.js";
9
- import { joinPath as n } from "../utils/navigation.js";
10
- import { useConnection as oe, useDeleteConnection as se, useRefreshToken as ce, useRevokeConnection as le, useTestConnection as ue } from "../hooks/useConnections.js";
11
- import { ConnectionStatusBadge as de } from "../components/ConnectionStatusBadge.js";
12
- import { ConnectionShareDialog as fe, PrivateConnectionBadge as pe } from "../components/ConnectionSharing.js";
2
+ import { useTr as t } from "../hooks/useTr.js";
3
+ import { useAuthTypeLabel as ee } from "../hooks/useLabel.js";
4
+ import { useFormatLastUsed as te } from "../hooks/useFormatLastUsed.js";
5
+ import { useFormatDate as ne } from "../hooks/useFormatDate.js";
6
+ import { useIntegrations as re } from "../providers/IntegrationsProvider.js";
7
+ import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
8
+ import { INTEGRATION_FEATURE_FLAGS as ie } from "../constants/featureFlags.js";
9
+ import { joinPath as r } from "../utils/navigation.js";
10
+ import { useConnection as ae, useDeleteConnection as oe, useRefreshToken as se, useRevokeConnection as ce, useTestConnection as le } from "../hooks/useConnections.js";
11
+ import { ConnectionStatusBadge as ue } from "../components/ConnectionStatusBadge.js";
12
+ import { ConnectionShareDialog as de, PrivateConnectionBadge as fe } from "../components/ConnectionSharing.js";
13
+ import { SelfHostedReleaseSetting as pe } from "../components/SelfHostedReleaseSetting.js";
13
14
  import { ConfirmDialog as me } from "../components/ConfirmDialog.js";
14
- import { nativeConfirm as he, nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
15
- import { useVaultName as ge } from "../hooks/useVaultName.js";
16
- import { AddConnectionDialog as _e } from "../components/AddConnectionDialog.js";
17
- import { RecentActivity as ve } from "../components/RecentActivity.js";
18
- import { canReconnect as ye, isRefreshed as be } from "../utils/connectedApps.js";
15
+ import { nativeConfirm as he, nativeImpact as ge, nativeNotify as i } from "../../utils/nativeBridge.js";
16
+ import { useVaultName as _e } from "../hooks/useVaultName.js";
17
+ import { AddConnectionDialog as ve } from "../components/AddConnectionDialog.js";
18
+ import { RecentActivity as ye } from "../components/RecentActivity.js";
19
+ import { canReconnect as be, isRefreshed as xe } from "../utils/connectedApps.js";
19
20
  import { useState as a } from "react";
20
- import { Activity as o, AlertCircle as s, ArrowLeft as c, CheckCircle2 as l, Clock as xe, Key as u, Loader2 as d, Mail as Se, RefreshCw as Ce, RotateCcw as f, Share2 as we, Shield as p, Trash2 as m, User as Te, XCircle as h, Zap as g } from "lucide-react";
21
- import { useParams as Ee } from "react-router";
22
- import { usePermissions as De } from "@burdenoff/fe-libs/shared/providers/shell";
23
- import { Fragment as Oe, jsx as _, jsxs as v } from "react/jsx-runtime";
24
- import { useFeatureFlag as ke } from "@burdenoff/fe-libs/shared/feature-flags";
25
- import { ProviderIcon as Ae, canManageSharing as je } from "@burdenoff/fe-libs/connections";
26
- import { AlertDialog as Me, AlertDialogAction as Ne, AlertDialogCancel as Pe, AlertDialogContent as Fe, AlertDialogDescription as Ie, AlertDialogFooter as Le, AlertDialogHeader as Re, AlertDialogTitle as ze, Button as y, CTAOverflowMenu as Be, EmphasisPanel as Ve, GlassCard as b, NextSteps as x, OptionalFields as He, PagePurpose as Ue, ShowMore as S, ShowTechnicalDetails as We } from "@burdenoff/fe-libs/ui";
21
+ import { Activity as o, AlertCircle as Se, ArrowLeft as s, CheckCircle2 as c, Clock as Ce, Key as we, Loader2 as l, Mail as Te, RefreshCw as Ee, RotateCcw as u, Share2 as De, Shield as d, Trash2 as f, User as Oe, XCircle as p, Zap as m } from "lucide-react";
22
+ import { useParams as ke } from "react-router";
23
+ import { usePermissions as Ae } from "@burdenoff/fe-libs/shared/providers/shell";
24
+ import { Fragment as je, jsx as h, jsxs as g } from "react/jsx-runtime";
25
+ import { useFeatureFlag as Me } from "@burdenoff/fe-libs/shared/feature-flags";
26
+ import { ProviderIcon as _, canManageSharing as Ne } from "@burdenoff/fe-libs/connections";
27
+ import { AlertDialog as Pe, AlertDialogAction as Fe, AlertDialogCancel as Ie, AlertDialogContent as Le, AlertDialogDescription as Re, AlertDialogFooter as ze, AlertDialogHeader as Be, AlertDialogTitle as Ve, Button as v, CTAOverflowMenu as y, EmphasisPanel as He, GlassCard as b, NextSteps as x, OptionalFields as Ue, PagePurpose as We, ShowMore as S, ShowTechnicalDetails as Ge } from "@burdenoff/fe-libs/ui";
27
28
  import { suggestAnchorProps as C } from "@burdenoff/fe-libs/shared/proactive";
28
29
  // src/integrations/pages/ConnectionDetail.tsx
29
30
  function w() {
30
- let { connectionId: w } = Ee(), { basePath: T = "/", navigate: E, navigationV2: D = !1 } = ie(), O = ee(), Ge = te(), Ke = ne(), k = re(), { connection: A, loading: qe, error: j, refetch: M } = oe(w ?? ""), { testConnection: Je, loading: N } = ue(), { refreshToken: Ye, loading: Xe } = ce(), { revokeConnection: Ze, loading: P } = le(), { deleteConnection: Qe, loading: F } = se(), I = ke(ae.OAUTH_REFRESH, !0), { hasPermission: L, isLoading: $e } = De(), R = L(t.CONNECTION_UPDATE), z = L(t.CONNECTION_DELETE), et = L(t.CONNECTION_SHARE), tt = L(t.CONNECTION_CREATE), [nt, B] = a(!1), [V, rt] = a(null), [H, U] = a(null), [it, W] = a(!1), [G, K] = a(!1), [at, q] = a(!1), [ot, st] = a(!1), ct = ge(A?.vaultId), J = (e, ee) => {
31
- U({
31
+ let { connectionId: w } = ke(), { basePath: T = "/", navigate: E, navigationV2: D = !1 } = re(), O = t(), k = ee(), A = te(), j = ne(), { connection: M, loading: Ke, error: N, refetch: P } = ae(w ?? ""), { testConnection: qe, loading: F } = le(), { refreshToken: Je, loading: Ye } = se(), { revokeConnection: Xe, loading: Ze } = ce(), { deleteConnection: Qe, loading: I } = oe(), L = Me(ie.OAUTH_REFRESH, !0), { hasPermission: R, isLoading: $e } = Ae(), z = R(n.CONNECTION_UPDATE), B = R(n.CONNECTION_DELETE), et = R(n.CONNECTION_SHARE), tt = R(n.CONNECTION_CREATE), [nt, V] = a(!1), [H, rt] = a(null), [U, it] = a(null), [at, W] = a(!1), [ot, G] = a(!1), [st, K] = a(!1), [ct, lt] = a(!1), ut = _e(M?.vaultId), q = (e, t) => {
32
+ it({
32
33
  type: e,
33
- message: ee
34
- }), setTimeout(() => U(null), 5e3);
34
+ message: t
35
+ }), setTimeout(() => it(null), 5e3);
35
36
  };
36
- if (qe || $e) return /* @__PURE__ */ v("div", {
37
+ if (Ke || $e) return /* @__PURE__ */ g("div", {
37
38
  className: "flex flex-col items-center justify-center py-20",
38
- children: [/* @__PURE__ */ _(d, {
39
+ children: [/* @__PURE__ */ h(l, {
39
40
  size: 48,
40
41
  className: "animate-spin text-primary"
41
- }), /* @__PURE__ */ _("span", {
42
+ }), /* @__PURE__ */ h("span", {
42
43
  className: "mt-6 text-sm font-medium text-text-secondary",
43
44
  children: O("integrations.connectionDetail.loading", "Loading connection details...")
44
45
  })]
45
46
  });
46
- if (j || !A) return /* @__PURE__ */ _("div", {
47
+ if (N || !M) return /* @__PURE__ */ h("div", {
47
48
  className: "p-6 max-w-4xl mx-auto",
48
- children: /* @__PURE__ */ v("div", {
49
+ children: /* @__PURE__ */ g("div", {
49
50
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
50
- children: [/* @__PURE__ */ _(s, {
51
+ children: [/* @__PURE__ */ h(Se, {
51
52
  size: 24,
52
53
  className: "text-status-error-text flex-shrink-0"
53
- }), /* @__PURE__ */ v("div", {
54
+ }), /* @__PURE__ */ g("div", {
54
55
  className: "flex-1",
55
56
  children: [
56
- /* @__PURE__ */ _("h3", {
57
+ /* @__PURE__ */ h("h3", {
57
58
  className: "font-semibold text-status-error-text mb-1",
58
59
  children: O("integrations.connectionDetail.error.title", "Connection not found")
59
60
  }),
60
- /* @__PURE__ */ _("p", {
61
+ /* @__PURE__ */ h("p", {
61
62
  className: "text-sm text-status-error-text mb-3",
62
- children: j?.message || O("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
63
+ children: N?.message || O("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
63
64
  }),
64
- /* @__PURE__ */ v("div", {
65
+ /* @__PURE__ */ g("div", {
65
66
  className: "flex gap-2",
66
- children: [/* @__PURE__ */ v("button", {
67
+ children: [/* @__PURE__ */ g("button", {
67
68
  type: "button",
68
- onClick: () => M(),
69
+ onClick: () => P(),
69
70
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
70
71
  children: [
71
- /* @__PURE__ */ _(Ce, { size: 14 }),
72
+ /* @__PURE__ */ h(Ee, { size: 14 }),
72
73
  " ",
73
74
  O("integrations.connectionDetail.error.retry", "Try Again")
74
75
  ]
75
- }), /* @__PURE__ */ v("button", {
76
+ }), /* @__PURE__ */ g("button", {
76
77
  type: "button",
77
- onClick: () => E?.(n(T, "connections")),
78
+ onClick: () => E?.(r(T, "connections")),
78
79
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
79
80
  children: [
80
- /* @__PURE__ */ _(c, { size: 14 }),
81
+ /* @__PURE__ */ h(s, { size: 14 }),
81
82
  " ",
82
83
  O("integrations.connectionDetail.error.back", "Back to Connections")
83
84
  ]
@@ -87,700 +88,710 @@ function w() {
87
88
  })]
88
89
  })
89
90
  });
90
- let Y = async () => {
91
- let e = await Je(A.id);
92
- e && (rt(e), J(e.success ? "success" : "error", e.message));
93
- }, X = async () => {
91
+ let J = async () => {
92
+ let e = await qe(M.id);
93
+ e && (rt(e), q(e.success ? "success" : "error", e.message));
94
+ }, Y = async () => {
94
95
  try {
95
- let e = await Ye(A.id);
96
- be(e) ? J("success", O("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")) : J("error", O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
96
+ let e = await Je(M.id);
97
+ xe(e) ? q("success", O("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")) : q("error", O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
97
98
  } catch (e) {
98
- J("error", e instanceof Error ? e.message : O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
99
+ q("error", e instanceof Error ? e.message : O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
99
100
  } finally {
100
- M();
101
+ P();
101
102
  }
102
- }, lt = async () => {
103
- q(!0);
104
- }, ut = async () => {
105
- await Ze(A.id), J("success", O("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), q(!1), M();
106
103
  }, dt = async () => {
107
- r("medium");
104
+ K(!0);
105
+ }, ft = async () => {
106
+ await Xe(M.id), q("success", O("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), K(!1), P();
107
+ }, pt = async () => {
108
+ ge("medium");
108
109
  let e = await he({
109
110
  title: O("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
110
111
  message: O("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."),
111
112
  okButtonTitle: O("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
112
113
  cancelButtonTitle: O("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
113
114
  });
114
- e === null ? W(!0) : e && await ft();
115
- }, ft = async () => {
115
+ e === null ? W(!0) : e && await mt();
116
+ }, mt = async () => {
116
117
  try {
117
- await Qe(A.id, G), J("success", O("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), i("success"), W(!1), K(!1), E?.(n(T, "connections"));
118
+ await Qe(M.id, ot), q("success", O("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), i("success"), W(!1), G(!1), E?.(r(T, "connections"));
118
119
  } catch (e) {
119
- J("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
120
+ q("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
120
121
  }
121
- }, Z = N || Xe || P || F, Q = et && je(A.myAccess ?? null), $ = !!(A.vaultId || A.credentialSecretId), pt = [
122
+ }, ht = (e) => {
123
+ e.ok ? (q("success", e.allow ? O("integrations.connectionDetail.selfHosted.allowed", "Self-hosted workers may now receive this connection’s key.") : O("integrations.connectionDetail.selfHosted.stopped", "Self-hosted workers no longer receive this connection’s key.")), i("success")) : (q("error", e.message), i("error"));
124
+ }, X = F || Ye || Ze || I, Z = et && Ne(M.myAccess ?? null), Q = !!(M.vaultId || M.credentialSecretId), gt = [
122
125
  {
123
126
  id: "test",
124
127
  label: O("integrations.connectionDetail.nextSteps.test.label", "Test the connection"),
125
128
  description: O("integrations.connectionDetail.nextSteps.test.description", "Run a live check to confirm credentials still work before relying on it."),
126
- icon: /* @__PURE__ */ _(g, { size: 16 }),
129
+ icon: /* @__PURE__ */ h(m, { size: 16 }),
127
130
  onClick: () => {
128
- Y();
131
+ J();
129
132
  },
130
- done: A.status === "active" && !!V?.success
133
+ done: M.status === "active" && !!H?.success
131
134
  },
132
- ...R && A.provider.authType === "oauth2" && I ? [{
135
+ ...z && M.provider.authType === "oauth2" && L ? [{
133
136
  id: "refresh",
134
137
  label: O("integrations.connectionDetail.nextSteps.refresh.label", "Refresh the access token"),
135
138
  description: O("integrations.connectionDetail.nextSteps.refresh.description", "Renew OAuth credentials if requests start failing with an auth error."),
136
- icon: /* @__PURE__ */ _(f, { size: 16 }),
139
+ icon: /* @__PURE__ */ h(u, { size: 16 }),
137
140
  onClick: () => {
138
- X();
141
+ Y();
139
142
  }
140
143
  }] : [],
141
144
  {
142
145
  id: "logs",
143
146
  label: O("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
144
147
  description: O("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
145
- icon: /* @__PURE__ */ _(o, { size: 16 }),
146
- onClick: () => E?.(n(T, "logs"))
148
+ icon: /* @__PURE__ */ h(o, { size: 16 }),
149
+ onClick: () => E?.(r(T, "logs"))
147
150
  }
148
- ], mt = /* @__PURE__ */ v(Oe, { children: [
149
- H && /* @__PURE__ */ v("div", {
150
- className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", H.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
151
- children: [H.type === "success" ? /* @__PURE__ */ _(l, { size: 20 }) : /* @__PURE__ */ _(h, { size: 20 }), /* @__PURE__ */ _("span", {
151
+ ], _t = /* @__PURE__ */ g(je, { children: [
152
+ U && /* @__PURE__ */ g("div", {
153
+ className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", U.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
154
+ children: [U.type === "success" ? /* @__PURE__ */ h(c, { size: 20 }) : /* @__PURE__ */ h(p, { size: 20 }), /* @__PURE__ */ h("span", {
152
155
  className: "font-medium",
153
- children: H.message
156
+ children: U.message
154
157
  })]
155
158
  }),
156
- /* @__PURE__ */ _(Me, {
157
- open: it,
159
+ /* @__PURE__ */ h(Pe, {
160
+ open: at,
158
161
  onOpenChange: (e) => {
159
- e || (W(!1), K(!1));
162
+ e || (W(!1), G(!1));
160
163
  },
161
- children: /* @__PURE__ */ v(Fe, {
164
+ children: /* @__PURE__ */ g(Le, {
162
165
  className: "max-w-md",
163
166
  children: [
164
- /* @__PURE__ */ v(Re, { children: [/* @__PURE__ */ _(ze, { children: O("integrations.connectionDetail.deleteDialog.title", "Delete Connection") }), /* @__PURE__ */ v(Ie, { children: [D ? O("integrations.connectedApps.removeMessage", "Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.", {
165
- name: A.name,
166
- provider: A.provider.name
167
- }) : O("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."), $ && ` ${O("integrations.connectionDetail.deleteDialog.vaultHint", "You can also remove the mapped vault secret if you no longer need it.")}`] })] }),
168
- $ && /* @__PURE__ */ v("label", {
167
+ /* @__PURE__ */ g(Be, { children: [/* @__PURE__ */ h(Ve, { children: O("integrations.connectionDetail.deleteDialog.title", "Delete Connection") }), /* @__PURE__ */ g(Re, { children: [D ? O("integrations.connectedApps.removeMessage", "Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.", {
168
+ name: M.name,
169
+ provider: M.provider.name
170
+ }) : O("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."), Q && ` ${O("integrations.connectionDetail.deleteDialog.vaultHint", "You can also remove the mapped vault secret if you no longer need it.")}`] })] }),
171
+ Q && /* @__PURE__ */ g("label", {
169
172
  className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
170
- children: [/* @__PURE__ */ _("input", {
173
+ children: [/* @__PURE__ */ h("input", {
171
174
  type: "checkbox",
172
- checked: G,
173
- onChange: (e) => K(e.target.checked),
175
+ checked: ot,
176
+ onChange: (e) => G(e.target.checked),
174
177
  className: "mt-0.5",
175
178
  "aria-label": O("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
176
- }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
179
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
177
180
  className: "text-sm font-medium text-text-primary",
178
181
  children: O("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
179
- }), /* @__PURE__ */ _("p", {
182
+ }), /* @__PURE__ */ h("p", {
180
183
  className: "text-xs text-text-secondary mt-1",
181
184
  children: O("integrations.connectionDetail.deleteDialog.removeVaultSecretHint", "Use this only if no other connections rely on the same secret.")
182
185
  })] })]
183
186
  }),
184
- /* @__PURE__ */ v(Le, { children: [/* @__PURE__ */ _(Pe, {
187
+ /* @__PURE__ */ g(ze, { children: [/* @__PURE__ */ h(Ie, {
185
188
  onClick: () => {
186
- W(!1), K(!1);
189
+ W(!1), G(!1);
187
190
  },
188
191
  children: O("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
189
- }), /* @__PURE__ */ v(Ne, {
190
- disabled: F,
192
+ }), /* @__PURE__ */ g(Fe, {
193
+ disabled: I,
191
194
  onClick: (e) => {
192
- e.preventDefault(), ft();
195
+ e.preventDefault(), mt();
193
196
  },
194
197
  className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
195
- children: [F ? /* @__PURE__ */ _(d, {
198
+ children: [I ? /* @__PURE__ */ h(l, {
196
199
  size: 14,
197
200
  className: "animate-spin"
198
- }) : /* @__PURE__ */ _(m, { size: 14 }), O("integrations.connectionDetail.deleteDialog.deleteConnection", "Delete connection")]
201
+ }) : /* @__PURE__ */ h(f, { size: 14 }), O("integrations.connectionDetail.deleteDialog.deleteConnection", "Delete connection")]
199
202
  })] })
200
203
  ]
201
204
  })
202
205
  }),
203
- /* @__PURE__ */ _(me, {
204
- open: at,
206
+ /* @__PURE__ */ h(me, {
207
+ open: st,
205
208
  title: O("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
206
209
  description: O("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
207
210
  confirmLabel: O("integrations.connectionDetail.actions.revoke", "Revoke"),
208
211
  cancelLabel: O("integrations.connectionDetail.actions.cancel", "Cancel"),
209
- loading: P,
212
+ loading: Ze,
210
213
  destructive: !0,
211
- icon: /* @__PURE__ */ _(p, { size: 20 }),
212
- onConfirm: ut,
213
- onCancel: () => q(!1)
214
+ icon: /* @__PURE__ */ h(d, { size: 20 }),
215
+ onConfirm: ft,
216
+ onCancel: () => K(!1)
214
217
  }),
215
- Q && /* @__PURE__ */ _(fe, {
216
- connection: A,
218
+ Z && /* @__PURE__ */ h(de, {
219
+ connection: M,
217
220
  open: nt,
218
- onClose: () => B(!1),
221
+ onClose: () => V(!1),
219
222
  onShared: () => {
220
- J("success", O("integrations.connectionDetail.notifications.shareSuccess", "Sharing updated")), M();
223
+ q("success", O("integrations.connectionDetail.notifications.shareSuccess", "Sharing updated")), P();
221
224
  }
222
225
  })
223
- ] }), ht = tt && ye(A.status), gt = A.externalAccountEmail || A.externalAccountName, _t = ht ? /* @__PURE__ */ v(y, {
224
- onClick: () => st(!0),
226
+ ] }), vt = tt && be(M.status), yt = M.externalAccountEmail || M.externalAccountName, $ = vt ? /* @__PURE__ */ g(v, {
227
+ onClick: () => lt(!0),
225
228
  "data-testid": "connection-detail-reconnect",
226
- children: [/* @__PURE__ */ _(f, {
229
+ children: [/* @__PURE__ */ h(u, {
227
230
  size: 14,
228
231
  "aria-hidden": "true"
229
232
  }), O("integrations.connectedApps.reconnect", "Reconnect")]
230
233
  }) : null;
231
- return D ? /* @__PURE__ */ v("div", {
234
+ return D ? /* @__PURE__ */ g("div", {
232
235
  className: "space-y-6 p-6 max-w-5xl mx-auto",
233
236
  children: [
234
- mt,
235
- /* @__PURE__ */ _(_e, {
236
- open: ot,
237
- onClose: () => st(!1),
238
- reconnect: ot ? {
239
- connectionId: A.id,
240
- name: A.name,
241
- providerId: A.provider.id,
242
- authMethodKey: A.authMethodKey ?? null
237
+ _t,
238
+ /* @__PURE__ */ h(ve, {
239
+ open: ct,
240
+ onClose: () => lt(!1),
241
+ reconnect: ct ? {
242
+ connectionId: M.id,
243
+ name: M.name,
244
+ providerId: M.provider.id,
245
+ authMethodKey: M.authMethodKey ?? null
243
246
  } : null,
244
247
  onConnectionCreated: () => {
245
- M();
248
+ P();
246
249
  }
247
250
  }),
248
- /* @__PURE__ */ _("div", {
251
+ /* @__PURE__ */ h("div", {
249
252
  className: "rounded-xl border border-border-seam bg-accent-wash p-6",
250
- children: /* @__PURE__ */ v("div", {
253
+ children: /* @__PURE__ */ g("div", {
251
254
  className: "flex flex-col gap-4 sm:flex-row sm:items-center",
252
- children: [/* @__PURE__ */ v("div", {
255
+ children: [/* @__PURE__ */ g("div", {
253
256
  className: "flex min-w-0 flex-1 items-center gap-4",
254
257
  children: [
255
- /* @__PURE__ */ _(y, {
258
+ /* @__PURE__ */ h(v, {
256
259
  variant: "ghost",
257
260
  size: "icon",
258
261
  className: "shrink-0",
259
262
  onClick: () => E?.(T),
260
263
  "aria-label": O("integrations.connectionDetail.actions.backAriaLabel", "Back"),
261
- children: /* @__PURE__ */ _(c, { size: 20 })
264
+ children: /* @__PURE__ */ h(s, { size: 20 })
262
265
  }),
263
- /* @__PURE__ */ _(Ae, {
264
- provider: A.provider,
266
+ /* @__PURE__ */ h(_, {
267
+ provider: M.provider,
265
268
  size: 56
266
269
  }),
267
- /* @__PURE__ */ v("div", {
270
+ /* @__PURE__ */ g("div", {
268
271
  className: "min-w-0 flex-1",
269
- children: [/* @__PURE__ */ v("div", {
272
+ children: [/* @__PURE__ */ g("div", {
270
273
  className: "flex flex-wrap items-center gap-3",
271
274
  ...C({
272
275
  entityType: "connection",
273
- entityId: A.id
276
+ entityId: M.id
274
277
  }),
275
278
  children: [
276
- /* @__PURE__ */ _("h1", {
279
+ /* @__PURE__ */ h("h1", {
277
280
  className: "text-2xl sm:text-3xl font-bold text-text-primary break-words",
278
- children: A.name
281
+ children: M.name
279
282
  }),
280
- /* @__PURE__ */ _(de, {
281
- status: A.status,
283
+ /* @__PURE__ */ h(ue, {
284
+ status: M.status,
282
285
  size: "md"
283
286
  }),
284
- /* @__PURE__ */ _(pe, { connection: A })
287
+ /* @__PURE__ */ h(fe, { connection: M })
285
288
  ]
286
- }), /* @__PURE__ */ v("p", {
289
+ }), /* @__PURE__ */ g("p", {
287
290
  className: "text-sm text-text-secondary mt-0.5",
288
291
  children: [
289
- gt ? O("integrations.connectedApps.signedInAs", "Signed in as {{account}}", { account: gt }) : A.provider.name,
292
+ yt ? O("integrations.connectedApps.signedInAs", "Signed in as {{account}}", { account: yt }) : M.provider.name,
290
293
  " · ",
291
- O("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: Ke(A.lastUsedAt) })
294
+ O("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: A(M.lastUsedAt) })
292
295
  ]
293
296
  })]
294
297
  })
295
298
  ]
296
- }), /* @__PURE__ */ v("div", {
299
+ }), /* @__PURE__ */ g("div", {
297
300
  className: "flex shrink-0 flex-wrap items-center gap-2",
298
- children: [_t, /* @__PURE__ */ _(Be, {
301
+ children: [$, /* @__PURE__ */ h(y, {
299
302
  align: "end",
300
303
  primary: {
301
304
  label: O("integrations.connectedApps.test", "Test"),
302
305
  onSelect: () => {
303
- Y();
306
+ J();
304
307
  },
305
- disabled: Z,
306
- icon: N ? /* @__PURE__ */ _(d, {
308
+ disabled: X,
309
+ icon: F ? /* @__PURE__ */ h(l, {
307
310
  size: 14,
308
311
  className: "animate-spin"
309
- }) : /* @__PURE__ */ _(g, { size: 14 })
312
+ }) : /* @__PURE__ */ h(m, { size: 14 })
310
313
  },
311
314
  actions: [
312
- ...Q ? [{
315
+ ...Z ? [{
313
316
  label: O("integrations.connectionDetail.actions.share", "Share"),
314
- onSelect: () => B(!0),
315
- disabled: Z,
316
- icon: /* @__PURE__ */ _(we, { size: 14 })
317
+ onSelect: () => V(!0),
318
+ disabled: X,
319
+ icon: /* @__PURE__ */ h(De, { size: 14 })
317
320
  }] : [],
318
- ...R && A.provider.authType === "oauth2" && I ? [{
321
+ ...z && M.provider.authType === "oauth2" && L ? [{
319
322
  label: O("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
320
323
  onSelect: () => {
321
- X();
324
+ Y();
322
325
  },
323
- disabled: Z,
324
- icon: /* @__PURE__ */ _(f, { size: 14 })
326
+ disabled: X,
327
+ icon: /* @__PURE__ */ h(u, { size: 14 })
325
328
  }] : [],
326
- ...z ? [{
329
+ ...B ? [{
327
330
  label: O("integrations.connectionDetail.actions.revoke", "Revoke"),
328
331
  onSelect: () => {
329
- lt();
332
+ dt();
330
333
  },
331
- disabled: Z,
332
- icon: /* @__PURE__ */ _(p, { size: 14 })
334
+ disabled: X,
335
+ icon: /* @__PURE__ */ h(d, { size: 14 })
333
336
  }, {
334
337
  label: O("integrations.connectedApps.remove", "Remove"),
335
338
  onSelect: () => {
336
- r("medium"), W(!0);
339
+ ge("medium"), W(!0);
337
340
  },
338
341
  intent: "destructive",
339
- disabled: Z,
340
- icon: /* @__PURE__ */ _(m, { size: 14 })
342
+ disabled: X,
343
+ icon: /* @__PURE__ */ h(f, { size: 14 })
341
344
  }] : []
342
345
  ]
343
346
  })]
344
347
  })]
345
348
  })
346
349
  }),
347
- A.errorMessage && /* @__PURE__ */ v("div", {
350
+ M.errorMessage && /* @__PURE__ */ g("div", {
348
351
  role: "alert",
349
352
  className: "flex flex-col gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between",
350
- children: [/* @__PURE__ */ v("div", {
353
+ children: [/* @__PURE__ */ g("div", {
351
354
  className: "flex items-start gap-3",
352
- children: [/* @__PURE__ */ _(s, {
355
+ children: [/* @__PURE__ */ h(Se, {
353
356
  size: 20,
354
357
  className: "mt-0.5 shrink-0 text-status-error-text"
355
- }), /* @__PURE__ */ v("div", {
358
+ }), /* @__PURE__ */ g("div", {
356
359
  className: "min-w-0",
357
- children: [/* @__PURE__ */ _("p", {
360
+ children: [/* @__PURE__ */ h("p", {
358
361
  className: "font-semibold text-status-error-text",
359
- children: O("integrations.connectedApps.brokenTitle", "{{provider}} stopped working", { provider: A.provider.name })
360
- }), /* @__PURE__ */ _("p", {
362
+ children: O("integrations.connectedApps.brokenTitle", "{{provider}} stopped working", { provider: M.provider.name })
363
+ }), /* @__PURE__ */ h("p", {
361
364
  className: "text-sm text-status-error-text break-words",
362
- children: A.errorMessage
365
+ children: M.errorMessage
363
366
  })]
364
367
  })]
365
- }), _t]
368
+ }), $]
366
369
  }),
367
- V && /* @__PURE__ */ v("div", {
370
+ H && /* @__PURE__ */ g("div", {
368
371
  role: "status",
369
- className: e("rounded-xl border p-4", V.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
370
- children: [/* @__PURE__ */ v("p", {
371
- className: e("font-semibold flex items-center gap-2", V.success ? "text-status-success-text" : "text-status-error-text"),
372
- children: [V.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), V.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
373
- }), /* @__PURE__ */ _("p", {
374
- className: e("text-sm mt-1", V.success ? "text-status-success-text" : "text-status-error-text"),
375
- children: V.message
372
+ className: e("rounded-xl border p-4", H.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
373
+ children: [/* @__PURE__ */ g("p", {
374
+ className: e("font-semibold flex items-center gap-2", H.success ? "text-status-success-text" : "text-status-error-text"),
375
+ children: [H.success ? /* @__PURE__ */ h(c, { size: 18 }) : /* @__PURE__ */ h(p, { size: 18 }), H.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
376
+ }), /* @__PURE__ */ h("p", {
377
+ className: e("text-sm mt-1", H.success ? "text-status-success-text" : "text-status-error-text"),
378
+ children: H.message
376
379
  })]
377
380
  }),
378
- /* @__PURE__ */ _(He, {
381
+ /* @__PURE__ */ h(Ue, {
379
382
  storageKey: "integrations.connection-detail.more-details",
380
383
  label: O("integrations.connectedApps.moreDetails", "More details"),
381
- children: /* @__PURE__ */ v("div", {
384
+ children: /* @__PURE__ */ g("div", {
382
385
  className: "space-y-4",
383
386
  children: [
384
- /* @__PURE__ */ v("div", {
387
+ /* @__PURE__ */ g("div", {
385
388
  className: "space-y-3 text-sm",
386
- children: [A.description && /* @__PURE__ */ v("div", {
389
+ children: [M.description && /* @__PURE__ */ g("div", {
387
390
  className: "py-2 border-b border-border-seam",
388
- children: [/* @__PURE__ */ _("span", {
391
+ children: [/* @__PURE__ */ h("span", {
389
392
  className: "text-xs text-text-secondary uppercase tracking-wide",
390
393
  children: O("integrations.connectionDetail.fields.description", "Description")
391
- }), /* @__PURE__ */ _("p", {
394
+ }), /* @__PURE__ */ h("p", {
392
395
  className: "text-text-primary mt-0.5",
393
- children: A.description
396
+ children: M.description
394
397
  })]
395
398
  }), [
396
399
  {
397
400
  id: "app",
398
401
  label: O("integrations.connectionDetail.fields.provider", "Provider"),
399
- value: `${A.provider.name} · ${Ge(A.provider.authType)}`
402
+ value: `${M.provider.name} · ${k(M.provider.authType)}`
400
403
  },
401
- ...A.externalAccountName && A.externalAccountEmail ? [{
404
+ ...M.externalAccountName && M.externalAccountEmail ? [{
402
405
  id: "name",
403
406
  label: O("integrations.connectionDetail.fields.name", "Name"),
404
- value: A.externalAccountName
407
+ value: M.externalAccountName
405
408
  }] : [],
406
409
  {
407
410
  id: "health",
408
411
  label: O("integrations.connectionDetail.fields.healthCheck", "Health Check"),
409
- value: k(A.lastHealthCheck)
412
+ value: j(M.lastHealthCheck)
410
413
  },
411
414
  {
412
415
  id: "created",
413
416
  label: O("integrations.connectionDetail.fields.created", "Created"),
414
- value: k(A.createdAt)
417
+ value: j(M.createdAt)
415
418
  },
416
- ...V ? [{
419
+ ...H ? [{
417
420
  id: "latency",
418
421
  label: O("integrations.connectedApps.testLatency", "Test latency"),
419
- value: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: V.latencyMs })
422
+ value: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
420
423
  }] : [],
421
- ...$ ? [{
424
+ ...Q ? [{
422
425
  id: "storage",
423
426
  label: O("integrations.connectionDetail.sections.credentialStorage", "Credential Storage"),
424
- value: [ct ?? A.vaultId, A.credentialSecretName].filter(Boolean).join(" · ")
427
+ value: [ut ?? M.vaultId, M.credentialSecretName].filter(Boolean).join(" · ")
425
428
  }] : []
426
- ].map((e) => /* @__PURE__ */ v("div", {
429
+ ].map((e) => /* @__PURE__ */ g("div", {
427
430
  className: "flex items-center justify-between gap-3 py-2 border-b border-border-seam",
428
- children: [/* @__PURE__ */ _("span", {
431
+ children: [/* @__PURE__ */ h("span", {
429
432
  className: "text-text-secondary",
430
433
  children: e.label
431
- }), /* @__PURE__ */ _("span", {
434
+ }), /* @__PURE__ */ h("span", {
432
435
  className: "text-text-primary text-end break-all",
433
436
  children: e.value
434
437
  })]
435
438
  }, e.id))]
436
439
  }),
437
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("h3", {
440
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h3", {
438
441
  className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-2",
439
- children: [/* @__PURE__ */ _(p, {
442
+ children: [/* @__PURE__ */ h(d, {
440
443
  size: 16,
441
444
  className: "text-primary",
442
445
  "aria-hidden": "true"
443
446
  }), O("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
444
- }), A.grantedScopes.length > 0 ? /* @__PURE__ */ _(S, {
447
+ }), M.grantedScopes.length > 0 ? /* @__PURE__ */ h(S, {
445
448
  collapsedHeight: 88,
446
449
  label: "Show all scopes",
447
- children: /* @__PURE__ */ _("div", {
450
+ children: /* @__PURE__ */ h("div", {
448
451
  className: "flex flex-wrap gap-2",
449
- children: A.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
452
+ children: M.grantedScopes.map((e) => /* @__PURE__ */ h("span", {
450
453
  className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
451
454
  children: e
452
455
  }, e))
453
456
  })
454
- }) : /* @__PURE__ */ _("p", {
457
+ }) : /* @__PURE__ */ h("p", {
455
458
  className: "text-sm text-text-secondary",
456
459
  children: O("integrations.connectionDetail.scopes.empty", "No scopes granted.")
457
460
  })] }),
458
- (R || z) && /* @__PURE__ */ _(x, {
461
+ /* @__PURE__ */ h(pe, {
462
+ connection: M,
463
+ onResult: ht
464
+ }),
465
+ (z || B) && /* @__PURE__ */ h(x, {
459
466
  storageKey: "integrations-connection-detail",
460
- steps: pt
467
+ steps: gt
461
468
  }),
462
- /* @__PURE__ */ _(We, {
469
+ /* @__PURE__ */ h(Ge, {
463
470
  copyable: !0,
464
471
  children: [
465
- `connectionId: ${A.id}`,
466
- `providerKey: ${A.provider.key}`,
467
- `status: ${A.status}`,
468
- ...A.vaultId ? [`vaultId: ${A.vaultId}`] : [],
469
- ...A.credentialSecretId ? [`secretId: ${A.credentialSecretId}`] : []
472
+ `connectionId: ${M.id}`,
473
+ `providerKey: ${M.provider.key}`,
474
+ `status: ${M.status}`,
475
+ ...M.vaultId ? [`vaultId: ${M.vaultId}`] : [],
476
+ ...M.credentialSecretId ? [`secretId: ${M.credentialSecretId}`] : []
470
477
  ].join("\n")
471
478
  })
472
479
  ]
473
480
  })
474
481
  }),
475
- /* @__PURE__ */ _(ve, {
476
- connectionId: A.id,
477
- onShowAll: () => E?.(n(T, `logs?connectionId=${encodeURIComponent(A.id)}`))
482
+ /* @__PURE__ */ h(ye, {
483
+ connectionId: M.id,
484
+ onShowAll: () => E?.(r(T, `logs?connectionId=${encodeURIComponent(M.id)}`))
478
485
  })
479
486
  ]
480
- }) : /* @__PURE__ */ v("div", {
487
+ }) : /* @__PURE__ */ g("div", {
481
488
  className: "space-y-6 p-6 max-w-5xl mx-auto",
482
489
  children: [
483
- mt,
484
- /* @__PURE__ */ _("div", {
490
+ _t,
491
+ /* @__PURE__ */ h("div", {
485
492
  className: "rounded-xl border border-border-seam bg-accent-wash p-6",
486
- children: /* @__PURE__ */ v("div", {
493
+ children: /* @__PURE__ */ g("div", {
487
494
  className: "flex items-center gap-4",
488
495
  children: [
489
- /* @__PURE__ */ _(y, {
496
+ /* @__PURE__ */ h(v, {
490
497
  variant: "ghost",
491
498
  size: "icon",
492
- onClick: () => E?.(n(T, "connections")),
499
+ onClick: () => E?.(r(T, "connections")),
493
500
  "aria-label": O("integrations.connectionDetail.actions.backAriaLabel", "Back"),
494
- children: /* @__PURE__ */ _(c, { size: 20 })
501
+ children: /* @__PURE__ */ h(s, { size: 20 })
495
502
  }),
496
- /* @__PURE__ */ _(Ae, {
497
- provider: A.provider,
503
+ /* @__PURE__ */ h(_, {
504
+ provider: M.provider,
498
505
  size: 56
499
506
  }),
500
- /* @__PURE__ */ v("div", {
507
+ /* @__PURE__ */ g("div", {
501
508
  className: "flex-1",
502
- children: [/* @__PURE__ */ v("div", {
509
+ children: [/* @__PURE__ */ g("div", {
503
510
  className: "flex items-center gap-3",
504
511
  ...C({
505
512
  entityType: "connection",
506
- entityId: A.id
513
+ entityId: M.id
507
514
  }),
508
515
  children: [
509
- /* @__PURE__ */ _("h1", {
516
+ /* @__PURE__ */ h("h1", {
510
517
  className: "text-2xl sm:text-3xl font-bold text-text-primary",
511
- children: A.name
518
+ children: M.name
512
519
  }),
513
- /* @__PURE__ */ _(de, {
514
- status: A.status,
520
+ /* @__PURE__ */ h(ue, {
521
+ status: M.status,
515
522
  size: "md"
516
523
  }),
517
- /* @__PURE__ */ _(pe, { connection: A })
524
+ /* @__PURE__ */ h(fe, { connection: M })
518
525
  ]
519
- }), /* @__PURE__ */ v("p", {
526
+ }), /* @__PURE__ */ g("p", {
520
527
  className: "text-sm text-text-secondary mt-0.5",
521
528
  children: [
522
- A.provider.name,
529
+ M.provider.name,
523
530
  " · ",
524
- Ge(A.provider.authType)
531
+ k(M.provider.authType)
525
532
  ]
526
533
  })]
527
534
  })
528
535
  ]
529
536
  })
530
537
  }),
531
- /* @__PURE__ */ _(Ue, {
532
- icon: /* @__PURE__ */ _(o, { size: 16 }),
533
- children: O("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: A.provider.name })
538
+ /* @__PURE__ */ h(We, {
539
+ icon: /* @__PURE__ */ h(o, { size: 16 }),
540
+ children: O("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: M.provider.name })
534
541
  }),
535
- (R || z) && /* @__PURE__ */ _(x, {
542
+ (z || B) && /* @__PURE__ */ h(x, {
536
543
  storageKey: "integrations-connection-detail",
537
- steps: pt
544
+ steps: gt
538
545
  }),
539
- /* @__PURE__ */ v("div", {
546
+ /* @__PURE__ */ g("div", {
540
547
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
541
- children: [/* @__PURE__ */ v(Ve, {
548
+ children: [/* @__PURE__ */ g(He, {
542
549
  className: "p-5 space-y-4",
543
- children: [/* @__PURE__ */ v("h2", {
550
+ children: [/* @__PURE__ */ g("h2", {
544
551
  className: "font-semibold text-text-primary flex items-center gap-2",
545
- children: [/* @__PURE__ */ _(o, {
552
+ children: [/* @__PURE__ */ h(o, {
546
553
  size: 18,
547
554
  className: "text-primary"
548
555
  }), O("integrations.connectionDetail.sections.info", "Connection Info")]
549
- }), /* @__PURE__ */ v("div", {
556
+ }), /* @__PURE__ */ g("div", {
550
557
  className: "space-y-3",
551
558
  children: [
552
- A.description && /* @__PURE__ */ v("div", {
559
+ M.description && /* @__PURE__ */ g("div", {
553
560
  className: "py-2 border-b border-border-seam",
554
- children: [/* @__PURE__ */ _("span", {
561
+ children: [/* @__PURE__ */ h("span", {
555
562
  className: "text-xs text-text-secondary uppercase tracking-wide",
556
563
  children: O("integrations.connectionDetail.fields.description", "Description")
557
- }), /* @__PURE__ */ _("p", {
564
+ }), /* @__PURE__ */ h("p", {
558
565
  className: "text-sm text-text-primary mt-0.5",
559
- children: A.description
566
+ children: M.description
560
567
  })]
561
568
  }),
562
- /* @__PURE__ */ v("div", {
569
+ /* @__PURE__ */ g("div", {
563
570
  className: "flex items-center justify-between py-2 border-b border-border-seam",
564
- children: [/* @__PURE__ */ _("span", {
571
+ children: [/* @__PURE__ */ h("span", {
565
572
  className: "text-sm text-text-secondary",
566
573
  children: O("integrations.connectionDetail.fields.provider", "Provider")
567
- }), /* @__PURE__ */ _("span", {
574
+ }), /* @__PURE__ */ h("span", {
568
575
  className: "text-sm font-medium text-text-primary",
569
- children: A.provider.name
576
+ children: M.provider.name
570
577
  })]
571
578
  }),
572
- A.externalAccountEmail && /* @__PURE__ */ v("div", {
579
+ M.externalAccountEmail && /* @__PURE__ */ g("div", {
573
580
  className: "flex items-center justify-between py-2 border-b border-border-seam",
574
- children: [/* @__PURE__ */ v("span", {
581
+ children: [/* @__PURE__ */ g("span", {
575
582
  className: "text-sm text-text-secondary flex items-center gap-1",
576
583
  children: [
577
- /* @__PURE__ */ _(Se, { size: 14 }),
584
+ /* @__PURE__ */ h(Te, { size: 14 }),
578
585
  " ",
579
586
  O("integrations.connectionDetail.fields.account", "Account")
580
587
  ]
581
- }), /* @__PURE__ */ _("span", {
588
+ }), /* @__PURE__ */ h("span", {
582
589
  className: "text-sm font-medium text-text-primary",
583
- children: A.externalAccountEmail
590
+ children: M.externalAccountEmail
584
591
  })]
585
592
  }),
586
- A.externalAccountName && /* @__PURE__ */ v("div", {
593
+ M.externalAccountName && /* @__PURE__ */ g("div", {
587
594
  className: "flex items-center justify-between py-2 border-b border-border-seam",
588
- children: [/* @__PURE__ */ v("span", {
595
+ children: [/* @__PURE__ */ g("span", {
589
596
  className: "text-sm text-text-secondary flex items-center gap-1",
590
597
  children: [
591
- /* @__PURE__ */ _(Te, { size: 14 }),
598
+ /* @__PURE__ */ h(Oe, { size: 14 }),
592
599
  " ",
593
600
  O("integrations.connectionDetail.fields.name", "Name")
594
601
  ]
595
- }), /* @__PURE__ */ _("span", {
602
+ }), /* @__PURE__ */ h("span", {
596
603
  className: "text-sm font-medium text-text-primary",
597
- children: A.externalAccountName
604
+ children: M.externalAccountName
598
605
  })]
599
606
  }),
600
- A.errorMessage && /* @__PURE__ */ v("div", {
607
+ M.errorMessage && /* @__PURE__ */ g("div", {
601
608
  className: "py-2 border-b border-border-seam",
602
- children: [/* @__PURE__ */ _("span", {
609
+ children: [/* @__PURE__ */ h("span", {
603
610
  className: "text-xs text-status-error-text uppercase tracking-wide",
604
611
  children: O("integrations.connectionDetail.fields.error", "Error")
605
- }), /* @__PURE__ */ _("p", {
612
+ }), /* @__PURE__ */ h("p", {
606
613
  className: "text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2",
607
- children: A.errorMessage
614
+ children: M.errorMessage
608
615
  })]
609
616
  }),
610
- /* @__PURE__ */ v("div", {
617
+ /* @__PURE__ */ g("div", {
611
618
  className: "flex items-center justify-between py-2 border-b border-border-seam",
612
- children: [/* @__PURE__ */ v("span", {
619
+ children: [/* @__PURE__ */ g("span", {
613
620
  className: "text-sm text-text-secondary flex items-center gap-1",
614
621
  children: [
615
- /* @__PURE__ */ _(xe, { size: 14 }),
622
+ /* @__PURE__ */ h(Ce, { size: 14 }),
616
623
  " ",
617
624
  O("integrations.connectionDetail.fields.lastUsed", "Last Used")
618
625
  ]
619
- }), /* @__PURE__ */ _("span", {
626
+ }), /* @__PURE__ */ h("span", {
620
627
  className: "text-sm text-text-primary",
621
- children: Ke(A.lastUsedAt)
628
+ children: A(M.lastUsedAt)
622
629
  })]
623
630
  }),
624
- /* @__PURE__ */ v("div", {
631
+ /* @__PURE__ */ g("div", {
625
632
  className: "flex items-center justify-between py-2 border-b border-border-seam",
626
- children: [/* @__PURE__ */ _("span", {
633
+ children: [/* @__PURE__ */ h("span", {
627
634
  className: "text-sm text-text-secondary",
628
635
  children: O("integrations.connectionDetail.fields.healthCheck", "Health Check")
629
- }), /* @__PURE__ */ _("span", {
636
+ }), /* @__PURE__ */ h("span", {
630
637
  className: "text-sm text-text-primary",
631
- children: k(A.lastHealthCheck)
638
+ children: j(M.lastHealthCheck)
632
639
  })]
633
640
  }),
634
- /* @__PURE__ */ v("div", {
641
+ /* @__PURE__ */ g("div", {
635
642
  className: "flex items-center justify-between py-2",
636
- children: [/* @__PURE__ */ _("span", {
643
+ children: [/* @__PURE__ */ h("span", {
637
644
  className: "text-sm text-text-secondary",
638
645
  children: O("integrations.connectionDetail.fields.created", "Created")
639
- }), /* @__PURE__ */ _("span", {
646
+ }), /* @__PURE__ */ h("span", {
640
647
  className: "text-sm text-text-primary",
641
- children: k(A.createdAt)
648
+ children: j(M.createdAt)
642
649
  })]
643
650
  })
644
651
  ]
645
652
  })]
646
- }), /* @__PURE__ */ v("div", {
653
+ }), /* @__PURE__ */ g("div", {
647
654
  className: "space-y-4",
648
655
  children: [
649
- /* @__PURE__ */ v(b, {
656
+ /* @__PURE__ */ g(b, {
650
657
  className: "border-border-seam p-5",
651
- children: [/* @__PURE__ */ v("h2", {
658
+ children: [/* @__PURE__ */ g("h2", {
652
659
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
653
- children: [/* @__PURE__ */ _(p, {
660
+ children: [/* @__PURE__ */ h(d, {
654
661
  size: 18,
655
662
  className: "text-primary"
656
663
  }), O("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
657
- }), A.grantedScopes.length > 0 ? /* @__PURE__ */ _(S, {
664
+ }), M.grantedScopes.length > 0 ? /* @__PURE__ */ h(S, {
658
665
  collapsedHeight: 88,
659
666
  label: "Show all scopes",
660
- children: /* @__PURE__ */ _("div", {
667
+ children: /* @__PURE__ */ h("div", {
661
668
  className: "flex flex-wrap gap-2",
662
- children: A.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
669
+ children: M.grantedScopes.map((e) => /* @__PURE__ */ h("span", {
663
670
  className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
664
671
  children: e
665
672
  }, e))
666
673
  })
667
- }) : /* @__PURE__ */ _("p", {
674
+ }) : /* @__PURE__ */ h("p", {
668
675
  className: "text-sm text-text-secondary",
669
676
  children: O("integrations.connectionDetail.scopes.empty", "No scopes granted.")
670
677
  })]
671
678
  }),
672
- V && /* @__PURE__ */ v("div", {
673
- className: e("rounded-xl border p-5", V.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
679
+ /* @__PURE__ */ h(pe, {
680
+ connection: M,
681
+ onResult: ht
682
+ }),
683
+ H && /* @__PURE__ */ g("div", {
684
+ className: e("rounded-xl border p-5", H.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
674
685
  children: [
675
- /* @__PURE__ */ v("h2", {
676
- className: e("font-semibold flex items-center gap-2 mb-2", V.success ? "text-status-success-text" : "text-status-error-text"),
677
- children: [V.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), V.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
686
+ /* @__PURE__ */ g("h2", {
687
+ className: e("font-semibold flex items-center gap-2 mb-2", H.success ? "text-status-success-text" : "text-status-error-text"),
688
+ children: [H.success ? /* @__PURE__ */ h(c, { size: 18 }) : /* @__PURE__ */ h(p, { size: 18 }), H.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
678
689
  }),
679
- /* @__PURE__ */ _("p", {
680
- className: e("text-sm", V.success ? "text-status-success-text" : "text-status-error-text"),
681
- children: V.message
690
+ /* @__PURE__ */ h("p", {
691
+ className: e("text-sm", H.success ? "text-status-success-text" : "text-status-error-text"),
692
+ children: H.message
682
693
  }),
683
- /* @__PURE__ */ _("p", {
694
+ /* @__PURE__ */ h("p", {
684
695
  className: "text-xs text-text-secondary mt-1",
685
- children: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: V.latencyMs })
696
+ children: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
686
697
  })
687
698
  ]
688
699
  }),
689
- $ && /* @__PURE__ */ v(b, {
700
+ Q && /* @__PURE__ */ g(b, {
690
701
  className: "border-border-seam p-5",
691
- children: [/* @__PURE__ */ v("h2", {
702
+ children: [/* @__PURE__ */ g("h2", {
692
703
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
693
- children: [/* @__PURE__ */ _(u, {
704
+ children: [/* @__PURE__ */ h(we, {
694
705
  size: 18,
695
706
  className: "text-primary"
696
707
  }), O("integrations.connectionDetail.sections.credentialStorage", "Credential Storage")]
697
- }), /* @__PURE__ */ v("div", {
708
+ }), /* @__PURE__ */ g("div", {
698
709
  className: "space-y-2 text-sm",
699
710
  children: [
700
- A.vaultId && /* @__PURE__ */ v("div", {
711
+ M.vaultId && /* @__PURE__ */ g("div", {
701
712
  className: "flex items-center justify-between gap-3",
702
- children: [/* @__PURE__ */ _("span", {
713
+ children: [/* @__PURE__ */ h("span", {
703
714
  className: "text-text-secondary",
704
715
  children: O("integrations.connectionDetail.fields.vault", "Vault")
705
- }), /* @__PURE__ */ _("span", {
716
+ }), /* @__PURE__ */ h("span", {
706
717
  className: "font-medium text-text-primary break-all",
707
- children: ct ?? A.vaultId
718
+ children: ut ?? M.vaultId
708
719
  })]
709
720
  }),
710
- A.credentialSecretName && /* @__PURE__ */ v("div", {
721
+ M.credentialSecretName && /* @__PURE__ */ g("div", {
711
722
  className: "flex items-center justify-between gap-3",
712
- children: [/* @__PURE__ */ _("span", {
723
+ children: [/* @__PURE__ */ h("span", {
713
724
  className: "text-text-secondary",
714
725
  children: O("integrations.connectionDetail.fields.secret", "Secret")
715
- }), /* @__PURE__ */ _("span", {
726
+ }), /* @__PURE__ */ h("span", {
716
727
  className: "font-medium text-text-primary break-all",
717
- children: A.credentialSecretName
728
+ children: M.credentialSecretName
718
729
  })]
719
730
  }),
720
- A.credentialSecretId && /* @__PURE__ */ v("div", {
731
+ M.credentialSecretId && /* @__PURE__ */ g("div", {
721
732
  className: "flex items-center justify-between gap-3",
722
- children: [/* @__PURE__ */ _("span", {
733
+ children: [/* @__PURE__ */ h("span", {
723
734
  className: "text-text-secondary",
724
735
  children: O("integrations.connectionDetail.fields.secretId", "Secret ID")
725
- }), /* @__PURE__ */ _("span", {
736
+ }), /* @__PURE__ */ h("span", {
726
737
  className: "font-mono text-xs text-text-primary break-all",
727
- children: A.credentialSecretId
738
+ children: M.credentialSecretId
728
739
  })]
729
740
  })
730
741
  ]
731
742
  })]
732
743
  }),
733
- (R || z || Q) && /* @__PURE__ */ v(b, {
744
+ (z || B || Z) && /* @__PURE__ */ g(b, {
734
745
  className: "border-border-seam p-5",
735
- children: [/* @__PURE__ */ v("h2", {
746
+ children: [/* @__PURE__ */ g("h2", {
736
747
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
737
- children: [/* @__PURE__ */ _(u, {
748
+ children: [/* @__PURE__ */ h(we, {
738
749
  size: 18,
739
750
  className: "text-primary"
740
751
  }), O("integrations.connectionDetail.sections.actions", "Actions")]
741
- }), /* @__PURE__ */ _(Be, {
752
+ }), /* @__PURE__ */ h(y, {
742
753
  align: "start",
743
754
  primary: {
744
755
  label: O("integrations.connectionDetail.actions.test", "Test Connection"),
745
756
  onSelect: () => {
746
- Y();
757
+ J();
747
758
  },
748
- disabled: Z,
749
- icon: N ? /* @__PURE__ */ _(d, {
759
+ disabled: X,
760
+ icon: F ? /* @__PURE__ */ h(l, {
750
761
  size: 14,
751
762
  className: "animate-spin"
752
- }) : /* @__PURE__ */ _(g, { size: 14 })
763
+ }) : /* @__PURE__ */ h(m, { size: 14 })
753
764
  },
754
765
  actions: [
755
- ...Q ? [{
766
+ ...Z ? [{
756
767
  label: O("integrations.connectionDetail.actions.share", "Share"),
757
- onSelect: () => B(!0),
758
- disabled: Z,
759
- icon: /* @__PURE__ */ _(we, { size: 14 })
768
+ onSelect: () => V(!0),
769
+ disabled: X,
770
+ icon: /* @__PURE__ */ h(De, { size: 14 })
760
771
  }] : [],
761
- ...R && A.provider.authType === "oauth2" && I ? [{
772
+ ...z && M.provider.authType === "oauth2" && L ? [{
762
773
  label: O("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
763
774
  onSelect: () => {
764
- X();
775
+ Y();
765
776
  },
766
- disabled: Z,
767
- icon: /* @__PURE__ */ _(f, { size: 14 })
777
+ disabled: X,
778
+ icon: /* @__PURE__ */ h(u, { size: 14 })
768
779
  }] : [],
769
- ...z ? [{
780
+ ...B ? [{
770
781
  label: O("integrations.connectionDetail.actions.revoke", "Revoke"),
771
782
  onSelect: () => {
772
- lt();
783
+ dt();
773
784
  },
774
- disabled: Z,
775
- icon: /* @__PURE__ */ _(p, { size: 14 })
785
+ disabled: X,
786
+ icon: /* @__PURE__ */ h(d, { size: 14 })
776
787
  }, {
777
788
  label: O("integrations.connectionDetail.actions.delete", "Delete"),
778
789
  onSelect: () => {
779
- dt();
790
+ pt();
780
791
  },
781
792
  intent: "destructive",
782
- disabled: Z,
783
- icon: /* @__PURE__ */ _(m, { size: 14 })
793
+ disabled: X,
794
+ icon: /* @__PURE__ */ h(f, { size: 14 })
784
795
  }] : []
785
796
  ]
786
797
  })]