@burdenoff/microfe-integrations 2026.625.3 → 2026.625.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,296 +1,336 @@
1
1
  import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
2
- import { cn as t } from "../utils/cn.js";
3
- import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
4
- import { useIntegrationsStore as r } from "../store/integrationsStore.js";
5
- import { joinPath as i } from "../utils/navigation.js";
6
- import { getAuthTypeLabel as a, getCategoryLabel as o } from "../utils/integrationsHelpers.js";
7
- import { useDisableProvider as s, useEnableProvider as c, useProvider as l, useUninstallPlugin as u } from "../hooks/useProviders.js";
8
- import { useConnectionsByProvider as d } from "../hooks/useConnections.js";
9
- import { ProviderIcon as ee } from "../components/ProviderIcon.js";
10
- import { AddConnectionDialog as f } from "../components/AddConnectionDialog.js";
11
- import { ConnectionCard as p } from "../components/ConnectionCard.js";
12
- import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
13
- import { useState as ne } from "react";
14
- import { AlertCircle as m, ArrowLeft as h, BookOpen as g, Download as _, ExternalLink as v, Link2 as y, Loader2 as b, Package as re, Pencil as ie, Plus as x, Power as ae, RefreshCw as oe, Shield as se, Star as ce, Trash2 as S } from "lucide-react";
15
- import { useParams as le } from "react-router-dom";
16
- import { usePermissions as C } from "@burdenoff/fe-libs/shared/providers/shell";
17
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
18
- import { Button as E, CTAOverflowMenu as D, EmphasisPanel as O, GlassCard as k, ShowMore as A } from "@burdenoff/fe-libs/ui";
2
+ import { cn as ee } from "../utils/cn.js";
3
+ import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
4
+ import { useIntegrationsStore as te } from "../store/integrationsStore.js";
5
+ import { joinPath as n } from "../utils/navigation.js";
6
+ import { getAuthTypeLabel as ne, getCategoryLabel as r } from "../utils/integrationsHelpers.js";
7
+ import { useDisableProvider as i, useEnableProvider as a, useProvider as o, useUninstallPlugin as s } from "../hooks/useProviders.js";
8
+ import { useConnectionsByProvider as c } from "../hooks/useConnections.js";
9
+ import { ProviderIcon as l } from "../components/ProviderIcon.js";
10
+ import { AddConnectionDialog as u } from "../components/AddConnectionDialog.js";
11
+ import { ConnectionCard as re } from "../components/ConnectionCard.js";
12
+ import { ConfirmDialog as ie } from "../components/ConfirmDialog.js";
13
+ import { useState as ae } from "react";
14
+ import { AlertCircle as oe, ArrowLeft as d, BookOpen as f, Download as p, ExternalLink as m, Link2 as se, Loader2 as h, Package as g, Pencil as ce, Plus as _, Power as le, RefreshCw as ue, Shield as de, Star as fe, Trash2 as v } from "lucide-react";
15
+ import { useParams as pe } from "react-router-dom";
16
+ import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
18
+ import { Button as x, CTAOverflowMenu as S, EmphasisPanel as C, GlassCard as w, IllustratedEmptyState as T, NextSteps as E, PagePurpose as D, ShowMore as O } from "@burdenoff/fe-libs/ui";
19
19
  //#region src/integrations/pages/ProviderDetail.tsx
20
- function j() {
21
- let { providerId: j } = le(), { adminMode: M = !1, basePath: N = "/", navigate: P, onConnectionSelect: F } = e(), { addConnectionDialogOpen: I, addConnectionProviderId: L, openAddConnectionDialog: R, closeAddConnectionDialog: z } = r(), { provider: B, loading: V, error: H, refetch: U } = l(j ?? ""), { connections: W, loading: G } = d(j ?? ""), { enableProvider: ue, loading: de } = c(), { disableProvider: fe, loading: pe } = s(), { uninstallPlugin: me, loading: K } = u(), { hasPermission: q, isLoading: J } = C(), [he, Y] = ne(!1), X = !J && q(n.CONNECTION_CREATE), ge = M && !J && q(n.PROVIDER_CREATE), Z = M && !J && q(n.PROVIDER_UPDATE), _e = M && !J && q(n.PROVIDER_DELETE), ve = V, Q = de || pe || K;
22
- if (ve) return /* @__PURE__ */ T("div", {
20
+ function k() {
21
+ let { providerId: k } = pe(), { adminMode: A = !1, basePath: j = "/", navigate: M, onConnectionSelect: N } = e(), { addConnectionDialogOpen: P, addConnectionProviderId: F, openAddConnectionDialog: I, closeAddConnectionDialog: L } = te(), { provider: R, loading: z, error: B, refetch: V } = o(k ?? ""), { connections: H, loading: U } = c(k ?? ""), { enableProvider: he, loading: ge } = a(), { disableProvider: _e, loading: ve } = i(), { uninstallPlugin: ye, loading: W } = s(), { hasPermission: G, isLoading: K } = me(), [be, q] = ae(!1), J = !K && G(t.CONNECTION_CREATE), xe = A && !K && G(t.PROVIDER_CREATE), Y = A && !K && G(t.PROVIDER_UPDATE), Se = A && !K && G(t.PROVIDER_DELETE), Ce = z, X = ge || ve || W;
22
+ if (Ce) return /* @__PURE__ */ b("div", {
23
23
  className: "flex flex-col items-center justify-center py-20",
24
- children: [/* @__PURE__ */ T("div", {
24
+ children: [/* @__PURE__ */ b("div", {
25
25
  className: "relative",
26
- children: [/* @__PURE__ */ w("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl motion-safe:animate-vc-glow-pulse" }), /* @__PURE__ */ w(b, {
26
+ children: [/* @__PURE__ */ y("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl motion-safe:animate-vc-glow-pulse" }), /* @__PURE__ */ y(h, {
27
27
  size: 48,
28
28
  className: "relative animate-spin text-primary"
29
29
  })]
30
- }), /* @__PURE__ */ w("span", {
30
+ }), /* @__PURE__ */ y("span", {
31
31
  className: "mt-6 text-sm font-medium text-text-secondary",
32
32
  children: "Loading provider details…"
33
33
  })]
34
34
  });
35
- if (H || !B) return /* @__PURE__ */ w("div", {
35
+ if (B || !R) return /* @__PURE__ */ y("div", {
36
36
  className: "p-6 max-w-4xl mx-auto",
37
- children: /* @__PURE__ */ T("div", {
37
+ children: /* @__PURE__ */ b("div", {
38
38
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
39
- children: [/* @__PURE__ */ w(m, {
39
+ children: [/* @__PURE__ */ y(oe, {
40
40
  size: 24,
41
41
  className: "text-status-error-text flex-shrink-0"
42
- }), /* @__PURE__ */ T("div", {
42
+ }), /* @__PURE__ */ b("div", {
43
43
  className: "flex-1",
44
44
  children: [
45
- /* @__PURE__ */ w("h3", {
45
+ /* @__PURE__ */ y("h3", {
46
46
  className: "font-semibold text-status-error-text mb-1",
47
47
  children: "Provider not found"
48
48
  }),
49
- /* @__PURE__ */ w("p", {
49
+ /* @__PURE__ */ y("p", {
50
50
  className: "text-sm text-status-error-text mb-3",
51
- children: H?.message || "The requested provider could not be loaded."
51
+ children: B?.message || "The requested provider could not be loaded."
52
52
  }),
53
- /* @__PURE__ */ T("div", {
53
+ /* @__PURE__ */ b("div", {
54
54
  className: "flex gap-2",
55
- children: [/* @__PURE__ */ T("button", {
55
+ children: [/* @__PURE__ */ b("button", {
56
56
  type: "button",
57
- onClick: () => U(),
57
+ onClick: () => V(),
58
58
  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",
59
- children: [/* @__PURE__ */ w(oe, { size: 14 }), "Try Again"]
60
- }), /* @__PURE__ */ T("button", {
59
+ children: [/* @__PURE__ */ y(ue, { size: 14 }), "Try Again"]
60
+ }), /* @__PURE__ */ b("button", {
61
61
  type: "button",
62
- onClick: () => P?.(i(N, "providers")),
62
+ onClick: () => M?.(n(j, "providers")),
63
63
  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",
64
- children: [/* @__PURE__ */ w(h, { size: 14 }), "Back to Catalog"]
64
+ children: [/* @__PURE__ */ y(d, { size: 14 }), "Back to Catalog"]
65
65
  })]
66
66
  })
67
67
  ]
68
68
  })]
69
69
  })
70
70
  });
71
- let $ = () => {
72
- R(B.id);
73
- }, ye = (e) => {
74
- F?.(e), P?.(i(N, `connections/${e.id}`));
75
- }, be = async () => {
76
- B && (B.isEnabled ? await fe(B.id) : await ue(B.id), await U());
77
- }, xe = async () => {
78
- B && Y(!0);
79
- }, Se = async () => {
80
- B && (await me(B.id), Y(!1), P?.(i(N, "providers")));
81
- };
82
- return /* @__PURE__ */ T("div", {
71
+ let Z = () => {
72
+ I(R.id);
73
+ }, we = (e) => {
74
+ N?.(e), M?.(n(j, `connections/${e.id}`));
75
+ }, Q = async () => {
76
+ R && (R.isEnabled ? await _e(R.id) : await he(R.id), await V());
77
+ }, Te = async () => {
78
+ R && q(!0);
79
+ }, Ee = async () => {
80
+ R && (await ye(R.id), q(!1), M?.(n(j, "providers")));
81
+ }, De = () => {
82
+ M?.(n(j, `providers/${R.id}/edit`));
83
+ }, $ = J && R.pluginStatus === "installed" && R.isEnabled, Oe = (H ?? []).length > 0, ke = [
84
+ ...$ ? [{
85
+ id: "connect",
86
+ label: `Connect ${R.name}`,
87
+ description: `Authenticate once to create a reusable connection to ${R.name}.`,
88
+ icon: /* @__PURE__ */ y(_, { size: 16 }),
89
+ onClick: Z,
90
+ done: Oe
91
+ }] : [],
92
+ ...R.docsUrl ? [{
93
+ id: "docs",
94
+ label: "Read the provider documentation",
95
+ description: `Learn how ${R.name} works and what credentials you will need.`,
96
+ icon: /* @__PURE__ */ y(f, { size: 16 }),
97
+ href: R.docsUrl
98
+ }] : [],
99
+ {
100
+ id: "browse",
101
+ label: "Browse other providers",
102
+ description: "Return to the catalog to discover more services you can integrate.",
103
+ icon: /* @__PURE__ */ y(g, { size: 16 }),
104
+ onClick: () => M?.(n(j, "providers"))
105
+ }
106
+ ];
107
+ return /* @__PURE__ */ b("div", {
83
108
  className: "space-y-6 p-6 max-w-5xl mx-auto",
84
109
  children: [
85
- /* @__PURE__ */ w("div", {
110
+ /* @__PURE__ */ y("div", {
86
111
  className: "rounded-xl border border-border-seam bg-accent-wash p-6",
87
- children: /* @__PURE__ */ T("div", {
112
+ children: /* @__PURE__ */ b("div", {
88
113
  className: "flex items-center gap-4",
89
114
  children: [
90
- /* @__PURE__ */ w(E, {
115
+ /* @__PURE__ */ y(x, {
91
116
  variant: "ghost",
92
117
  size: "icon",
93
- onClick: () => P?.(i(N, "providers")),
118
+ onClick: () => M?.(n(j, "providers")),
94
119
  "aria-label": "Back to catalog",
95
- children: /* @__PURE__ */ w(h, { size: 20 })
120
+ children: /* @__PURE__ */ y(d, { size: 20 })
96
121
  }),
97
- /* @__PURE__ */ w(ee, {
98
- provider: B,
122
+ /* @__PURE__ */ y(l, {
123
+ provider: R,
99
124
  size: 56
100
125
  }),
101
- /* @__PURE__ */ T("div", {
126
+ /* @__PURE__ */ b("div", {
102
127
  className: "flex-1",
103
- children: [/* @__PURE__ */ T("div", {
128
+ children: [/* @__PURE__ */ b("div", {
104
129
  className: "flex items-center gap-3",
105
- children: [/* @__PURE__ */ w("h1", {
130
+ children: [/* @__PURE__ */ y("h1", {
106
131
  className: "text-2xl sm:text-3xl font-bold text-text-primary",
107
- children: B.name
108
- }), B.isBuiltIn && /* @__PURE__ */ w("span", {
132
+ children: R.name
133
+ }), R.isBuiltIn && /* @__PURE__ */ y("span", {
109
134
  className: "text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default",
110
135
  children: "Built-in"
111
136
  })]
112
- }), /* @__PURE__ */ w("p", {
137
+ }), /* @__PURE__ */ y("p", {
113
138
  className: "text-sm text-text-secondary mt-1",
114
- children: B.description
139
+ children: R.description
115
140
  })]
116
141
  }),
117
- X && B.pluginStatus === "installed" && B.isEnabled && /* @__PURE__ */ T(E, {
118
- onClick: $,
119
- children: [/* @__PURE__ */ w(x, { size: 16 }), "Create Connection"]
142
+ J && R.pluginStatus === "installed" && R.isEnabled && /* @__PURE__ */ b(x, {
143
+ onClick: Z,
144
+ children: [/* @__PURE__ */ y(_, { size: 16 }), "Create Connection"]
120
145
  })
121
146
  ]
122
147
  })
123
148
  }),
124
- /* @__PURE__ */ T("div", {
149
+ /* @__PURE__ */ b(D, {
150
+ icon: /* @__PURE__ */ y(g, { size: 16 }),
151
+ children: [
152
+ "This is the ",
153
+ R.name,
154
+ " provider — the platform's blueprint for talking to",
155
+ " ",
156
+ R.name,
157
+ ". Here you can see how it authenticates, which features and scopes it supports, and the connections your workspace has created with it. Create a connection to start using ",
158
+ R.name,
159
+ " in your apps."
160
+ ]
161
+ }),
162
+ ($ || R.docsUrl) && /* @__PURE__ */ y(E, {
163
+ storageKey: "integrations-provider-detail",
164
+ steps: ke
165
+ }),
166
+ /* @__PURE__ */ b("div", {
125
167
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
126
- children: [/* @__PURE__ */ T(k, {
168
+ children: [/* @__PURE__ */ b(w, {
127
169
  className: "border-border-seam p-5 space-y-4",
128
- children: [/* @__PURE__ */ T("h2", {
170
+ children: [/* @__PURE__ */ b("h2", {
129
171
  className: "font-semibold text-text-primary flex items-center gap-2",
130
- children: [/* @__PURE__ */ w(re, {
172
+ children: [/* @__PURE__ */ y(g, {
131
173
  size: 18,
132
174
  className: "text-primary"
133
175
  }), "Provider Details"]
134
- }), /* @__PURE__ */ T("div", {
176
+ }), /* @__PURE__ */ b("div", {
135
177
  className: "space-y-3",
136
178
  children: [
137
- /* @__PURE__ */ T("div", {
179
+ /* @__PURE__ */ b("div", {
138
180
  className: "flex items-center justify-between py-2 border-b border-border-seam",
139
- children: [/* @__PURE__ */ w("span", {
181
+ children: [/* @__PURE__ */ y("span", {
140
182
  className: "text-sm text-text-secondary",
141
183
  children: "Category"
142
- }), /* @__PURE__ */ w("span", {
184
+ }), /* @__PURE__ */ y("span", {
143
185
  className: "text-sm font-medium text-text-primary",
144
- children: o(B.category)
186
+ children: r(R.category)
145
187
  })]
146
188
  }),
147
- /* @__PURE__ */ T("div", {
189
+ /* @__PURE__ */ b("div", {
148
190
  className: "flex items-center justify-between py-2 border-b border-border-seam",
149
- children: [/* @__PURE__ */ w("span", {
191
+ children: [/* @__PURE__ */ y("span", {
150
192
  className: "text-sm text-text-secondary",
151
193
  children: "Auth Type"
152
- }), /* @__PURE__ */ w("span", {
194
+ }), /* @__PURE__ */ y("span", {
153
195
  className: "text-sm font-medium text-text-primary",
154
- children: a(B.authType)
196
+ children: ne(R.authType)
155
197
  })]
156
198
  }),
157
- /* @__PURE__ */ T("div", {
199
+ /* @__PURE__ */ b("div", {
158
200
  className: "flex items-center justify-between py-2 border-b border-border-seam",
159
- children: [/* @__PURE__ */ w("span", {
201
+ children: [/* @__PURE__ */ y("span", {
160
202
  className: "text-sm text-text-secondary",
161
203
  children: "Plugin Version"
162
- }), /* @__PURE__ */ w("span", {
204
+ }), /* @__PURE__ */ y("span", {
163
205
  className: "text-sm font-mono text-text-primary",
164
- children: B.pluginVersion
206
+ children: R.pluginVersion
165
207
  })]
166
208
  }),
167
- /* @__PURE__ */ T("div", {
209
+ /* @__PURE__ */ b("div", {
168
210
  className: "flex items-center justify-between py-2 border-b border-border-seam",
169
- children: [/* @__PURE__ */ w("span", {
211
+ children: [/* @__PURE__ */ y("span", {
170
212
  className: "text-sm text-text-secondary",
171
213
  children: "Author"
172
- }), /* @__PURE__ */ w("span", {
214
+ }), /* @__PURE__ */ y("span", {
173
215
  className: "text-sm font-medium text-text-primary",
174
- children: B.pluginAuthor || "-"
216
+ children: R.pluginAuthor || "-"
175
217
  })]
176
218
  }),
177
- /* @__PURE__ */ T("div", {
219
+ /* @__PURE__ */ b("div", {
178
220
  className: "flex items-center justify-between py-2 border-b border-border-seam",
179
- children: [/* @__PURE__ */ w("span", {
221
+ children: [/* @__PURE__ */ y("span", {
180
222
  className: "text-sm text-text-secondary",
181
223
  children: "Connections"
182
- }), /* @__PURE__ */ w("span", {
224
+ }), /* @__PURE__ */ y("span", {
183
225
  className: "text-sm font-medium text-text-primary",
184
- children: B.connectionCount
226
+ children: R.connectionCount
185
227
  })]
186
228
  }),
187
- /* @__PURE__ */ T("div", {
229
+ /* @__PURE__ */ b("div", {
188
230
  className: "flex items-center justify-between py-2",
189
- children: [/* @__PURE__ */ w("span", {
231
+ children: [/* @__PURE__ */ y("span", {
190
232
  className: "text-sm text-text-secondary",
191
233
  children: "Status"
192
- }), /* @__PURE__ */ w("span", {
193
- className: t("text-sm font-medium px-2 py-0.5 rounded-full", B.isEnabled ? "text-status-success-text bg-status-success-bg-subtle" : "text-text-secondary bg-bg-sunken"),
194
- children: B.isEnabled ? "Enabled" : "Disabled"
234
+ }), /* @__PURE__ */ y("span", {
235
+ className: ee("text-sm font-medium px-2 py-0.5 rounded-full", R.isEnabled ? "text-status-success-text bg-status-success-bg-subtle" : "text-text-secondary bg-bg-sunken"),
236
+ children: R.isEnabled ? "Enabled" : "Disabled"
195
237
  })]
196
238
  })
197
239
  ]
198
240
  })]
199
- }), /* @__PURE__ */ T("div", {
241
+ }), /* @__PURE__ */ b("div", {
200
242
  className: "space-y-4",
201
243
  children: [
202
- /* @__PURE__ */ T(k, {
244
+ /* @__PURE__ */ b(w, {
203
245
  className: "border-border-seam p-5",
204
- children: [/* @__PURE__ */ T("h2", {
246
+ children: [/* @__PURE__ */ b("h2", {
205
247
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
206
- children: [/* @__PURE__ */ w(ce, {
248
+ children: [/* @__PURE__ */ y(fe, {
207
249
  size: 18,
208
250
  className: "text-primary"
209
251
  }), "Supported Features"]
210
- }), B.supportedFeatures.length > 0 ? /* @__PURE__ */ w(A, {
252
+ }), R.supportedFeatures.length > 0 ? /* @__PURE__ */ y(O, {
211
253
  collapsedHeight: 88,
212
254
  label: "Show all features",
213
- children: /* @__PURE__ */ w("div", {
255
+ children: /* @__PURE__ */ y("div", {
214
256
  className: "flex flex-wrap gap-2",
215
- children: B.supportedFeatures.map((e) => /* @__PURE__ */ w("span", {
257
+ children: R.supportedFeatures.map((e) => /* @__PURE__ */ y("span", {
216
258
  className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary",
217
259
  children: e
218
260
  }, e))
219
261
  })
220
- }) : /* @__PURE__ */ w("p", {
262
+ }) : /* @__PURE__ */ y("p", {
221
263
  className: "text-sm text-text-secondary",
222
264
  children: "No specific features listed."
223
265
  })]
224
266
  }),
225
- /* @__PURE__ */ T(k, {
267
+ /* @__PURE__ */ b(w, {
226
268
  className: "border-border-seam p-5",
227
- children: [/* @__PURE__ */ T("h2", {
269
+ children: [/* @__PURE__ */ b("h2", {
228
270
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
229
- children: [/* @__PURE__ */ w(v, {
271
+ children: [/* @__PURE__ */ y(m, {
230
272
  size: 18,
231
273
  className: "text-primary"
232
274
  }), "Links"]
233
- }), /* @__PURE__ */ T("div", {
275
+ }), /* @__PURE__ */ b("div", {
234
276
  className: "space-y-2",
235
- children: [B.website && /* @__PURE__ */ T("a", {
236
- href: B.website,
277
+ children: [R.website && /* @__PURE__ */ b("a", {
278
+ href: R.website,
237
279
  target: "_blank",
238
280
  rel: "noopener noreferrer",
239
281
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
240
- children: [/* @__PURE__ */ w(v, { size: 14 }), "Website"]
241
- }), B.docsUrl && /* @__PURE__ */ T("a", {
242
- href: B.docsUrl,
282
+ children: [/* @__PURE__ */ y(m, { size: 14 }), "Website"]
283
+ }), R.docsUrl && /* @__PURE__ */ b("a", {
284
+ href: R.docsUrl,
243
285
  target: "_blank",
244
286
  rel: "noopener noreferrer",
245
287
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
246
- children: [/* @__PURE__ */ w(g, { size: 14 }), "Documentation"]
288
+ children: [/* @__PURE__ */ y(f, { size: 14 }), "Documentation"]
247
289
  })]
248
290
  })]
249
291
  }),
250
- M && /* @__PURE__ */ T(k, {
292
+ A && /* @__PURE__ */ b(w, {
251
293
  className: "border-border-seam p-5",
252
- children: [/* @__PURE__ */ T("h2", {
294
+ children: [/* @__PURE__ */ b("h2", {
253
295
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
254
- children: [/* @__PURE__ */ w(se, {
296
+ children: [/* @__PURE__ */ y(de, {
255
297
  size: 18,
256
298
  className: "text-primary"
257
299
  }), "Plugin Management"]
258
- }), /* @__PURE__ */ w(D, {
300
+ }), /* @__PURE__ */ y(S, {
259
301
  align: "start",
260
- primary: Z ? {
302
+ primary: Y ? {
261
303
  label: "Edit",
262
- onSelect: () => {
263
- P?.(i(N, `providers/${B.id}/edit`));
264
- },
265
- icon: /* @__PURE__ */ w(ie, { size: 14 })
304
+ onSelect: De,
305
+ icon: /* @__PURE__ */ y(ce, { size: 14 })
266
306
  } : void 0,
267
307
  actions: [
268
- ...Z && B.pluginStatus === "installed" ? [{
269
- label: B.isEnabled ? "Disable" : "Enable",
308
+ ...Y && R.pluginStatus === "installed" ? [{
309
+ label: R.isEnabled ? "Disable" : "Enable",
270
310
  onSelect: () => {
271
- be();
311
+ Q();
272
312
  },
273
- disabled: Q,
274
- icon: /* @__PURE__ */ w(ae, { size: 14 })
313
+ disabled: X,
314
+ icon: /* @__PURE__ */ y(le, { size: 14 })
275
315
  }] : [],
276
- ...ge && B.pluginStatus === "available" ? [{
316
+ ...xe && R.pluginStatus === "available" ? [{
277
317
  label: "Install Plugin",
278
318
  onSelect: () => {},
279
- icon: /* @__PURE__ */ w(_, { size: 14 })
319
+ icon: /* @__PURE__ */ y(p, { size: 14 })
280
320
  }] : [],
281
- ...Z && B.pluginStatus === "update_available" ? [{
321
+ ...Y && R.pluginStatus === "update_available" ? [{
282
322
  label: "Update Available",
283
323
  onSelect: () => {},
284
- icon: /* @__PURE__ */ w(_, { size: 14 })
324
+ icon: /* @__PURE__ */ y(p, { size: 14 })
285
325
  }] : [],
286
- ..._e && B.pluginStatus === "installed" ? [{
326
+ ...Se && R.pluginStatus === "installed" ? [{
287
327
  label: "Uninstall",
288
328
  onSelect: () => {
289
- xe();
329
+ Te();
290
330
  },
291
331
  intent: "destructive",
292
- disabled: Q || B.isBuiltIn,
293
- icon: /* @__PURE__ */ w(S, { size: 14 })
332
+ disabled: X || R.isBuiltIn,
333
+ icon: /* @__PURE__ */ y(v, { size: 14 })
294
334
  }] : []
295
335
  ]
296
336
  })]
@@ -298,99 +338,80 @@ function j() {
298
338
  ]
299
339
  })]
300
340
  }),
301
- /* @__PURE__ */ T(O, {
341
+ /* @__PURE__ */ b(C, {
302
342
  className: "overflow-hidden p-0",
303
343
  children: [
304
- /* @__PURE__ */ T("div", {
344
+ /* @__PURE__ */ b("div", {
305
345
  className: "flex items-center justify-between p-5 border-b border-border-seam",
306
- children: [/* @__PURE__ */ T("div", {
346
+ children: [/* @__PURE__ */ b("div", {
307
347
  className: "flex items-center gap-2",
308
- children: [/* @__PURE__ */ w(y, {
348
+ children: [/* @__PURE__ */ y(se, {
309
349
  size: 18,
310
350
  className: "text-primary"
311
- }), /* @__PURE__ */ T("h2", {
351
+ }), /* @__PURE__ */ b("h2", {
312
352
  className: "font-semibold text-text-primary",
313
353
  children: [
314
354
  "Connections (",
315
- (W ?? []).length,
355
+ (H ?? []).length,
316
356
  ")"
317
357
  ]
318
358
  })]
319
- }), X && B.pluginStatus === "installed" && B.isEnabled && /* @__PURE__ */ T(E, {
359
+ }), J && R.pluginStatus === "installed" && R.isEnabled && /* @__PURE__ */ b(x, {
320
360
  size: "sm",
321
- onClick: $,
322
- children: [/* @__PURE__ */ w(x, { size: 14 }), "Add"]
361
+ onClick: Z,
362
+ children: [/* @__PURE__ */ y(_, { size: 14 }), "Add"]
323
363
  })]
324
364
  }),
325
- G && /* @__PURE__ */ w("div", {
365
+ U && /* @__PURE__ */ y("div", {
326
366
  className: "flex items-center justify-center py-12",
327
- children: /* @__PURE__ */ w(b, {
367
+ children: /* @__PURE__ */ y(h, {
328
368
  size: 24,
329
369
  className: "animate-spin text-text-secondary"
330
370
  })
331
371
  }),
332
- !G && (W ?? []).length === 0 && /* @__PURE__ */ T("div", {
333
- className: "flex flex-col items-center justify-center py-12 px-6 text-center",
334
- children: [
335
- /* @__PURE__ */ w("div", {
336
- className: "p-4 rounded-full bg-bg-sunken/50 mb-4",
337
- children: /* @__PURE__ */ w(y, {
338
- size: 32,
339
- className: "text-text-secondary"
340
- })
341
- }),
342
- /* @__PURE__ */ w("h3", {
343
- className: "font-semibold text-text-primary mb-1",
344
- children: "No connections yet"
345
- }),
346
- /* @__PURE__ */ T("p", {
347
- className: "text-sm text-text-secondary mb-4 max-w-sm",
348
- children: [
349
- "Create a connection to start using ",
350
- B.name,
351
- " in your workspace."
352
- ]
353
- }),
354
- X && B.pluginStatus === "installed" && B.isEnabled && /* @__PURE__ */ T(E, {
355
- onClick: $,
356
- children: [/* @__PURE__ */ w(x, { size: 16 }), "Create Connection"]
357
- })
358
- ]
372
+ !U && (H ?? []).length === 0 && /* @__PURE__ */ y(T, {
373
+ illustration: "empty-data",
374
+ title: "No connections yet",
375
+ description: `Create a connection to start using ${R.name} in your workspace.`,
376
+ action: $ ? /* @__PURE__ */ b(x, {
377
+ onClick: Z,
378
+ children: [/* @__PURE__ */ y(_, { size: 16 }), "Create Connection"]
379
+ }) : void 0
359
380
  }),
360
- !G && (W ?? []).length > 0 && /* @__PURE__ */ w("div", {
381
+ !U && (H ?? []).length > 0 && /* @__PURE__ */ y("div", {
361
382
  className: "p-4 space-y-3",
362
- children: (W ?? []).map((e) => /* @__PURE__ */ w(p, {
383
+ children: (H ?? []).map((e) => /* @__PURE__ */ y(re, {
363
384
  connection: e,
364
385
  displayMode: "list",
365
- onClick: ye
386
+ onClick: we
366
387
  }, e.id))
367
388
  })
368
389
  ]
369
390
  }),
370
- /* @__PURE__ */ w(f, {
371
- open: I,
372
- onClose: z,
373
- preselectedProviderId: L,
391
+ /* @__PURE__ */ y(u, {
392
+ open: P,
393
+ onClose: L,
394
+ preselectedProviderId: F,
374
395
  onConnectionCreated: () => {
375
- U();
396
+ V();
376
397
  }
377
398
  }),
378
- /* @__PURE__ */ w(te, {
379
- open: he,
380
- title: `Uninstall ${B.name}`,
399
+ /* @__PURE__ */ y(ie, {
400
+ open: be,
401
+ title: `Uninstall ${R.name}`,
381
402
  description: "Existing active connections must be removed first. This action is only available in admin mode.",
382
403
  confirmLabel: "Uninstall",
383
404
  cancelLabel: "Cancel",
384
405
  destructive: !0,
385
- loading: K,
386
- icon: /* @__PURE__ */ w(S, { size: 20 }),
387
- onConfirm: Se,
388
- onCancel: () => Y(!1)
406
+ loading: W,
407
+ icon: /* @__PURE__ */ y(v, { size: 20 }),
408
+ onConfirm: Ee,
409
+ onCancel: () => q(!1)
389
410
  })
390
411
  ]
391
412
  });
392
413
  }
393
414
  //#endregion
394
- export { j as ProviderDetail };
415
+ export { k as ProviderDetail };
395
416
 
396
417
  //# sourceMappingURL=ProviderDetail.js.map