@burdenoff/microfe-botmanor 2026.1120.3 → 2026.1120.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.
Files changed (30) hide show
  1. package/dist/botlit/components/BucketDialogs.d.ts +40 -0
  2. package/dist/botlit/components/BucketDialogs.js +258 -0
  3. package/dist/botlit/components/BucketDialogs.js.map +1 -0
  4. package/dist/botlit/components/StoreDialogs.d.ts +33 -0
  5. package/dist/botlit/components/StoreDialogs.js +139 -0
  6. package/dist/botlit/components/StoreDialogs.js.map +1 -0
  7. package/dist/botlit/hooks/index.d.ts +3 -3
  8. package/dist/botlit/hooks/index.js +6 -6
  9. package/dist/botlit/hooks/useBuckets.d.ts +48 -15
  10. package/dist/botlit/hooks/useBuckets.js +128 -85
  11. package/dist/botlit/hooks/useBuckets.js.map +1 -1
  12. package/dist/botlit/hooks/useStore.d.ts +4 -0
  13. package/dist/botlit/hooks/useStore.js +87 -60
  14. package/dist/botlit/hooks/useStore.js.map +1 -1
  15. package/dist/botlit/pages/BucketDetailPage.js +283 -209
  16. package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
  17. package/dist/botlit/pages/BucketsPage.js +413 -545
  18. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  19. package/dist/botlit/pages/InstalledPackagesPage.js +275 -275
  20. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  21. package/dist/botlit/pages/StorePackageDetailPage.js +165 -257
  22. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  23. package/dist/botlit/pages/StorePage.js +179 -184
  24. package/dist/botlit/pages/StorePage.js.map +1 -1
  25. package/dist/generated/wspace-operations.d.ts +216 -0
  26. package/dist/generated/wspace-operations.js +162 -93
  27. package/dist/generated/wspace-operations.js.map +1 -1
  28. package/dist/generated/wspace-types.d.ts +49 -0
  29. package/dist/generated/wspace-types.js.map +1 -1
  30. package/package.json +1 -1
@@ -1,251 +1,325 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
- import { useBots as t } from "../hooks/useBots.js";
3
- import { useAgents as n } from "../hooks/useAgents.js";
4
- import { PageLayout as r } from "../components/PageLayout.js";
2
+ import { PageLayout as t } from "../components/PageLayout.js";
3
+ import { useBots as n } from "../hooks/useBots.js";
4
+ import { useAgents as r } from "../hooks/useAgents.js";
5
5
  import { Card as i, CardContent as a, CardDescription as o, CardHeader as s, CardTitle as c } from "../components/Card.js";
6
- import { Button as l } from "../components/Button.js";
7
- import { EmptyState as u } from "../components/EmptyState.js";
8
- import { ErrorState as d } from "../components/ErrorState.js";
9
- import { StatusBadge as f } from "../components/Badge.js";
6
+ import { BOTMANOR_PERMISSIONS as l } from "../permissions/botmanorPermissions.js";
7
+ import { BotmanorPermissionGate as u } from "../permissions/useBotmanorPermissions.js";
8
+ import { Button as d } from "../components/Button.js";
9
+ import { EmptyState as ee } from "../components/EmptyState.js";
10
+ import { ErrorState as f } from "../components/ErrorState.js";
11
+ import { LoadMore as p } from "../components/LoadMore.js";
12
+ import { BucketFormDialog as m, DeleteBucketDialog as h } from "../components/BucketDialogs.js";
13
+ import "../permissions/index.js";
14
+ import { useTr as g } from "../../shared/hooks/useTr.js";
15
+ import { StatusBadge as _ } from "../components/Badge.js";
16
+ import { useChannelConnectors as v } from "../hooks/useChannels.js";
17
+ import { usePolicies as te } from "../hooks/usePolicies.js";
18
+ import { useBucket as y, useChildBuckets as ne, useDeleteBucket as re, useUpdateBucket as ie } from "../hooks/useBuckets.js";
10
19
  import "../hooks/index.js";
11
- import { useChannelConnectors as p } from "../hooks/useChannels.js";
12
- import { usePolicies as m } from "../hooks/usePolicies.js";
13
- import { useBucket as h, useChildBuckets as g } from "../hooks/useBuckets.js";
14
- import { formatRelativeTime as _ } from "../utils/formatters.js";
15
- import { PagePurpose as v } from "@burdenoff/fe-libs/ui";
16
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
17
- import { Link as x, useParams as S } from "react-router";
18
- import { ArrowLeft as C, Bot as w, Folder as T, FolderOpen as E, MessageSquare as D, Shield as O, Users as k } from "lucide-react";
20
+ import { formatRelativeTime as ae } from "../utils/formatters.js";
21
+ import { useState as b } from "react";
22
+ import { PagePurpose as oe } from "@burdenoff/fe-libs/ui";
23
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
24
+ import { Link as w, useNavigate as se, useParams as T } from "react-router";
25
+ import { ArrowLeft as E, Bot as D, Folder as O, FolderOpen as ce, MessageSquare as le, Pencil as ue, Shield as k, Trash2 as A, Users as j } from "lucide-react";
26
+ import { toast as M } from "sonner";
19
27
  // src/botlit/pages/BucketDetailPage.tsx
20
- var A = ({ title: e, icon: t, loading: n, error: r, onRetry: o, children: l }) => /* @__PURE__ */ b(i, { children: [/* @__PURE__ */ y(s, { children: /* @__PURE__ */ b(c, {
28
+ var N = ({ title: e, icon: t, loading: n, error: r, onRetry: o, children: l }) => /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, {
21
29
  className: "flex items-center gap-2",
22
30
  children: [t, e]
23
- }) }), /* @__PURE__ */ y(a, { children: n ? /* @__PURE__ */ y("div", {
31
+ }) }), /* @__PURE__ */ S(a, { children: n ? /* @__PURE__ */ S("div", {
24
32
  className: "space-y-2",
25
- children: [1, 2].map((e) => /* @__PURE__ */ y("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
26
- }) : r ? /* @__PURE__ */ y(d, {
33
+ children: [1, 2].map((e) => /* @__PURE__ */ S("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
34
+ }) : r ? /* @__PURE__ */ S(f, {
27
35
  resource: e.toLowerCase(),
28
36
  error: r,
29
37
  onRetry: () => void o()
30
- }) : l })] }), j = () => {
31
- let { bucketId: j } = S(), { getPath: M } = e(), { data: N, loading: P, error: F, refetch: I } = h(j), { data: L, loading: R, error: z, refetch: B } = g(N?.id), V = h(N?.parentBucketId ?? void 0), H = n(N?.id ? { bucketId: N.id } : void 0), U = t(N?.id ? { bucketId: N.id } : void 0), W = p(N?.id ? { bucketId: N.id } : void 0), G = m(N?.id ? { bucketId: N.id } : void 0);
32
- if (P) return /* @__PURE__ */ y(r, {
38
+ }) : l })] }), P = () => {
39
+ let { bucketId: P } = T(), { getPath: F } = e(), I = se(), L = g(), [R, z] = b(!1), [B, V] = b(!1), [H, U] = ie(), [de, fe] = re(), { data: W, loading: pe, error: G, refetch: K } = y(P), { data: me, loading: he, error: q, refetch: ge, hasMore: _e, loadingMore: ve, loadMore: ye } = ne(W?.id), J = y(W?.parentBucketId ?? void 0), Y = r(W?.id ? { bucketId: W.id } : void 0), X = n(W?.id ? { bucketId: W.id } : void 0), Z = v(W?.id ? { bucketId: W.id } : void 0), Q = te(W?.id ? { bucketId: W.id } : void 0);
40
+ if (pe) return /* @__PURE__ */ S(t, {
33
41
  title: "Bucket",
34
- children: /* @__PURE__ */ y("div", {
42
+ children: /* @__PURE__ */ S("div", {
35
43
  className: "space-y-4",
36
44
  children: [
37
45
  1,
38
46
  2,
39
47
  3
40
- ].map((e) => /* @__PURE__ */ y("div", { className: "h-24 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
48
+ ].map((e) => /* @__PURE__ */ S("div", { className: "h-24 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
41
49
  })
42
50
  });
43
- if (F) return /* @__PURE__ */ y(r, {
51
+ if (G) return /* @__PURE__ */ S(t, {
44
52
  title: "Bucket",
45
- children: /* @__PURE__ */ y(d, {
53
+ children: /* @__PURE__ */ S(f, {
46
54
  resource: "bucket",
47
- error: F,
48
- onRetry: () => void I()
55
+ error: G,
56
+ onRetry: () => void K()
49
57
  })
50
58
  });
51
- if (!N) return /* @__PURE__ */ y(r, {
59
+ if (!W) return /* @__PURE__ */ S(t, {
52
60
  title: "Bucket not found",
53
- children: /* @__PURE__ */ y(u, {
61
+ children: /* @__PURE__ */ S(ee, {
54
62
  illustration: "empty-search",
55
63
  title: "Bucket not found",
56
64
  description: "This bucket may have been deleted, or the link is out of date.",
57
- action: /* @__PURE__ */ y(l, {
58
- leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
59
- children: /* @__PURE__ */ y(x, {
60
- to: M("buckets"),
65
+ action: /* @__PURE__ */ S(d, {
66
+ leftIcon: /* @__PURE__ */ S(E, { size: 16 }),
67
+ children: /* @__PURE__ */ S(w, {
68
+ to: F("buckets"),
61
69
  children: "Back to Buckets"
62
70
  })
63
71
  })
64
72
  })
65
73
  });
66
- let K = N.metadata && typeof N.metadata.visibility == "string" ? N.metadata.visibility : null, q = L;
67
- return /* @__PURE__ */ y(r, {
68
- title: N.name,
69
- description: N.path,
70
- actions: /* @__PURE__ */ y(l, {
71
- variant: "outline",
72
- leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
73
- children: /* @__PURE__ */ y(x, {
74
- to: M("buckets"),
75
- children: "Back to Buckets"
76
- })
77
- }),
78
- children: /* @__PURE__ */ b("div", {
79
- className: "space-y-6",
74
+ let be = W.metadata && typeof W.metadata.visibility == "string" ? W.metadata.visibility : null, $ = me.filter((e) => e.id !== W.id), xe = async (e) => {
75
+ try {
76
+ await H({
77
+ bucketId: W.id,
78
+ input: {
79
+ name: e.name,
80
+ description: e.description,
81
+ ...e.parentBucketId === (W.parentBucketId ?? null) ? {} : { parentBucketId: e.parentBucketId }
82
+ }
83
+ });
84
+ } catch (e) {
85
+ return M.error(e instanceof Error ? e.message : L("botlit.buckets.toast.updateFailed", "Could not save the bucket.")), !1;
86
+ }
87
+ return M.success(L("botlit.buckets.toast.updated", "Bucket \"{{name}}\" saved", { name: e.name })), K(), !0;
88
+ }, Se = async () => {
89
+ try {
90
+ await de(W.id);
91
+ } catch (e) {
92
+ M.error(e instanceof Error ? e.message : L("botlit.buckets.toast.deleteFailed", "Could not delete the bucket."));
93
+ return;
94
+ }
95
+ M.success(L("botlit.buckets.toast.deleted", "Bucket \"{{name}}\" deleted", { name: W.name })), V(!1), I(F("buckets"));
96
+ };
97
+ return /* @__PURE__ */ C(t, {
98
+ title: W.name,
99
+ description: W.path,
100
+ actions: /* @__PURE__ */ C("div", {
101
+ className: "flex flex-wrap gap-2",
80
102
  children: [
81
- /* @__PURE__ */ y(v, {
82
- icon: /* @__PURE__ */ y(T, { size: 18 }),
83
- children: "Buckets group your agents, bots, channels and policies. This bucket contains its sub-buckets and every resource assigned to it, inherited down the hierarchy."
103
+ /* @__PURE__ */ S(d, {
104
+ variant: "outline",
105
+ leftIcon: /* @__PURE__ */ S(E, { size: 16 }),
106
+ children: /* @__PURE__ */ S(w, {
107
+ to: F("buckets"),
108
+ children: "Back to Buckets"
109
+ })
110
+ }),
111
+ /* @__PURE__ */ S(u, {
112
+ permission: l.BUCKET_UPDATE,
113
+ children: /* @__PURE__ */ S(d, {
114
+ variant: "outline",
115
+ leftIcon: /* @__PURE__ */ S(ue, { size: 16 }),
116
+ onClick: () => z(!0),
117
+ children: L("botlit.buckets.detail.edit", "Edit or move")
118
+ })
84
119
  }),
85
- /* @__PURE__ */ b(i, { children: [/* @__PURE__ */ b(s, { children: [/* @__PURE__ */ y(c, { children: "Details" }), /* @__PURE__ */ y(o, { children: N.description ?? "No description" })] }), /* @__PURE__ */ y(a, { children: /* @__PURE__ */ b("dl", {
86
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
87
- children: [
88
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
89
- className: "text-xs text-text-secondary",
90
- children: "Slug"
91
- }), /* @__PURE__ */ y("dd", {
92
- className: "mt-1 text-sm font-medium",
93
- children: N.slug
94
- })] }),
95
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
96
- className: "text-xs text-text-secondary",
97
- children: "Visibility"
98
- }), /* @__PURE__ */ y("dd", {
99
- className: "mt-1 text-sm font-medium",
100
- children: K ?? "—"
101
- })] }),
102
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
103
- className: "text-xs text-text-secondary",
104
- children: "Created"
105
- }), /* @__PURE__ */ y("dd", {
106
- className: "mt-1 text-sm font-medium",
107
- children: _(N.createdAt)
108
- })] }),
109
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
110
- className: "text-xs text-text-secondary",
111
- children: "Parent bucket"
112
- }), /* @__PURE__ */ y("dd", {
113
- className: "mt-1 text-sm font-medium",
114
- children: N.parentBucketId ? V.data ? /* @__PURE__ */ y(x, {
115
- to: M(`buckets/${V.data.id}`),
116
- className: "text-primary hover:underline",
117
- children: V.data.name
118
- }) : "—" : "Top level"
119
- })] })
120
- ]
121
- }) })] }),
122
- /* @__PURE__ */ b(i, { children: [/* @__PURE__ */ b(s, { children: [/* @__PURE__ */ b(c, {
123
- className: "flex items-center gap-2",
124
- children: [/* @__PURE__ */ y(E, { size: 18 }), "Sub-buckets"]
125
- }), /* @__PURE__ */ y(o, { children: "Direct children of this bucket" })] }), /* @__PURE__ */ y(a, { children: R ? /* @__PURE__ */ y("div", {
126
- className: "space-y-2",
127
- children: [1, 2].map((e) => /* @__PURE__ */ y("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
128
- }) : z ? /* @__PURE__ */ y(d, {
129
- resource: "sub-buckets",
130
- error: z,
131
- onRetry: () => void B()
132
- }) : q.length > 0 ? /* @__PURE__ */ y("ul", {
133
- className: "divide-y divide-border-subtle",
134
- children: q.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
135
- to: M(`buckets/${e.id}`),
136
- className: "flex items-center gap-2 py-2 text-sm hover:text-primary",
120
+ /* @__PURE__ */ S(u, {
121
+ permission: l.BUCKET_DELETE,
122
+ children: /* @__PURE__ */ S(d, {
123
+ variant: "destructive",
124
+ leftIcon: /* @__PURE__ */ S(A, { size: 16 }),
125
+ onClick: () => V(!0),
126
+ children: L("botlit.buckets.detail.delete", "Delete")
127
+ })
128
+ })
129
+ ]
130
+ }),
131
+ children: [
132
+ /* @__PURE__ */ C("div", {
133
+ className: "space-y-6",
134
+ children: [
135
+ /* @__PURE__ */ S(oe, {
136
+ icon: /* @__PURE__ */ S(O, { size: 18 }),
137
+ children: L("botlit.buckets.detail.purpose", "Buckets group your agents, bots, channels and policies. This page lists this bucket’s sub-buckets and the resources assigned directly to it.")
138
+ }),
139
+ /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(c, { children: "Details" }), /* @__PURE__ */ S(o, { children: W.description ?? "No description" })] }), /* @__PURE__ */ S(a, { children: /* @__PURE__ */ C("dl", {
140
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
141
+ children: [
142
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
143
+ className: "text-xs text-text-secondary",
144
+ children: "Slug"
145
+ }), /* @__PURE__ */ S("dd", {
146
+ className: "mt-1 text-sm font-medium",
147
+ children: W.slug
148
+ })] }),
149
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
150
+ className: "text-xs text-text-secondary",
151
+ children: "Visibility"
152
+ }), /* @__PURE__ */ S("dd", {
153
+ className: "mt-1 text-sm font-medium",
154
+ children: be ?? "—"
155
+ })] }),
156
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
157
+ className: "text-xs text-text-secondary",
158
+ children: "Created"
159
+ }), /* @__PURE__ */ S("dd", {
160
+ className: "mt-1 text-sm font-medium",
161
+ children: ae(W.createdAt)
162
+ })] }),
163
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
164
+ className: "text-xs text-text-secondary",
165
+ children: "Parent bucket"
166
+ }), /* @__PURE__ */ S("dd", {
167
+ className: "mt-1 text-sm font-medium",
168
+ children: W.parentBucketId ? J.data ? /* @__PURE__ */ S(w, {
169
+ to: F(`buckets/${J.data.id}`),
170
+ className: "text-primary hover:underline",
171
+ children: J.data.name
172
+ }) : "—" : "Top level"
173
+ })] })
174
+ ]
175
+ }) })] }),
176
+ /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(c, {
177
+ className: "flex items-center gap-2",
178
+ children: [/* @__PURE__ */ S(ce, { size: 18 }), "Sub-buckets"]
179
+ }), /* @__PURE__ */ S(o, { children: "Direct children of this bucket" })] }), /* @__PURE__ */ S(a, { children: he ? /* @__PURE__ */ S("div", {
180
+ className: "space-y-2",
181
+ children: [1, 2].map((e) => /* @__PURE__ */ S("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
182
+ }) : q ? /* @__PURE__ */ S(f, {
183
+ resource: "sub-buckets",
184
+ error: q,
185
+ onRetry: () => void ge()
186
+ }) : $.length > 0 ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("ul", {
187
+ className: "divide-y divide-border-subtle",
188
+ children: $.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
189
+ to: F(`buckets/${e.id}`),
190
+ className: "flex items-center gap-2 py-2 text-sm hover:text-primary",
191
+ children: [
192
+ /* @__PURE__ */ S(O, {
193
+ size: 16,
194
+ className: "text-text-secondary"
195
+ }),
196
+ /* @__PURE__ */ S("span", {
197
+ className: "font-medium",
198
+ children: e.name
199
+ }),
200
+ /* @__PURE__ */ S("span", {
201
+ className: "text-xs text-text-secondary",
202
+ children: e.path
203
+ })
204
+ ]
205
+ }) }, e.id))
206
+ }), /* @__PURE__ */ S(p, {
207
+ hasMore: _e,
208
+ loadingMore: ve,
209
+ onLoadMore: () => void ye(),
210
+ loadedCount: $.length
211
+ })] }) : /* @__PURE__ */ S("p", {
212
+ className: "text-sm text-text-secondary",
213
+ children: "No sub-buckets."
214
+ }) })] }),
215
+ /* @__PURE__ */ C("div", {
216
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
137
217
  children: [
138
- /* @__PURE__ */ y(T, {
139
- size: 16,
140
- className: "text-text-secondary"
218
+ /* @__PURE__ */ S(N, {
219
+ title: "Agents",
220
+ icon: /* @__PURE__ */ S(D, { size: 18 }),
221
+ loading: Y.loading,
222
+ error: Y.error,
223
+ onRetry: Y.refetch,
224
+ children: Y.data.length > 0 ? /* @__PURE__ */ S("ul", {
225
+ className: "divide-y divide-border-subtle",
226
+ children: Y.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
227
+ to: F(`agents/${e.id}`),
228
+ className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
229
+ children: [/* @__PURE__ */ S("span", {
230
+ className: "font-medium",
231
+ children: e.name
232
+ }), /* @__PURE__ */ S(_, { status: e.status })]
233
+ }) }, e.id))
234
+ }) : /* @__PURE__ */ S("p", {
235
+ className: "text-sm text-text-secondary",
236
+ children: "No agents in this bucket."
237
+ })
141
238
  }),
142
- /* @__PURE__ */ y("span", {
143
- className: "font-medium",
144
- children: e.name
239
+ /* @__PURE__ */ S(N, {
240
+ title: "Bots",
241
+ icon: /* @__PURE__ */ S(j, { size: 18 }),
242
+ loading: X.loading,
243
+ error: X.error,
244
+ onRetry: X.refetch,
245
+ children: X.data.length > 0 ? /* @__PURE__ */ S("ul", {
246
+ className: "divide-y divide-border-subtle",
247
+ children: X.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
248
+ to: F(`bots/${e.id}`),
249
+ className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
250
+ children: [/* @__PURE__ */ S("span", {
251
+ className: "font-medium",
252
+ children: e.name
253
+ }), /* @__PURE__ */ S(_, { status: e.status })]
254
+ }) }, e.id))
255
+ }) : /* @__PURE__ */ S("p", {
256
+ className: "text-sm text-text-secondary",
257
+ children: "No bots in this bucket."
258
+ })
145
259
  }),
146
- /* @__PURE__ */ y("span", {
147
- className: "text-xs text-text-secondary",
148
- children: e.path
260
+ /* @__PURE__ */ S(N, {
261
+ title: "Channels",
262
+ icon: /* @__PURE__ */ S(le, { size: 18 }),
263
+ loading: Z.loading,
264
+ error: Z.error,
265
+ onRetry: Z.refetch,
266
+ children: Z.data.length > 0 ? /* @__PURE__ */ S("ul", {
267
+ className: "divide-y divide-border-subtle",
268
+ children: Z.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
269
+ to: F(`channels/${e.id}`),
270
+ className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
271
+ children: [/* @__PURE__ */ S("span", {
272
+ className: "font-medium",
273
+ children: e.name
274
+ }), /* @__PURE__ */ S(_, { status: e.status })]
275
+ }) }, e.id))
276
+ }) : /* @__PURE__ */ S("p", {
277
+ className: "text-sm text-text-secondary",
278
+ children: "No channels in this bucket."
279
+ })
280
+ }),
281
+ /* @__PURE__ */ S(N, {
282
+ title: "Policies",
283
+ icon: /* @__PURE__ */ S(k, { size: 18 }),
284
+ loading: Q.loading,
285
+ error: Q.error,
286
+ onRetry: Q.refetch,
287
+ children: Q.data.length > 0 ? /* @__PURE__ */ S("ul", {
288
+ className: "divide-y divide-border-subtle",
289
+ children: Q.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
290
+ to: F(`policies/${e.id}`),
291
+ className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
292
+ children: [/* @__PURE__ */ S("span", {
293
+ className: "font-medium",
294
+ children: e.name
295
+ }), /* @__PURE__ */ S(_, { status: e.status })]
296
+ }) }, e.id))
297
+ }) : /* @__PURE__ */ S("p", {
298
+ className: "text-sm text-text-secondary",
299
+ children: "No policies in this bucket."
300
+ })
149
301
  })
150
302
  ]
151
- }) }, e.id))
152
- }) : /* @__PURE__ */ y("p", {
153
- className: "text-sm text-text-secondary",
154
- children: "No sub-buckets."
155
- }) })] }),
156
- /* @__PURE__ */ b("div", {
157
- className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
158
- children: [
159
- /* @__PURE__ */ y(A, {
160
- title: "Agents",
161
- icon: /* @__PURE__ */ y(w, { size: 18 }),
162
- loading: H.loading,
163
- error: H.error,
164
- onRetry: H.refetch,
165
- children: H.data.length > 0 ? /* @__PURE__ */ y("ul", {
166
- className: "divide-y divide-border-subtle",
167
- children: H.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
168
- to: M(`agents/${e.id}`),
169
- className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
170
- children: [/* @__PURE__ */ y("span", {
171
- className: "font-medium",
172
- children: e.name
173
- }), /* @__PURE__ */ y(f, { status: e.status })]
174
- }) }, e.id))
175
- }) : /* @__PURE__ */ y("p", {
176
- className: "text-sm text-text-secondary",
177
- children: "No agents in this bucket."
178
- })
179
- }),
180
- /* @__PURE__ */ y(A, {
181
- title: "Bots",
182
- icon: /* @__PURE__ */ y(k, { size: 18 }),
183
- loading: U.loading,
184
- error: U.error,
185
- onRetry: U.refetch,
186
- children: U.data.length > 0 ? /* @__PURE__ */ y("ul", {
187
- className: "divide-y divide-border-subtle",
188
- children: U.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
189
- to: M(`bots/${e.id}`),
190
- className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
191
- children: [/* @__PURE__ */ y("span", {
192
- className: "font-medium",
193
- children: e.name
194
- }), /* @__PURE__ */ y(f, { status: e.status })]
195
- }) }, e.id))
196
- }) : /* @__PURE__ */ y("p", {
197
- className: "text-sm text-text-secondary",
198
- children: "No bots in this bucket."
199
- })
200
- }),
201
- /* @__PURE__ */ y(A, {
202
- title: "Channels",
203
- icon: /* @__PURE__ */ y(D, { size: 18 }),
204
- loading: W.loading,
205
- error: W.error,
206
- onRetry: W.refetch,
207
- children: W.data.length > 0 ? /* @__PURE__ */ y("ul", {
208
- className: "divide-y divide-border-subtle",
209
- children: W.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
210
- to: M(`channels/${e.id}`),
211
- className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
212
- children: [/* @__PURE__ */ y("span", {
213
- className: "font-medium",
214
- children: e.name
215
- }), /* @__PURE__ */ y(f, { status: e.status })]
216
- }) }, e.id))
217
- }) : /* @__PURE__ */ y("p", {
218
- className: "text-sm text-text-secondary",
219
- children: "No channels in this bucket."
220
- })
221
- }),
222
- /* @__PURE__ */ y(A, {
223
- title: "Policies",
224
- icon: /* @__PURE__ */ y(O, { size: 18 }),
225
- loading: G.loading,
226
- error: G.error,
227
- onRetry: G.refetch,
228
- children: G.data.length > 0 ? /* @__PURE__ */ y("ul", {
229
- className: "divide-y divide-border-subtle",
230
- children: G.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
231
- to: M(`policies/${e.id}`),
232
- className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
233
- children: [/* @__PURE__ */ y("span", {
234
- className: "font-medium",
235
- children: e.name
236
- }), /* @__PURE__ */ y(f, { status: e.status })]
237
- }) }, e.id))
238
- }) : /* @__PURE__ */ y("p", {
239
- className: "text-sm text-text-secondary",
240
- children: "No policies in this bucket."
241
- })
242
- })
243
- ]
244
- })
245
- ]
246
- })
303
+ })
304
+ ]
305
+ }),
306
+ /* @__PURE__ */ S(m, {
307
+ mode: "edit",
308
+ open: R,
309
+ bucket: W,
310
+ saving: U.loading,
311
+ onSubmit: xe,
312
+ onClose: () => z(!1)
313
+ }),
314
+ /* @__PURE__ */ S(h, {
315
+ bucket: B ? W : null,
316
+ deleting: fe.loading,
317
+ onConfirm: () => void Se(),
318
+ onClose: () => V(!1)
319
+ })
320
+ ]
247
321
  });
248
322
  };
249
- export { j as BucketDetailPage };
323
+ export { P as BucketDetailPage };
250
324
 
251
325
  //# sourceMappingURL=BucketDetailPage.js.map