@burdenoff/microfe-workspaces 2026.1125.1 → 2026.1129.1

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,75 +1,75 @@
1
- import { toast as e } from "../node_modules/sonner/dist/index.js";
2
- import { useWorkspacesContext as t } from "../providers/WorkspacesProvider.js";
3
- import { useWorkspacesPageView as n } from "../hooks/useWorkspacesPageView.js";
1
+ import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
+ import { useWorkspacesPageView as t } from "../hooks/useWorkspacesPageView.js";
4
3
  import { commitWorkspaceSelection as ee } from "../hooks/useOpenWorkspace.js";
5
4
  import { useTr as te } from "../hooks/useTr.js";
6
5
  import { useCrossWorkspaceOverview as ne, useMspOrgLinks as re, useMspOrganizationSummary as ie, useWorkspaceShares as ae } from "../hooks/useCollaboration.js";
7
6
  import { useCollaborationMutations as oe } from "../hooks/useCollaborationMutations.js";
8
- import { MspBillingMode as r, MspDelegatedScope as i, MspLinkRole as se, MspOrgLinkStatus as a, WorkspaceShareAccessLevel as o, WorkspaceShareDirection as ce, WorkspaceShareResourceType as s, WorkspaceShareStatus as le } from "../generated/wspace-types.js";
9
- import { useCallback as ue, useState as c } from "react";
10
- import { ArrowRightLeft as de, Building2 as fe, CheckCircle2 as pe, CreditCard as me, FolderKanban as he, Globe as ge, Link2 as _e, PauseCircle as ve, PlayCircle as ye, Plus as be, Share2 as l, ShieldCheck as xe, Users as Se, XCircle as Ce } from "lucide-react";
11
- import { AuroraBackground as we, Badge as u, Button as d, CardContent as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as Te, Input as g, PagePurpose as Ee, Skeleton as _ } from "@burdenoff/fe-libs/ui";
7
+ import { MspBillingMode as n, MspDelegatedScope as r, MspLinkRole as se, MspOrgLinkStatus as i, WorkspaceShareAccessLevel as a, WorkspaceShareDirection as ce, WorkspaceShareResourceType as o, WorkspaceShareStatus as s } from "../generated/wspace-types.js";
8
+ import { useCallback as le, useState as c } from "react";
9
+ import { ArrowRightLeft as ue, Building2 as de, CheckCircle2 as fe, CreditCard as pe, FolderKanban as me, Globe as he, Link2 as ge, PauseCircle as _e, PlayCircle as ve, Plus as ye, Share2 as be, ShieldCheck as xe, Users as Se, XCircle as Ce } from "lucide-react";
10
+ import { AuroraBackground as we, Badge as l, Button as u, CardContent as d, CardHeader as f, CardTitle as p, GlassCard as m, GradientText as Te, Input as h, PagePurpose as Ee, Skeleton as g } from "@burdenoff/fe-libs/ui";
12
11
  import { useActiveContext as De } from "@burdenoff/fe-libs/shared/providers/shell";
13
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { toast as y } from "sonner";
14
14
  // src/pages/CollaborationConsolePage.tsx
15
15
  var Oe = [
16
16
  {
17
- value: i.ViewOverview,
17
+ value: r.ViewOverview,
18
18
  label: "View Overview"
19
19
  },
20
20
  {
21
- value: i.ViewBillingSummary,
21
+ value: r.ViewBillingSummary,
22
22
  label: "View Billing Summary"
23
23
  },
24
24
  {
25
- value: i.ManageMembers,
25
+ value: r.ManageMembers,
26
26
  label: "Manage Members"
27
27
  },
28
28
  {
29
- value: i.ManageProjects,
29
+ value: r.ManageProjects,
30
30
  label: "Manage Projects"
31
31
  },
32
32
  {
33
- value: i.ManageShares,
33
+ value: r.ManageShares,
34
34
  label: "Manage Shares"
35
35
  }
36
36
  ], ke = [
37
37
  {
38
- value: s.Channel,
38
+ value: o.Channel,
39
39
  label: "Shared Channel"
40
40
  },
41
41
  {
42
- value: s.Project,
42
+ value: o.Project,
43
43
  label: "Shared Project"
44
44
  },
45
45
  {
46
- value: s.Mentions,
46
+ value: o.Mentions,
47
47
  label: "Cross-Workspace Mentions"
48
48
  }
49
49
  ], Ae = [
50
50
  {
51
- value: o.ReadOnly,
51
+ value: a.ReadOnly,
52
52
  label: "Read Only"
53
53
  },
54
54
  {
55
- value: o.Collaborate,
55
+ value: a.Collaborate,
56
56
  label: "Collaborate"
57
57
  },
58
58
  {
59
- value: o.Admin,
59
+ value: a.Admin,
60
60
  label: "Admin"
61
61
  }
62
62
  ], je = [
63
63
  {
64
- value: r.Consolidated,
64
+ value: n.Consolidated,
65
65
  label: "Consolidated (MSP Billed)"
66
66
  },
67
67
  {
68
- value: r.ClientDirect,
68
+ value: n.ClientDirect,
69
69
  label: "Client Direct"
70
70
  },
71
71
  {
72
- value: r.Split,
72
+ value: n.Split,
73
73
  label: "Split Billing"
74
74
  }
75
75
  ];
@@ -82,153 +82,153 @@ function b(e) {
82
82
  }
83
83
  }
84
84
  function x() {
85
- n("workspaces.collaboration");
86
- let x = te(), { workspaceId: S, organizationId: Me } = t(), { setOrganization: Ne, setWorkspace: Pe, setProject: C, setTenant: w } = De(), [T, E] = c("portfolio"), [D, O] = c(null), [Fe, k] = c(!1), [Ie, Le] = c(""), [A, Re] = c(s.Channel), [j, M] = c(""), [N, P] = c(""), [F, ze] = c(o.Collaborate), [Be, I] = c(!1), [L, R] = c(""), [z, B] = c(""), [V, H] = c(""), [U, Ve] = c(r.Consolidated), [W, G] = c(""), [K, He] = c(""), [q, Ue] = c([i.ViewOverview, i.ViewBillingSummary]), J = ne(), We = ae(S, ce.All), Ge = re(S, se.All), Y = ie(S, D), X = oe(), Ke = ue((t) => {
85
+ t("workspaces.collaboration");
86
+ let x = te(), { workspaceId: S, organizationId: Me } = e(), { setOrganization: C, setWorkspace: w, setProject: Ne, setTenant: Pe } = De(), [T, E] = c("portfolio"), [D, Fe] = c(null), [Ie, O] = c(!1), [Le, Re] = c(""), [k, ze] = c(o.Channel), [A, j] = c(""), [M, N] = c(""), [P, Be] = c(a.Collaborate), [Ve, F] = c(!1), [I, L] = c(""), [R, z] = c(""), [B, V] = c(""), [H, He] = c(n.Consolidated), [U, W] = c(""), [G, Ue] = c(""), [K, We] = c([r.ViewOverview, r.ViewBillingSummary]), q = ne(), J = ae(S, ce.All), Ge = re(S, se.All), Y = ie(S, D), X = oe(), Ke = le((e) => {
87
87
  ee({
88
- setOrganization: Ne,
89
- setWorkspace: Pe,
90
- setProject: C,
91
- setTenant: w
88
+ setOrganization: C,
89
+ setWorkspace: w,
90
+ setProject: Ne,
91
+ setTenant: Pe
92
92
  }, {
93
- id: t.id,
94
- orgId: t.orgId,
95
- tenantId: t.tenantId
96
- }), e.success(x("collaborationConsole.switchedToast", "Switched active workspace to {{name}}", { name: t.name }));
93
+ id: e.id,
94
+ orgId: e.orgId,
95
+ tenantId: e.tenantId
96
+ }), y.success(x("collaborationConsole.switchedToast", "Switched active workspace to {{name}}", { name: e.name }));
97
97
  }, [
98
- Ne,
99
98
  C,
100
- w,
99
+ Ne,
101
100
  Pe,
101
+ w,
102
102
  x
103
103
  ]), qe = (e) => {
104
- Ue((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
105
- }, Je = async (t) => {
106
- if (t.preventDefault(), !S) e.error(x("collaborationConsole.workspaceRequired", "Select an active workspace first"));
104
+ We((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
105
+ }, Je = async (e) => {
106
+ if (e.preventDefault(), !S) y.error(x("collaborationConsole.workspaceRequired", "Select an active workspace first"));
107
107
  else try {
108
108
  await X.createShare.mutateAsync({
109
109
  workspaceId: S,
110
- targetWorkspaceId: Ie.trim(),
111
- resourceType: A,
112
- resourceId: j.trim(),
113
- resourceName: N.trim(),
114
- accessLevel: F
115
- }), e.success(x("collaborationConsole.shareCreated", "Cross-workspace share offered (pending target consent)")), Le(""), M(""), P(""), k(!1);
116
- } catch (t) {
117
- e.error(t instanceof Error ? t.message : "Failed to create share");
110
+ targetWorkspaceId: Le.trim(),
111
+ resourceType: k,
112
+ resourceId: A.trim(),
113
+ resourceName: M.trim(),
114
+ accessLevel: P
115
+ }), y.success(x("collaborationConsole.shareCreated", "Cross-workspace share offered (pending target consent)")), Re(""), j(""), N(""), O(!1);
116
+ } catch (e) {
117
+ y.error(e instanceof Error ? e.message : "Failed to create share");
118
118
  }
119
- }, Ye = async (t) => {
119
+ }, Ye = async (e) => {
120
120
  if (S) try {
121
121
  await X.acceptShare.mutateAsync({
122
122
  workspaceId: S,
123
- shareId: t
124
- }), e.success(x("collaborationConsole.shareAccepted", "Share consent granted and activated"));
125
- } catch (t) {
126
- e.error(t instanceof Error ? t.message : "Failed to accept share");
123
+ shareId: e
124
+ }), y.success(x("collaborationConsole.shareAccepted", "Share consent granted and activated"));
125
+ } catch (e) {
126
+ y.error(e instanceof Error ? e.message : "Failed to accept share");
127
127
  }
128
- }, Xe = async (t) => {
128
+ }, Xe = async (e) => {
129
129
  if (S) try {
130
130
  await X.revokeShare.mutateAsync({
131
131
  workspaceId: S,
132
- shareId: t,
132
+ shareId: e,
133
133
  reason: "Revoked via Multi-Org & Sharing Console"
134
- }), e.success(x("collaborationConsole.shareRevoked", "Share revoked immediately"));
135
- } catch (t) {
136
- e.error(t instanceof Error ? t.message : "Failed to revoke share");
134
+ }), y.success(x("collaborationConsole.shareRevoked", "Share revoked immediately"));
135
+ } catch (e) {
136
+ y.error(e instanceof Error ? e.message : "Failed to revoke share");
137
137
  }
138
- }, Ze = async (t) => {
139
- if (t.preventDefault(), !S) e.error(x("collaborationConsole.workspaceRequired", "Select an active workspace first"));
140
- else if (q.length === 0) e.error(x("collaborationConsole.scopeRequired", "Select at least one delegated permission scope"));
138
+ }, Ze = async (e) => {
139
+ if (e.preventDefault(), !S) y.error(x("collaborationConsole.workspaceRequired", "Select an active workspace first"));
140
+ else if (K.length === 0) y.error(x("collaborationConsole.scopeRequired", "Select at least one delegated permission scope"));
141
141
  else try {
142
- let t = W.trim() ? Number.parseInt(W, 10) : void 0;
142
+ let e = U.trim() ? Number.parseInt(U, 10) : void 0;
143
143
  await X.createMspLink.mutateAsync({
144
144
  workspaceId: S,
145
- clientOrgId: L.trim(),
146
- clientOrgName: z.trim(),
147
- clientWorkspaceId: V.trim() || void 0,
148
- delegatedScopes: q,
149
- billingMode: U,
150
- monthlySeatBudget: Number.isFinite(t) ? t : void 0,
151
- notes: K.trim() || void 0
152
- }), e.success(x("collaborationConsole.mspCreated", "MSP link proposed — awaiting client organization approval")), R(""), B(""), H(""), G(""), He(""), I(!1);
153
- } catch (t) {
154
- e.error(t instanceof Error ? t.message : "Failed to propose MSP link");
145
+ clientOrgId: I.trim(),
146
+ clientOrgName: R.trim(),
147
+ clientWorkspaceId: B.trim() || void 0,
148
+ delegatedScopes: K,
149
+ billingMode: H,
150
+ monthlySeatBudget: Number.isFinite(e) ? e : void 0,
151
+ notes: G.trim() || void 0
152
+ }), y.success(x("collaborationConsole.mspCreated", "MSP link proposed — awaiting client organization approval")), L(""), z(""), V(""), W(""), Ue(""), F(!1);
153
+ } catch (e) {
154
+ y.error(e instanceof Error ? e.message : "Failed to propose MSP link");
155
155
  }
156
- }, Qe = async (t) => {
156
+ }, Qe = async (e) => {
157
157
  if (S) try {
158
158
  await X.approveMspLink.mutateAsync({
159
159
  workspaceId: S,
160
- linkId: t
161
- }), e.success(x("collaborationConsole.mspApproved", "MSP organization link approved"));
162
- } catch (t) {
163
- e.error(t instanceof Error ? t.message : "Failed to approve MSP link");
160
+ linkId: e
161
+ }), y.success(x("collaborationConsole.mspApproved", "MSP organization link approved"));
162
+ } catch (e) {
163
+ y.error(e instanceof Error ? e.message : "Failed to approve MSP link");
164
164
  }
165
- }, $e = async (t, n) => {
165
+ }, $e = async (e, t) => {
166
166
  if (S) try {
167
167
  await X.updateMspLink.mutateAsync({
168
168
  workspaceId: S,
169
- linkId: t,
170
- status: n
171
- }), e.success(n === a.Suspended ? x("collaborationConsole.mspSuspended", "MSP link suspended") : x("collaborationConsole.mspReactivated", "MSP link reactivated"));
172
- } catch (t) {
173
- e.error(t instanceof Error ? t.message : "Failed to update MSP link");
169
+ linkId: e,
170
+ status: t
171
+ }), y.success(t === i.Suspended ? x("collaborationConsole.mspSuspended", "MSP link suspended") : x("collaborationConsole.mspReactivated", "MSP link reactivated"));
172
+ } catch (e) {
173
+ y.error(e instanceof Error ? e.message : "Failed to update MSP link");
174
174
  }
175
- }, et = async (t) => {
175
+ }, et = async (e) => {
176
176
  if (S) try {
177
177
  await X.revokeMspLink.mutateAsync({
178
178
  workspaceId: S,
179
- linkId: t
180
- }), e.success(x("collaborationConsole.mspRevoked", "MSP organization link revoked"));
181
- } catch (t) {
182
- e.error(t instanceof Error ? t.message : "Failed to revoke MSP link");
179
+ linkId: e
180
+ }), y.success(x("collaborationConsole.mspRevoked", "MSP organization link revoked"));
181
+ } catch (e) {
182
+ y.error(e instanceof Error ? e.message : "Failed to revoke MSP link");
183
183
  }
184
- }, Z = J.data, Q = We.data?.items ?? [], $ = Ge.data?.items ?? [];
185
- return /* @__PURE__ */ y("div", {
184
+ }, Z = q.data, Q = J.data?.items ?? [], $ = Ge.data?.items ?? [];
185
+ return /* @__PURE__ */ v("div", {
186
186
  className: "space-y-6 p-3 sm:p-6",
187
187
  "data-testid": "collaboration-console-page",
188
188
  children: [
189
- /* @__PURE__ */ y("div", {
189
+ /* @__PURE__ */ v("div", {
190
190
  className: "relative overflow-hidden rounded-card flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 px-4 py-4",
191
191
  children: [
192
- /* @__PURE__ */ v(we, { intensity: "subtle" }),
193
- /* @__PURE__ */ y("div", {
192
+ /* @__PURE__ */ _(we, { intensity: "subtle" }),
193
+ /* @__PURE__ */ v("div", {
194
194
  className: "relative z-10",
195
- children: [/* @__PURE__ */ y("div", {
195
+ children: [/* @__PURE__ */ v("div", {
196
196
  className: "flex items-center gap-2",
197
- children: [/* @__PURE__ */ v(ge, {
197
+ children: [/* @__PURE__ */ _(he, {
198
198
  className: "text-primary",
199
199
  size: 24,
200
200
  "aria-hidden": "true"
201
- }), /* @__PURE__ */ v("h1", {
201
+ }), /* @__PURE__ */ _("h1", {
202
202
  className: "text-2xl sm:text-3xl font-bold",
203
- children: /* @__PURE__ */ v(Te, { children: x("collaborationConsole.title", "Multi-Org & Cross-Workspace Console") })
203
+ children: /* @__PURE__ */ _(Te, { children: x("collaborationConsole.title", "Multi-Org & Cross-Workspace Console") })
204
204
  })]
205
- }), /* @__PURE__ */ v("p", {
205
+ }), /* @__PURE__ */ _("p", {
206
206
  className: "text-sm sm:text-base text-text-secondary mt-1",
207
207
  children: x("collaborationConsole.subtitle", "Manage bilateral cross-workspace shares, delegated MSP client organizations, and aggregated seat billing without compromising workspace isolation.")
208
208
  })]
209
209
  }),
210
- /* @__PURE__ */ y("div", {
210
+ /* @__PURE__ */ v("div", {
211
211
  className: "relative z-10 flex flex-wrap items-center gap-2",
212
- children: [/* @__PURE__ */ y(d, {
212
+ children: [/* @__PURE__ */ v(u, {
213
213
  variant: "outline",
214
214
  size: "sm",
215
215
  onClick: () => {
216
- E("shares"), k(!0);
216
+ E("shares"), O(!0);
217
217
  },
218
218
  className: "gap-2",
219
219
  "data-testid": "open-share-form-btn",
220
- children: [/* @__PURE__ */ v(l, {
220
+ children: [/* @__PURE__ */ _(be, {
221
221
  size: 16,
222
222
  "aria-hidden": "true"
223
223
  }), x("collaborationConsole.newShareButton", "Share Resource")]
224
- }), /* @__PURE__ */ y(d, {
224
+ }), /* @__PURE__ */ v(u, {
225
225
  size: "sm",
226
226
  onClick: () => {
227
- E("msp"), I(!0);
227
+ E("msp"), F(!0);
228
228
  },
229
229
  className: "gap-2",
230
230
  "data-testid": "open-msp-form-btn",
231
- children: [/* @__PURE__ */ v(be, {
231
+ children: [/* @__PURE__ */ _(ye, {
232
232
  size: 16,
233
233
  "aria-hidden": "true"
234
234
  }), x("collaborationConsole.newMspLinkButton", "Link Client Org")]
@@ -236,25 +236,25 @@ function x() {
236
236
  })
237
237
  ]
238
238
  }),
239
- /* @__PURE__ */ v(Ee, { children: x("collaborationConsole.purpose", "Strict workspace isolation stays on by default. Every cross-workspace share (channels, projects, mentions) and MSP organization link starts pending and activates only after explicit target-side consent. Either organization can revoke access instantaneously.") }),
240
- /* @__PURE__ */ y("div", {
239
+ /* @__PURE__ */ _(Ee, { children: x("collaborationConsole.purpose", "Strict workspace isolation stays on by default. Every cross-workspace share (channels, projects, mentions) and MSP organization link starts pending and activates only after explicit target-side consent. Either organization can revoke access instantaneously.") }),
240
+ /* @__PURE__ */ v("div", {
241
241
  className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
242
242
  "data-testid": "portfolio-kpi-strip",
243
243
  children: [
244
- /* @__PURE__ */ v(h, {
244
+ /* @__PURE__ */ _(m, {
245
245
  treatment: "insight",
246
- children: /* @__PURE__ */ y(f, {
246
+ children: /* @__PURE__ */ v(d, {
247
247
  className: "p-4 flex items-center justify-between",
248
- children: [/* @__PURE__ */ y("div", { children: [
249
- /* @__PURE__ */ v("p", {
248
+ children: [/* @__PURE__ */ v("div", { children: [
249
+ /* @__PURE__ */ _("p", {
250
250
  className: "text-xs text-text-secondary uppercase tracking-wide",
251
251
  children: x("collaborationConsole.kpiOrgs", "Organizations")
252
252
  }),
253
- /* @__PURE__ */ v("p", {
253
+ /* @__PURE__ */ _("p", {
254
254
  className: "text-2xl font-bold text-text-primary mt-1",
255
- children: J.isLoading ? "—" : Z?.totals.organizationCount ?? 0
255
+ children: q.isLoading ? "—" : Z?.totals.organizationCount ?? 0
256
256
  }),
257
- /* @__PURE__ */ y("p", {
257
+ /* @__PURE__ */ v("p", {
258
258
  className: "text-xs text-text-muted mt-0.5",
259
259
  children: [
260
260
  Z?.totals.managedOrganizationCount ?? 0,
@@ -262,27 +262,27 @@ function x() {
262
262
  x("collaborationConsole.kpiManagedSuffix", "MSP-managed")
263
263
  ]
264
264
  })
265
- ] }), /* @__PURE__ */ v(fe, {
265
+ ] }), /* @__PURE__ */ _(de, {
266
266
  className: "text-primary",
267
267
  size: 24,
268
268
  "aria-hidden": "true"
269
269
  })]
270
270
  })
271
271
  }),
272
- /* @__PURE__ */ v(h, {
272
+ /* @__PURE__ */ _(m, {
273
273
  treatment: "insight",
274
- children: /* @__PURE__ */ y(f, {
274
+ children: /* @__PURE__ */ v(d, {
275
275
  className: "p-4 flex items-center justify-between",
276
- children: [/* @__PURE__ */ y("div", { children: [
277
- /* @__PURE__ */ v("p", {
276
+ children: [/* @__PURE__ */ v("div", { children: [
277
+ /* @__PURE__ */ _("p", {
278
278
  className: "text-xs text-text-secondary uppercase tracking-wide",
279
279
  children: x("collaborationConsole.kpiWorkspaces", "Workspaces")
280
280
  }),
281
- /* @__PURE__ */ v("p", {
281
+ /* @__PURE__ */ _("p", {
282
282
  className: "text-2xl font-bold text-text-primary mt-1",
283
- children: J.isLoading ? "—" : Z?.totals.workspaceCount ?? 0
283
+ children: q.isLoading ? "—" : Z?.totals.workspaceCount ?? 0
284
284
  }),
285
- /* @__PURE__ */ y("p", {
285
+ /* @__PURE__ */ v("p", {
286
286
  className: "text-xs text-text-muted mt-0.5",
287
287
  children: [
288
288
  Z?.totals.activeWorkspaceCount ?? 0,
@@ -290,27 +290,27 @@ function x() {
290
290
  x("collaborationConsole.kpiActiveSuffix", "active")
291
291
  ]
292
292
  })
293
- ] }), /* @__PURE__ */ v(he, {
293
+ ] }), /* @__PURE__ */ _(me, {
294
294
  className: "text-primary",
295
295
  size: 24,
296
296
  "aria-hidden": "true"
297
297
  })]
298
298
  })
299
299
  }),
300
- /* @__PURE__ */ v(h, {
300
+ /* @__PURE__ */ _(m, {
301
301
  treatment: "insight",
302
- children: /* @__PURE__ */ y(f, {
302
+ children: /* @__PURE__ */ v(d, {
303
303
  className: "p-4 flex items-center justify-between",
304
- children: [/* @__PURE__ */ y("div", { children: [
305
- /* @__PURE__ */ v("p", {
304
+ children: [/* @__PURE__ */ v("div", { children: [
305
+ /* @__PURE__ */ _("p", {
306
306
  className: "text-xs text-text-secondary uppercase tracking-wide",
307
307
  children: x("collaborationConsole.kpiSeats", "Aggregated Seats")
308
308
  }),
309
- /* @__PURE__ */ v("p", {
309
+ /* @__PURE__ */ _("p", {
310
310
  className: "text-2xl font-bold text-text-primary mt-1",
311
- children: J.isLoading ? "—" : Z?.totals.totalActiveSeats ?? 0
311
+ children: q.isLoading ? "—" : Z?.totals.totalActiveSeats ?? 0
312
312
  }),
313
- /* @__PURE__ */ y("p", {
313
+ /* @__PURE__ */ v("p", {
314
314
  className: "text-xs text-text-muted mt-0.5",
315
315
  children: [
316
316
  Z?.totals.totalProjects ?? 0,
@@ -318,27 +318,27 @@ function x() {
318
318
  x("collaborationConsole.kpiProjectsSuffix", "projects")
319
319
  ]
320
320
  })
321
- ] }), /* @__PURE__ */ v(Se, {
321
+ ] }), /* @__PURE__ */ _(Se, {
322
322
  className: "text-primary",
323
323
  size: 24,
324
324
  "aria-hidden": "true"
325
325
  })]
326
326
  })
327
327
  }),
328
- /* @__PURE__ */ v(h, {
328
+ /* @__PURE__ */ _(m, {
329
329
  treatment: "insight",
330
- children: /* @__PURE__ */ y(f, {
330
+ children: /* @__PURE__ */ v(d, {
331
331
  className: "p-4 flex items-center justify-between",
332
- children: [/* @__PURE__ */ y("div", { children: [
333
- /* @__PURE__ */ v("p", {
332
+ children: [/* @__PURE__ */ v("div", { children: [
333
+ /* @__PURE__ */ _("p", {
334
334
  className: "text-xs text-text-secondary uppercase tracking-wide",
335
335
  children: x("collaborationConsole.kpiShares", "Active Shares")
336
336
  }),
337
- /* @__PURE__ */ v("p", {
337
+ /* @__PURE__ */ _("p", {
338
338
  className: "text-2xl font-bold text-text-primary mt-1",
339
- children: J.isLoading ? "—" : Z?.totals.activeShareCount ?? 0
339
+ children: q.isLoading ? "—" : Z?.totals.activeShareCount ?? 0
340
340
  }),
341
- /* @__PURE__ */ y("p", {
341
+ /* @__PURE__ */ v("p", {
342
342
  className: "text-xs text-text-muted mt-0.5",
343
343
  children: [
344
344
  $.length,
@@ -346,7 +346,7 @@ function x() {
346
346
  x("collaborationConsole.kpiLinksSuffix", "MSP links")
347
347
  ]
348
348
  })
349
- ] }), /* @__PURE__ */ v(xe, {
349
+ ] }), /* @__PURE__ */ _(xe, {
350
350
  className: "text-primary",
351
351
  size: 24,
352
352
  "aria-hidden": "true"
@@ -355,12 +355,12 @@ function x() {
355
355
  })
356
356
  ]
357
357
  }),
358
- /* @__PURE__ */ y("div", {
358
+ /* @__PURE__ */ v("div", {
359
359
  className: "flex flex-wrap items-center gap-2 border-b border-border-seam pb-3",
360
360
  role: "tablist",
361
361
  "aria-label": x("collaborationConsole.tabsAria", "Multi-org console sections"),
362
362
  children: [
363
- /* @__PURE__ */ y(d, {
363
+ /* @__PURE__ */ v(u, {
364
364
  role: "tab",
365
365
  "aria-selected": T === "portfolio",
366
366
  variant: T === "portfolio" ? "default" : "outline",
@@ -368,12 +368,12 @@ function x() {
368
368
  onClick: () => E("portfolio"),
369
369
  className: "gap-2",
370
370
  "data-testid": "tab-portfolio",
371
- children: [/* @__PURE__ */ v(me, {
371
+ children: [/* @__PURE__ */ _(pe, {
372
372
  size: 16,
373
373
  "aria-hidden": "true"
374
374
  }), x("collaborationConsole.tabPortfolio", "Portfolio & Billing")]
375
375
  }),
376
- /* @__PURE__ */ y(d, {
376
+ /* @__PURE__ */ v(u, {
377
377
  role: "tab",
378
378
  "aria-selected": T === "shares",
379
379
  variant: T === "shares" ? "default" : "outline",
@@ -382,18 +382,18 @@ function x() {
382
382
  className: "gap-2",
383
383
  "data-testid": "tab-shares",
384
384
  children: [
385
- /* @__PURE__ */ v(l, {
385
+ /* @__PURE__ */ _(be, {
386
386
  size: 16,
387
387
  "aria-hidden": "true"
388
388
  }),
389
389
  x("collaborationConsole.tabShares", "Cross-Workspace Shares"),
390
- /* @__PURE__ */ v(u, {
390
+ /* @__PURE__ */ _(l, {
391
391
  variant: "secondary",
392
392
  children: Q.length
393
393
  })
394
394
  ]
395
395
  }),
396
- /* @__PURE__ */ y(d, {
396
+ /* @__PURE__ */ v(u, {
397
397
  role: "tab",
398
398
  "aria-selected": T === "msp",
399
399
  variant: T === "msp" ? "default" : "outline",
@@ -402,12 +402,12 @@ function x() {
402
402
  className: "gap-2",
403
403
  "data-testid": "tab-msp",
404
404
  children: [
405
- /* @__PURE__ */ v(_e, {
405
+ /* @__PURE__ */ _(ge, {
406
406
  size: 16,
407
407
  "aria-hidden": "true"
408
408
  }),
409
409
  x("collaborationConsole.tabMsp", "MSP Org Links"),
410
- /* @__PURE__ */ v(u, {
410
+ /* @__PURE__ */ _(l, {
411
411
  variant: "secondary",
412
412
  children: $.length
413
413
  })
@@ -415,100 +415,100 @@ function x() {
415
415
  })
416
416
  ]
417
417
  }),
418
- T === "portfolio" && /* @__PURE__ */ y("div", {
418
+ T === "portfolio" && /* @__PURE__ */ v("div", {
419
419
  className: "space-y-4",
420
420
  "data-testid": "panel-portfolio",
421
- children: [J.isLoading ? /* @__PURE__ */ v("div", {
421
+ children: [q.isLoading ? /* @__PURE__ */ _("div", {
422
422
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
423
- children: Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */ v(_, { className: "h-48 w-full rounded-card" }, t))
424
- }) : J.error ? /* @__PURE__ */ v(h, { children: /* @__PURE__ */ y(f, {
423
+ children: Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */ _(g, { className: "h-48 w-full rounded-card" }, t))
424
+ }) : q.error ? /* @__PURE__ */ _(m, { children: /* @__PURE__ */ v(d, {
425
425
  className: "p-6 text-center",
426
- children: [/* @__PURE__ */ v("p", {
426
+ children: [/* @__PURE__ */ _("p", {
427
427
  className: "text-status-error-text font-medium",
428
428
  children: x("collaborationConsole.overviewError", "Unable to load multi-org overview")
429
- }), /* @__PURE__ */ v("p", {
429
+ }), /* @__PURE__ */ _("p", {
430
430
  className: "text-xs text-text-secondary mt-1",
431
- children: J.error instanceof Error ? J.error.message : ""
431
+ children: q.error instanceof Error ? q.error.message : ""
432
432
  })]
433
- }) }) : !Z || Z.organizations.length === 0 ? /* @__PURE__ */ v(h, { children: /* @__PURE__ */ y(f, {
433
+ }) }) : !Z || Z.organizations.length === 0 ? /* @__PURE__ */ _(m, { children: /* @__PURE__ */ v(d, {
434
434
  className: "p-8 text-center",
435
- children: [/* @__PURE__ */ v("p", {
435
+ children: [/* @__PURE__ */ _("p", {
436
436
  className: "text-text-primary font-medium",
437
437
  children: x("collaborationConsole.emptyPortfolio", "No accessible organizations yet")
438
- }), /* @__PURE__ */ v("p", {
438
+ }), /* @__PURE__ */ _("p", {
439
439
  className: "text-sm text-text-secondary mt-1",
440
440
  children: x("collaborationConsole.emptyPortfolioHint", "Create a workspace or link a client organization to manage multiple tenants from one view.")
441
441
  })]
442
- }) }) : /* @__PURE__ */ v("div", {
442
+ }) }) : /* @__PURE__ */ _("div", {
443
443
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
444
- children: Z.organizations.map((e) => /* @__PURE__ */ y(h, {
444
+ children: Z.organizations.map((e) => /* @__PURE__ */ v(m, {
445
445
  treatment: "insight",
446
446
  "data-testid": `org-card-${e.orgId}`,
447
- children: [/* @__PURE__ */ v(p, {
447
+ children: [/* @__PURE__ */ _(f, {
448
448
  className: "pb-2",
449
- children: /* @__PURE__ */ y("div", {
449
+ children: /* @__PURE__ */ v("div", {
450
450
  className: "flex items-start justify-between gap-2",
451
- children: [/* @__PURE__ */ y("div", {
451
+ children: [/* @__PURE__ */ v("div", {
452
452
  className: "min-w-0",
453
- children: [/* @__PURE__ */ v(m, {
453
+ children: [/* @__PURE__ */ _(p, {
454
454
  className: "text-lg truncate",
455
455
  children: e.orgName
456
- }), /* @__PURE__ */ v("p", {
456
+ }), /* @__PURE__ */ _("p", {
457
457
  className: "text-xs text-text-muted truncate",
458
458
  children: e.orgId
459
459
  })]
460
- }), /* @__PURE__ */ y("div", {
460
+ }), /* @__PURE__ */ v("div", {
461
461
  className: "flex items-center gap-2 shrink-0",
462
- children: [/* @__PURE__ */ v(u, {
462
+ children: [/* @__PURE__ */ _(l, {
463
463
  className: e.managedByMsp ? "bg-action-primary-bg/10 text-primary border-action-primary-bg/30" : "bg-surface-secondary text-text-secondary border-border-seam",
464
464
  children: e.managedByMsp ? x("collaborationConsole.badgeMspManaged", "MSP Delegated") : x("collaborationConsole.badgeDirect", "Direct Org")
465
- }), S && /* @__PURE__ */ v(d, {
465
+ }), S && /* @__PURE__ */ _(u, {
466
466
  size: "sm",
467
467
  variant: "outline",
468
- onClick: () => O(e.orgId),
468
+ onClick: () => Fe(e.orgId),
469
469
  children: x("collaborationConsole.inspectOrg", "Summary")
470
470
  })]
471
471
  })]
472
472
  })
473
- }), /* @__PURE__ */ y(f, {
473
+ }), /* @__PURE__ */ v(d, {
474
474
  className: "space-y-4",
475
- children: [/* @__PURE__ */ y("div", {
475
+ children: [/* @__PURE__ */ v("div", {
476
476
  className: "grid grid-cols-3 gap-2 rounded-lg border border-border-seam bg-surface-secondary/40 p-3 text-xs",
477
477
  children: [
478
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
478
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
479
479
  className: "text-text-muted",
480
480
  children: x("collaborationConsole.seatsLabel", "Active Seats")
481
- }), /* @__PURE__ */ y("p", {
481
+ }), /* @__PURE__ */ v("p", {
482
482
  className: "text-sm font-semibold text-text-primary",
483
483
  children: [e.billingSummary.totalActiveSeats, e.billingSummary.monthlySeatBudget ? ` / ${e.billingSummary.monthlySeatBudget}` : ""]
484
484
  })] }),
485
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
485
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
486
486
  className: "text-text-muted",
487
487
  children: x("collaborationConsole.projectsLabel", "Projects")
488
- }), /* @__PURE__ */ v("p", {
488
+ }), /* @__PURE__ */ _("p", {
489
489
  className: "text-sm font-semibold text-text-primary",
490
490
  children: e.billingSummary.totalProjects
491
491
  })] }),
492
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
492
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
493
493
  className: "text-text-muted",
494
494
  children: x("collaborationConsole.billingModeLabel", "Billing Mode")
495
- }), /* @__PURE__ */ v("p", {
495
+ }), /* @__PURE__ */ _("p", {
496
496
  className: "text-sm font-semibold text-text-primary",
497
497
  children: e.billingSummary.billingMode ?? "DIRECT"
498
498
  })] })
499
499
  ]
500
- }), /* @__PURE__ */ v("div", {
500
+ }), /* @__PURE__ */ _("div", {
501
501
  className: "space-y-2",
502
502
  children: e.workspaces.map((e) => {
503
503
  let t = e.id === S;
504
- return /* @__PURE__ */ y("div", {
504
+ return /* @__PURE__ */ v("div", {
505
505
  className: "flex items-center justify-between gap-2 rounded-lg border border-border-seam px-3 py-2",
506
- children: [/* @__PURE__ */ y("div", {
506
+ children: [/* @__PURE__ */ v("div", {
507
507
  className: "min-w-0",
508
- children: [/* @__PURE__ */ v("p", {
508
+ children: [/* @__PURE__ */ _("p", {
509
509
  className: "text-sm font-medium text-text-primary truncate",
510
510
  children: e.name
511
- }), /* @__PURE__ */ y("p", {
511
+ }), /* @__PURE__ */ v("p", {
512
512
  className: "text-xs text-text-secondary",
513
513
  children: [
514
514
  e.memberCount,
@@ -520,20 +520,20 @@ function x() {
520
520
  " shares"
521
521
  ]
522
522
  })]
523
- }), /* @__PURE__ */ y("div", {
523
+ }), /* @__PURE__ */ v("div", {
524
524
  className: "flex items-center gap-2 shrink-0",
525
- children: [/* @__PURE__ */ v(u, {
525
+ children: [/* @__PURE__ */ _(l, {
526
526
  className: `text-xs border ${b(e.status)}`,
527
527
  children: e.status
528
- }), t ? /* @__PURE__ */ v(u, {
528
+ }), t ? /* @__PURE__ */ _(l, {
529
529
  variant: "secondary",
530
530
  children: x("collaborationConsole.currentWorkspace", "Active")
531
- }) : /* @__PURE__ */ y(d, {
531
+ }) : /* @__PURE__ */ v(u, {
532
532
  size: "sm",
533
533
  variant: "outline",
534
534
  onClick: () => Ke(e),
535
535
  className: "gap-1",
536
- children: [/* @__PURE__ */ v(de, {
536
+ children: [/* @__PURE__ */ _(ue, {
537
537
  size: 14,
538
538
  "aria-hidden": "true"
539
539
  }), x("collaborationConsole.switchButton", "Switch")]
@@ -544,11 +544,11 @@ function x() {
544
544
  })]
545
545
  })]
546
546
  }, e.orgId))
547
- }), D && /* @__PURE__ */ y(h, {
547
+ }), D && /* @__PURE__ */ v(m, {
548
548
  "data-testid": "org-summary-panel",
549
- children: [/* @__PURE__ */ y(p, {
549
+ children: [/* @__PURE__ */ v(f, {
550
550
  className: "flex flex-row items-center justify-between",
551
- children: [/* @__PURE__ */ y(m, {
551
+ children: [/* @__PURE__ */ v(p, {
552
552
  className: "text-base",
553
553
  children: [
554
554
  x("collaborationConsole.orgDrilldownTitle", "Organization Billing & Access Summary"),
@@ -556,64 +556,64 @@ function x() {
556
556
  "— ",
557
557
  Y.data?.orgName ?? D
558
558
  ]
559
- }), /* @__PURE__ */ v(d, {
559
+ }), /* @__PURE__ */ _(u, {
560
560
  size: "sm",
561
561
  variant: "outline",
562
- onClick: () => O(null),
562
+ onClick: () => Fe(null),
563
563
  children: x("collaborationConsole.closeButton", "Close")
564
564
  })]
565
- }), /* @__PURE__ */ v(f, { children: Y.isLoading ? /* @__PURE__ */ v(_, { className: "h-24 w-full" }) : Y.error ? /* @__PURE__ */ v("p", {
565
+ }), /* @__PURE__ */ _(d, { children: Y.isLoading ? /* @__PURE__ */ _(g, { className: "h-24 w-full" }) : Y.error ? /* @__PURE__ */ _("p", {
566
566
  className: "text-sm text-status-error-text",
567
567
  children: Y.error instanceof Error ? Y.error.message : "Failed to load summary"
568
- }) : Y.data ? /* @__PURE__ */ y("div", {
568
+ }) : Y.data ? /* @__PURE__ */ v("div", {
569
569
  className: "grid grid-cols-2 sm:grid-cols-5 gap-3 text-sm",
570
570
  children: [
571
- /* @__PURE__ */ y("div", {
571
+ /* @__PURE__ */ v("div", {
572
572
  className: "rounded-lg border border-border-seam p-3",
573
- children: [/* @__PURE__ */ v("p", {
573
+ children: [/* @__PURE__ */ _("p", {
574
574
  className: "text-xs text-text-muted",
575
575
  children: "Workspaces"
576
- }), /* @__PURE__ */ v("p", {
576
+ }), /* @__PURE__ */ _("p", {
577
577
  className: "text-lg font-semibold text-text-primary",
578
578
  children: Y.data.billingSummary.totalWorkspaces
579
579
  })]
580
580
  }),
581
- /* @__PURE__ */ y("div", {
581
+ /* @__PURE__ */ v("div", {
582
582
  className: "rounded-lg border border-border-seam p-3",
583
- children: [/* @__PURE__ */ v("p", {
583
+ children: [/* @__PURE__ */ _("p", {
584
584
  className: "text-xs text-text-muted",
585
585
  children: "Active Seats"
586
- }), /* @__PURE__ */ v("p", {
586
+ }), /* @__PURE__ */ _("p", {
587
587
  className: "text-lg font-semibold text-text-primary",
588
588
  children: Y.data.billingSummary.totalActiveSeats
589
589
  })]
590
590
  }),
591
- /* @__PURE__ */ y("div", {
591
+ /* @__PURE__ */ v("div", {
592
592
  className: "rounded-lg border border-border-seam p-3",
593
- children: [/* @__PURE__ */ v("p", {
593
+ children: [/* @__PURE__ */ _("p", {
594
594
  className: "text-xs text-text-muted",
595
595
  children: "Resources"
596
- }), /* @__PURE__ */ v("p", {
596
+ }), /* @__PURE__ */ _("p", {
597
597
  className: "text-lg font-semibold text-text-primary",
598
598
  children: Y.data.billingSummary.totalResources
599
599
  })]
600
600
  }),
601
- /* @__PURE__ */ y("div", {
601
+ /* @__PURE__ */ v("div", {
602
602
  className: "rounded-lg border border-border-seam p-3",
603
- children: [/* @__PURE__ */ v("p", {
603
+ children: [/* @__PURE__ */ _("p", {
604
604
  className: "text-xs text-text-muted",
605
605
  children: "Products"
606
- }), /* @__PURE__ */ v("p", {
606
+ }), /* @__PURE__ */ _("p", {
607
607
  className: "text-lg font-semibold text-text-primary",
608
608
  children: Y.data.billingSummary.subscribedProductCount
609
609
  })]
610
610
  }),
611
- /* @__PURE__ */ y("div", {
611
+ /* @__PURE__ */ v("div", {
612
612
  className: "rounded-lg border border-border-seam p-3",
613
- children: [/* @__PURE__ */ v("p", {
613
+ children: [/* @__PURE__ */ _("p", {
614
614
  className: "text-xs text-text-muted",
615
615
  children: "Seat Utilization"
616
- }), /* @__PURE__ */ v("p", {
616
+ }), /* @__PURE__ */ _("p", {
617
617
  className: "text-lg font-semibold text-text-primary",
618
618
  children: Y.data.billingSummary.seatUtilizationPercent !== null && Y.data.billingSummary.seatUtilizationPercent !== void 0 ? `${Y.data.billingSummary.seatUtilizationPercent}%` : "Unbounded"
619
619
  })]
@@ -622,176 +622,176 @@ function x() {
622
622
  }) : null })]
623
623
  })]
624
624
  }),
625
- T === "shares" && /* @__PURE__ */ y("div", {
625
+ T === "shares" && /* @__PURE__ */ v("div", {
626
626
  className: "space-y-4",
627
627
  "data-testid": "panel-shares",
628
- children: [Fe && /* @__PURE__ */ y(h, { children: [/* @__PURE__ */ v(p, { children: /* @__PURE__ */ v(m, {
628
+ children: [Ie && /* @__PURE__ */ v(m, { children: [/* @__PURE__ */ _(f, { children: /* @__PURE__ */ _(p, {
629
629
  className: "text-base",
630
630
  children: x("collaborationConsole.createShareTitle", "Offer Cross-Workspace Share")
631
- }) }), /* @__PURE__ */ v(f, { children: /* @__PURE__ */ y("form", {
631
+ }) }), /* @__PURE__ */ _(d, { children: /* @__PURE__ */ v("form", {
632
632
  onSubmit: (e) => void Je(e),
633
633
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
634
634
  children: [
635
- /* @__PURE__ */ y("div", {
635
+ /* @__PURE__ */ v("div", {
636
636
  className: "space-y-1",
637
- children: [/* @__PURE__ */ v("label", {
637
+ children: [/* @__PURE__ */ _("label", {
638
638
  className: "text-xs font-medium text-text-secondary",
639
639
  htmlFor: "share-target-ws",
640
640
  children: x("collaborationConsole.targetWorkspaceLabel", "Target Workspace ID *")
641
- }), /* @__PURE__ */ v(g, {
641
+ }), /* @__PURE__ */ _(h, {
642
642
  id: "share-target-ws",
643
- value: Ie,
644
- onChange: (e) => Le(e.target.value),
643
+ value: Le,
644
+ onChange: (e) => Re(e.target.value),
645
645
  placeholder: "UUID of partner workspace",
646
646
  required: !0
647
647
  })]
648
648
  }),
649
- /* @__PURE__ */ y("div", {
649
+ /* @__PURE__ */ v("div", {
650
650
  className: "space-y-1",
651
- children: [/* @__PURE__ */ v("label", {
651
+ children: [/* @__PURE__ */ _("label", {
652
652
  className: "text-xs font-medium text-text-secondary",
653
653
  htmlFor: "share-resource-type",
654
654
  children: x("collaborationConsole.resourceTypeLabel", "Resource Kind *")
655
- }), /* @__PURE__ */ v("select", {
655
+ }), /* @__PURE__ */ _("select", {
656
656
  id: "share-resource-type",
657
- value: A,
658
- onChange: (e) => Re(e.target.value),
657
+ value: k,
658
+ onChange: (e) => ze(e.target.value),
659
659
  className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
660
- children: ke.map((e) => /* @__PURE__ */ v("option", {
660
+ children: ke.map((e) => /* @__PURE__ */ _("option", {
661
661
  value: e.value,
662
662
  children: e.label
663
663
  }, e.value))
664
664
  })]
665
665
  }),
666
- /* @__PURE__ */ y("div", {
666
+ /* @__PURE__ */ v("div", {
667
667
  className: "space-y-1",
668
- children: [/* @__PURE__ */ v("label", {
668
+ children: [/* @__PURE__ */ _("label", {
669
669
  className: "text-xs font-medium text-text-secondary",
670
670
  htmlFor: "share-resource-id",
671
671
  children: x("collaborationConsole.resourceIdLabel", "Resource ID *")
672
- }), /* @__PURE__ */ v(g, {
672
+ }), /* @__PURE__ */ _(h, {
673
673
  id: "share-resource-id",
674
- value: j,
675
- onChange: (e) => M(e.target.value),
674
+ value: A,
675
+ onChange: (e) => j(e.target.value),
676
676
  placeholder: "Project ID, Channel ID, or * for Mentions",
677
677
  required: !0
678
678
  })]
679
679
  }),
680
- /* @__PURE__ */ y("div", {
680
+ /* @__PURE__ */ v("div", {
681
681
  className: "space-y-1",
682
- children: [/* @__PURE__ */ v("label", {
682
+ children: [/* @__PURE__ */ _("label", {
683
683
  className: "text-xs font-medium text-text-secondary",
684
684
  htmlFor: "share-resource-name",
685
685
  children: x("collaborationConsole.resourceNameLabel", "Display Name *")
686
- }), /* @__PURE__ */ v(g, {
686
+ }), /* @__PURE__ */ _(h, {
687
687
  id: "share-resource-name",
688
- value: N,
689
- onChange: (e) => P(e.target.value),
688
+ value: M,
689
+ onChange: (e) => N(e.target.value),
690
690
  placeholder: "e.g. #agency-delivery or Q4 Launch Project",
691
691
  required: !0
692
692
  })]
693
693
  }),
694
- /* @__PURE__ */ y("div", {
694
+ /* @__PURE__ */ v("div", {
695
695
  className: "space-y-1",
696
- children: [/* @__PURE__ */ v("label", {
696
+ children: [/* @__PURE__ */ _("label", {
697
697
  className: "text-xs font-medium text-text-secondary",
698
698
  htmlFor: "share-access-level",
699
699
  children: x("collaborationConsole.accessLevelLabel", "Access Level")
700
- }), /* @__PURE__ */ v("select", {
700
+ }), /* @__PURE__ */ _("select", {
701
701
  id: "share-access-level",
702
- value: F,
703
- onChange: (e) => ze(e.target.value),
702
+ value: P,
703
+ onChange: (e) => Be(e.target.value),
704
704
  className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
705
- children: Ae.map((e) => /* @__PURE__ */ v("option", {
705
+ children: Ae.map((e) => /* @__PURE__ */ _("option", {
706
706
  value: e.value,
707
707
  children: e.label
708
708
  }, e.value))
709
709
  })]
710
710
  }),
711
- /* @__PURE__ */ y("div", {
711
+ /* @__PURE__ */ v("div", {
712
712
  className: "flex items-end gap-2",
713
- children: [/* @__PURE__ */ v(d, {
713
+ children: [/* @__PURE__ */ _(u, {
714
714
  type: "submit",
715
715
  disabled: X.createShare.isPending,
716
716
  children: X.createShare.isPending ? "Sending..." : "Send Share Offer"
717
- }), /* @__PURE__ */ v(d, {
717
+ }), /* @__PURE__ */ _(u, {
718
718
  type: "button",
719
719
  variant: "outline",
720
- onClick: () => k(!1),
720
+ onClick: () => O(!1),
721
721
  children: "Cancel"
722
722
  })]
723
723
  })
724
724
  ]
725
- }) })] }), We.isLoading ? /* @__PURE__ */ v(_, { className: "h-32 w-full rounded-card" }) : Q.length === 0 ? /* @__PURE__ */ v(h, { children: /* @__PURE__ */ y(f, {
725
+ }) })] }), J.isLoading ? /* @__PURE__ */ _(g, { className: "h-32 w-full rounded-card" }) : Q.length === 0 ? /* @__PURE__ */ _(m, { children: /* @__PURE__ */ v(d, {
726
726
  className: "p-8 text-center",
727
- children: [/* @__PURE__ */ v("p", {
727
+ children: [/* @__PURE__ */ _("p", {
728
728
  className: "text-text-primary font-medium",
729
729
  children: x("collaborationConsole.noShares", "No cross-workspace shares yet")
730
- }), /* @__PURE__ */ v("p", {
730
+ }), /* @__PURE__ */ _("p", {
731
731
  className: "text-sm text-text-secondary mt-1",
732
732
  children: x("collaborationConsole.noSharesHint", "Share a channel, project, or cross-workspace mentions with a partner workspace. Target consent is always required.")
733
733
  })]
734
- }) }) : /* @__PURE__ */ v("div", {
734
+ }) }) : /* @__PURE__ */ _("div", {
735
735
  className: "space-y-3",
736
736
  children: Q.map((e) => {
737
737
  let t = e.targetWorkspaceId === S;
738
- return /* @__PURE__ */ v(h, {
738
+ return /* @__PURE__ */ _(m, {
739
739
  treatment: "insight",
740
- children: /* @__PURE__ */ y(f, {
740
+ children: /* @__PURE__ */ v(d, {
741
741
  className: "p-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3",
742
- children: [/* @__PURE__ */ y("div", {
742
+ children: [/* @__PURE__ */ v("div", {
743
743
  className: "space-y-1 min-w-0",
744
- children: [/* @__PURE__ */ y("div", {
744
+ children: [/* @__PURE__ */ v("div", {
745
745
  className: "flex flex-wrap items-center gap-2",
746
746
  children: [
747
- /* @__PURE__ */ v(u, {
747
+ /* @__PURE__ */ _(l, {
748
748
  variant: "secondary",
749
749
  children: e.resourceType
750
750
  }),
751
- /* @__PURE__ */ v("span", {
751
+ /* @__PURE__ */ _("span", {
752
752
  className: "font-semibold text-text-primary truncate",
753
753
  children: e.resourceName
754
754
  }),
755
- /* @__PURE__ */ v(u, {
755
+ /* @__PURE__ */ _(l, {
756
756
  className: `text-xs border ${b(e.status)}`,
757
757
  children: e.status
758
758
  }),
759
- /* @__PURE__ */ v(u, {
759
+ /* @__PURE__ */ _(l, {
760
760
  variant: "outline",
761
761
  children: e.accessLevel
762
762
  })
763
763
  ]
764
- }), /* @__PURE__ */ y("p", {
764
+ }), /* @__PURE__ */ v("p", {
765
765
  className: "text-xs text-text-secondary",
766
766
  children: [
767
767
  t ? "Inbound from " : "Outbound to ",
768
- /* @__PURE__ */ v("span", {
768
+ /* @__PURE__ */ _("span", {
769
769
  className: "font-medium text-text-primary",
770
770
  children: t ? e.sourceWorkspaceName ?? e.workspaceId : e.targetWorkspaceName ?? e.targetWorkspaceId
771
771
  }),
772
772
  " ",
773
773
  "· Consent scope: ",
774
- /* @__PURE__ */ v("code", { children: e.consentScope })
774
+ /* @__PURE__ */ _("code", { children: e.consentScope })
775
775
  ]
776
776
  })]
777
- }), /* @__PURE__ */ y("div", {
777
+ }), /* @__PURE__ */ v("div", {
778
778
  className: "flex items-center gap-2 shrink-0",
779
- children: [t && e.status === le.Pending && /* @__PURE__ */ y(d, {
779
+ children: [t && e.status === s.Pending && /* @__PURE__ */ v(u, {
780
780
  size: "sm",
781
781
  onClick: () => void Ye(e.id),
782
782
  disabled: X.acceptShare.isPending,
783
783
  className: "gap-1",
784
- children: [/* @__PURE__ */ v(pe, {
784
+ children: [/* @__PURE__ */ _(fe, {
785
785
  size: 14,
786
786
  "aria-hidden": "true"
787
787
  }), "Accept Consent"]
788
- }), e.status !== le.Revoked && /* @__PURE__ */ y(d, {
788
+ }), e.status !== s.Revoked && /* @__PURE__ */ v(u, {
789
789
  size: "sm",
790
790
  variant: "outline",
791
791
  onClick: () => void Xe(e.id),
792
792
  disabled: X.revokeShare.isPending,
793
793
  className: "gap-1 text-status-error-text",
794
- children: [/* @__PURE__ */ v(Ce, {
794
+ children: [/* @__PURE__ */ _(Ce, {
795
795
  size: 14,
796
796
  "aria-hidden": "true"
797
797
  }), "Revoke"]
@@ -802,117 +802,117 @@ function x() {
802
802
  })
803
803
  })]
804
804
  }),
805
- T === "msp" && /* @__PURE__ */ y("div", {
805
+ T === "msp" && /* @__PURE__ */ v("div", {
806
806
  className: "space-y-4",
807
807
  "data-testid": "panel-msp",
808
- children: [Be && /* @__PURE__ */ y(h, { children: [/* @__PURE__ */ v(p, { children: /* @__PURE__ */ v(m, {
808
+ children: [Ve && /* @__PURE__ */ v(m, { children: [/* @__PURE__ */ _(f, { children: /* @__PURE__ */ _(p, {
809
809
  className: "text-base",
810
810
  children: x("collaborationConsole.createMspTitle", "Propose MSP Organization Link")
811
- }) }), /* @__PURE__ */ v(f, { children: /* @__PURE__ */ y("form", {
811
+ }) }), /* @__PURE__ */ _(d, { children: /* @__PURE__ */ v("form", {
812
812
  onSubmit: (e) => void Ze(e),
813
813
  className: "space-y-4",
814
814
  children: [
815
- /* @__PURE__ */ y("div", {
815
+ /* @__PURE__ */ v("div", {
816
816
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
817
817
  children: [
818
- /* @__PURE__ */ y("div", {
818
+ /* @__PURE__ */ v("div", {
819
819
  className: "space-y-1",
820
- children: [/* @__PURE__ */ v("label", {
820
+ children: [/* @__PURE__ */ _("label", {
821
821
  className: "text-xs font-medium text-text-secondary",
822
822
  htmlFor: "msp-client-org-id",
823
823
  children: "Client Organization ID *"
824
- }), /* @__PURE__ */ v(g, {
824
+ }), /* @__PURE__ */ _(h, {
825
825
  id: "msp-client-org-id",
826
- value: L,
827
- onChange: (e) => R(e.target.value),
826
+ value: I,
827
+ onChange: (e) => L(e.target.value),
828
828
  placeholder: "UUID of client organization",
829
829
  required: !0
830
830
  })]
831
831
  }),
832
- /* @__PURE__ */ y("div", {
832
+ /* @__PURE__ */ v("div", {
833
833
  className: "space-y-1",
834
- children: [/* @__PURE__ */ v("label", {
834
+ children: [/* @__PURE__ */ _("label", {
835
835
  className: "text-xs font-medium text-text-secondary",
836
836
  htmlFor: "msp-client-org-name",
837
837
  children: "Client Organization Name *"
838
- }), /* @__PURE__ */ v(g, {
838
+ }), /* @__PURE__ */ _(h, {
839
839
  id: "msp-client-org-name",
840
- value: z,
841
- onChange: (e) => B(e.target.value),
840
+ value: R,
841
+ onChange: (e) => z(e.target.value),
842
842
  placeholder: "e.g. Acme Client Corp",
843
843
  required: !0
844
844
  })]
845
845
  }),
846
- /* @__PURE__ */ y("div", {
846
+ /* @__PURE__ */ v("div", {
847
847
  className: "space-y-1",
848
- children: [/* @__PURE__ */ v("label", {
848
+ children: [/* @__PURE__ */ _("label", {
849
849
  className: "text-xs font-medium text-text-secondary",
850
850
  htmlFor: "msp-client-ws",
851
851
  children: "Primary Client Workspace ID (Optional)"
852
- }), /* @__PURE__ */ v(g, {
852
+ }), /* @__PURE__ */ _(h, {
853
853
  id: "msp-client-ws",
854
- value: V,
855
- onChange: (e) => H(e.target.value),
854
+ value: B,
855
+ onChange: (e) => V(e.target.value),
856
856
  placeholder: "Optional workspace UUID"
857
857
  })]
858
858
  }),
859
- /* @__PURE__ */ y("div", {
859
+ /* @__PURE__ */ v("div", {
860
860
  className: "space-y-1",
861
- children: [/* @__PURE__ */ v("label", {
861
+ children: [/* @__PURE__ */ _("label", {
862
862
  className: "text-xs font-medium text-text-secondary",
863
863
  htmlFor: "msp-billing-mode",
864
864
  children: "Billing Aggregation Mode"
865
- }), /* @__PURE__ */ v("select", {
865
+ }), /* @__PURE__ */ _("select", {
866
866
  id: "msp-billing-mode",
867
- value: U,
868
- onChange: (e) => Ve(e.target.value),
867
+ value: H,
868
+ onChange: (e) => He(e.target.value),
869
869
  className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
870
- children: je.map((e) => /* @__PURE__ */ v("option", {
870
+ children: je.map((e) => /* @__PURE__ */ _("option", {
871
871
  value: e.value,
872
872
  children: e.label
873
873
  }, e.value))
874
874
  })]
875
875
  }),
876
- /* @__PURE__ */ y("div", {
876
+ /* @__PURE__ */ v("div", {
877
877
  className: "space-y-1",
878
- children: [/* @__PURE__ */ v("label", {
878
+ children: [/* @__PURE__ */ _("label", {
879
879
  className: "text-xs font-medium text-text-secondary",
880
880
  htmlFor: "msp-seat-budget",
881
881
  children: "Monthly Seat Budget (Optional)"
882
- }), /* @__PURE__ */ v(g, {
882
+ }), /* @__PURE__ */ _(h, {
883
883
  id: "msp-seat-budget",
884
884
  type: "number",
885
885
  min: 1,
886
- value: W,
887
- onChange: (e) => G(e.target.value),
886
+ value: U,
887
+ onChange: (e) => W(e.target.value),
888
888
  placeholder: "e.g. 50"
889
889
  })]
890
890
  }),
891
- /* @__PURE__ */ y("div", {
891
+ /* @__PURE__ */ v("div", {
892
892
  className: "space-y-1",
893
- children: [/* @__PURE__ */ v("label", {
893
+ children: [/* @__PURE__ */ _("label", {
894
894
  className: "text-xs font-medium text-text-secondary",
895
895
  htmlFor: "msp-notes",
896
896
  children: "Agreement Notes"
897
- }), /* @__PURE__ */ v(g, {
897
+ }), /* @__PURE__ */ _(h, {
898
898
  id: "msp-notes",
899
- value: K,
900
- onChange: (e) => He(e.target.value),
899
+ value: G,
900
+ onChange: (e) => Ue(e.target.value),
901
901
  placeholder: "Optional MSP engagement reference"
902
902
  })]
903
903
  })
904
904
  ]
905
905
  }),
906
- /* @__PURE__ */ y("div", {
906
+ /* @__PURE__ */ v("div", {
907
907
  className: "space-y-2",
908
- children: [/* @__PURE__ */ v("p", {
908
+ children: [/* @__PURE__ */ _("p", {
909
909
  className: "text-xs font-medium text-text-secondary",
910
910
  children: "Delegated Permission Scopes *"
911
- }), /* @__PURE__ */ v("div", {
911
+ }), /* @__PURE__ */ _("div", {
912
912
  className: "flex flex-wrap gap-2",
913
913
  children: Oe.map((e) => {
914
- let t = q.includes(e.value);
915
- return /* @__PURE__ */ v(d, {
914
+ let t = K.includes(e.value);
915
+ return /* @__PURE__ */ _(u, {
916
916
  type: "button",
917
917
  size: "sm",
918
918
  variant: t ? "default" : "outline",
@@ -922,56 +922,56 @@ function x() {
922
922
  })
923
923
  })]
924
924
  }),
925
- /* @__PURE__ */ y("div", {
925
+ /* @__PURE__ */ v("div", {
926
926
  className: "flex items-center gap-2",
927
- children: [/* @__PURE__ */ v(d, {
927
+ children: [/* @__PURE__ */ _(u, {
928
928
  type: "submit",
929
929
  disabled: X.createMspLink.isPending,
930
930
  children: X.createMspLink.isPending ? "Proposing..." : "Propose MSP Link"
931
- }), /* @__PURE__ */ v(d, {
931
+ }), /* @__PURE__ */ _(u, {
932
932
  type: "button",
933
933
  variant: "outline",
934
- onClick: () => I(!1),
934
+ onClick: () => F(!1),
935
935
  children: "Cancel"
936
936
  })]
937
937
  })
938
938
  ]
939
- }) })] }), Ge.isLoading ? /* @__PURE__ */ v(_, { className: "h-32 w-full rounded-card" }) : $.length === 0 ? /* @__PURE__ */ v(h, { children: /* @__PURE__ */ y(f, {
939
+ }) })] }), Ge.isLoading ? /* @__PURE__ */ _(g, { className: "h-32 w-full rounded-card" }) : $.length === 0 ? /* @__PURE__ */ _(m, { children: /* @__PURE__ */ v(d, {
940
940
  className: "p-8 text-center",
941
- children: [/* @__PURE__ */ v("p", {
941
+ children: [/* @__PURE__ */ _("p", {
942
942
  className: "text-text-primary font-medium",
943
943
  children: x("collaborationConsole.noMspLinks", "No MSP organization links yet")
944
- }), /* @__PURE__ */ v("p", {
944
+ }), /* @__PURE__ */ _("p", {
945
945
  className: "text-sm text-text-secondary mt-1",
946
946
  children: x("collaborationConsole.noMspLinksHint", "Link managed client organizations to oversee workspaces, delegated roles, and consolidated seat usage from one console.")
947
947
  })]
948
- }) }) : /* @__PURE__ */ v("div", {
948
+ }) }) : /* @__PURE__ */ _("div", {
949
949
  className: "space-y-3",
950
950
  children: $.map((e) => {
951
951
  let t = !!(Me && e.clientOrgId === Me);
952
- return /* @__PURE__ */ v(h, {
952
+ return /* @__PURE__ */ _(m, {
953
953
  treatment: "insight",
954
- children: /* @__PURE__ */ y(f, {
954
+ children: /* @__PURE__ */ v(d, {
955
955
  className: "p-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3",
956
- children: [/* @__PURE__ */ y("div", {
956
+ children: [/* @__PURE__ */ v("div", {
957
957
  className: "space-y-1 min-w-0",
958
958
  children: [
959
- /* @__PURE__ */ y("div", {
959
+ /* @__PURE__ */ v("div", {
960
960
  className: "flex flex-wrap items-center gap-2",
961
961
  children: [
962
- /* @__PURE__ */ v("span", {
962
+ /* @__PURE__ */ _("span", {
963
963
  className: "font-semibold text-text-primary",
964
964
  children: e.clientOrgName
965
965
  }),
966
- /* @__PURE__ */ v(u, {
966
+ /* @__PURE__ */ _(l, {
967
967
  className: `text-xs border ${b(e.status)}`,
968
968
  children: e.status
969
969
  }),
970
- /* @__PURE__ */ v(u, {
970
+ /* @__PURE__ */ _(l, {
971
971
  variant: "outline",
972
972
  children: e.billingMode
973
973
  }),
974
- e.monthlySeatBudget ? /* @__PURE__ */ y(u, {
974
+ e.monthlySeatBudget ? /* @__PURE__ */ v(l, {
975
975
  variant: "secondary",
976
976
  children: [
977
977
  "Budget: ",
@@ -981,67 +981,67 @@ function x() {
981
981
  }) : null
982
982
  ]
983
983
  }),
984
- /* @__PURE__ */ y("p", {
984
+ /* @__PURE__ */ v("p", {
985
985
  className: "text-xs text-text-secondary",
986
986
  children: [
987
987
  "MSP Org: ",
988
- /* @__PURE__ */ v("code", { children: e.mspOrgId }),
988
+ /* @__PURE__ */ _("code", { children: e.mspOrgId }),
989
989
  " → Client Org:",
990
990
  " ",
991
- /* @__PURE__ */ v("code", { children: e.clientOrgId })
991
+ /* @__PURE__ */ _("code", { children: e.clientOrgId })
992
992
  ]
993
993
  }),
994
- /* @__PURE__ */ v("div", {
994
+ /* @__PURE__ */ _("div", {
995
995
  className: "flex flex-wrap gap-1 pt-1",
996
- children: e.delegatedScopes.map((e) => /* @__PURE__ */ v(u, {
996
+ children: e.delegatedScopes.map((e) => /* @__PURE__ */ _(l, {
997
997
  variant: "secondary",
998
998
  className: "text-xs",
999
999
  children: e
1000
1000
  }, e))
1001
1001
  })
1002
1002
  ]
1003
- }), /* @__PURE__ */ y("div", {
1003
+ }), /* @__PURE__ */ v("div", {
1004
1004
  className: "flex flex-wrap items-center gap-2 shrink-0",
1005
1005
  children: [
1006
- t && e.status === a.Pending && /* @__PURE__ */ y(d, {
1006
+ t && e.status === i.Pending && /* @__PURE__ */ v(u, {
1007
1007
  size: "sm",
1008
1008
  onClick: () => void Qe(e.id),
1009
1009
  disabled: X.approveMspLink.isPending,
1010
1010
  className: "gap-1",
1011
- children: [/* @__PURE__ */ v(pe, {
1011
+ children: [/* @__PURE__ */ _(fe, {
1012
1012
  size: 14,
1013
1013
  "aria-hidden": "true"
1014
1014
  }), "Approve Link"]
1015
1015
  }),
1016
- e.status === a.Active && /* @__PURE__ */ y(d, {
1016
+ e.status === i.Active && /* @__PURE__ */ v(u, {
1017
1017
  size: "sm",
1018
1018
  variant: "outline",
1019
- onClick: () => void $e(e.id, a.Suspended),
1019
+ onClick: () => void $e(e.id, i.Suspended),
1020
1020
  disabled: X.updateMspLink.isPending,
1021
1021
  className: "gap-1",
1022
- children: [/* @__PURE__ */ v(ve, {
1022
+ children: [/* @__PURE__ */ _(_e, {
1023
1023
  size: 14,
1024
1024
  "aria-hidden": "true"
1025
1025
  }), "Suspend"]
1026
1026
  }),
1027
- t && e.status === a.Suspended && /* @__PURE__ */ y(d, {
1027
+ t && e.status === i.Suspended && /* @__PURE__ */ v(u, {
1028
1028
  size: "sm",
1029
1029
  variant: "outline",
1030
- onClick: () => void $e(e.id, a.Active),
1030
+ onClick: () => void $e(e.id, i.Active),
1031
1031
  disabled: X.updateMspLink.isPending,
1032
1032
  className: "gap-1",
1033
- children: [/* @__PURE__ */ v(ye, {
1033
+ children: [/* @__PURE__ */ _(ve, {
1034
1034
  size: 14,
1035
1035
  "aria-hidden": "true"
1036
1036
  }), "Resume"]
1037
1037
  }),
1038
- e.status !== a.Revoked && /* @__PURE__ */ y(d, {
1038
+ e.status !== i.Revoked && /* @__PURE__ */ v(u, {
1039
1039
  size: "sm",
1040
1040
  variant: "outline",
1041
1041
  onClick: () => void et(e.id),
1042
1042
  disabled: X.revokeMspLink.isPending,
1043
1043
  className: "gap-1 text-status-error-text",
1044
- children: [/* @__PURE__ */ v(Ce, {
1044
+ children: [/* @__PURE__ */ _(Ce, {
1045
1045
  size: 14,
1046
1046
  "aria-hidden": "true"
1047
1047
  }), "Revoke"]