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