prometeo-design-system 4.2.5 → 4.3.0

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,32 +1,32 @@
1
1
  import { j as e } from "./jsx-runtime-GkKLlHH4.js";
2
- import { u as We, g as pt } from "./useDevice-vwn4GLwK.js";
2
+ import { u as qe, g as bt } from "./useDevice-vwn4GLwK.js";
3
3
  import { c as T } from "./cn-B6yFEsav.js";
4
4
  import { g as we } from "./utils-X4-h3cum.js";
5
- import ze, { forwardRef as me, useState as J, useRef as A, useEffect as Z, memo as B, useContext as $e, createContext as Oe, useCallback as x, Children as ht, isValidElement as Ne, useMemo as ue, useImperativeHandle as Ie, useLayoutEffect as bt, use as xt } from "react";
6
- import { createPortal as Ue } from "react-dom";
7
- import { useLocation as gt, useNavigate as vt } from "react-router";
8
- import { CloseNavBarDesktop as wt } from "./Icons/CloseNavBarDesktop.es.js";
9
- import { c as Ee } from "./index-BOQuZ0gG.js";
10
- import { B as qe } from "./badge-BEx-0Q-K.js";
11
- import Nt from "./PlainTooltip.es.js";
12
- import { CrevronLeft as yt } from "./Icons/CrevronLeft.es.js";
5
+ import Ue, { forwardRef as me, useState as X, useRef as A, useEffect as Q, memo as B, useContext as $e, createContext as Ie, useCallback as h, Children as ht, isValidElement as Ne, useMemo as ue, useImperativeHandle as Ee, useLayoutEffect as xt, use as gt } from "react";
6
+ import { createPortal as He } from "react-dom";
7
+ import { useLocation as vt, useNavigate as wt } from "react-router";
8
+ import { CloseNavBarDesktop as Nt } from "./Icons/CloseNavBarDesktop.es.js";
9
+ import { c as Pe } from "./index-BOQuZ0gG.js";
10
+ import { B as Ke } from "./badge-BEx-0Q-K.js";
11
+ import yt from "./PlainTooltip.es.js";
12
+ import { CrevronLeft as Ct } from "./Icons/CrevronLeft.es.js";
13
13
  import { Scrollable as pe } from "./Scrollable.es.js";
14
14
  import se from "./TicketCard.es.js";
15
- import Ke from "./UserCard.es.js";
15
+ import Ye from "./UserCard.es.js";
16
16
  import fe from "./Button.es.js";
17
- import { Logout as Ct } from "./Icons/Logout.es.js";
18
- import St from "./NotificationCard.es.js";
19
- import { T as jt, a as kt } from "./TabLinks-DxqprStp.js";
20
- import { Notifications as Ye } from "./Icons/Notifications.es.js";
21
- import { Close as Pe } from "./Icons/Close.es.js";
22
- import { Help as Xe } from "./Icons/Help.es.js";
23
- import { Settings as Dt } from "./Icons/Settings.es.js";
24
- const Lt = me((t, r) => {
25
- const [s, o] = J(t?.currentTabName || t.tabs[0].name), c = A(null), { tabs: a = [], className: f, activeColor: m = "var(--neutral-900)", currentSystemId: u } = t;
26
- Z(() => {
27
- c.current?.style.setProperty("--tab-bg", m);
17
+ import { Logout as St } from "./Icons/Logout.es.js";
18
+ import jt from "./NotificationCard.es.js";
19
+ import { T as kt, a as Dt } from "./TabLinks-DxqprStp.js";
20
+ import { Notifications as Xe } from "./Icons/Notifications.es.js";
21
+ import { Close as _e } from "./Icons/Close.es.js";
22
+ import { Help as Je } from "./Icons/Help.es.js";
23
+ import { Settings as Lt } from "./Icons/Settings.es.js";
24
+ const Tt = me((t, r) => {
25
+ const [s, o] = X(t?.currentTabName || t.tabs[0].name), d = A(null), { tabs: a = [], className: f, activeColor: m = "var(--neutral-900)", currentSystemId: u } = t;
26
+ Q(() => {
27
+ d.current?.style.setProperty("--tab-bg", m);
28
28
  }, [m]);
29
- const h = a.find((i) => i.id === u || i.name === (t?.currentTabName || s));
29
+ const b = a.find((i) => i.id === u || i.name === (t?.currentTabName || s));
30
30
  return /* @__PURE__ */ e.jsx(
31
31
  "div",
32
32
  {
@@ -41,7 +41,7 @@ const Lt = me((t, r) => {
41
41
  ),
42
42
  children: a.map(
43
43
  (i) => {
44
- const g = i.name === h?.name, b = typeof i.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: i.thumbnail, alt: i.description, className: "aspect-square object-contain rounded", draggable: !1 }) : i.thumbnail, j = () => {
44
+ const g = i.name === b?.name, x = typeof i.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: i.thumbnail, alt: i.description, className: "aspect-square object-contain rounded", draggable: !1 }) : i.thumbnail, j = () => {
45
45
  i.disabled || (o(i.name), i.onClick && i.onClick(i.name));
46
46
  };
47
47
  return /* @__PURE__ */ e.jsx(
@@ -56,14 +56,14 @@ const Lt = me((t, r) => {
56
56
  g && "active"
57
57
  ),
58
58
  onClick: j,
59
- ref: c,
59
+ ref: d,
60
60
  children: /* @__PURE__ */ e.jsx("div", { className: T(
61
61
  "size-8 rounded-[4px]",
62
62
  "grid place-items-center",
63
63
  "tab-thumbnail-icon",
64
64
  "bg-transparent text-neutral-default-default",
65
65
  i?.className
66
- ), children: b })
66
+ ), children: x })
67
67
  },
68
68
  i.name
69
69
  );
@@ -71,26 +71,26 @@ const Lt = me((t, r) => {
71
71
  )
72
72
  }
73
73
  );
74
- }), Je = B(me(({ children: t, className: r, context: s, modal: o = !1, closeOnOverlayClick: c = !1, unmountChildrenOnClose: a = !0 }, f) => {
75
- const m = he(t, s), u = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: h } = Tt(), { closeSidebar: i } = ce(), [g, b] = J(() => a ? h : !0), [j, L] = J(!1);
76
- return Z(() => {
74
+ }), Ge = B(me(({ children: t, className: r, context: s, modal: o = !1, closeOnOverlayClick: d = !1, unmountChildrenOnClose: a = !0 }, f) => {
75
+ const m = be(t, s), u = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: b } = At(), { closeSidebar: i } = ce(), [g, x] = X(() => a ? b : !0), [j, L] = X(!1);
76
+ return Q(() => {
77
77
  a && s?.subscribeToSidebarOpen((y) => {
78
- y ? (L(!1), b(!0)) : L(!0);
78
+ y ? (L(!1), x(!0)) : L(!0);
79
79
  });
80
- }, [a, s]), Z(() => {
80
+ }, [a, s]), Q(() => {
81
81
  const y = f && typeof f == "object" && "current" in f ? f.current : null;
82
82
  if (!y) return;
83
- const w = () => {
84
- j && (b(!1), L(!1));
83
+ const N = () => {
84
+ j && (x(!1), L(!1));
85
85
  };
86
- return y.addEventListener("transitionend", w), () => y.removeEventListener("transitionend", w);
86
+ return y.addEventListener("transitionend", N), () => y.removeEventListener("transitionend", N);
87
87
  }, [j]), /* @__PURE__ */ e.jsxs("div", { ref: f, className: T("sidebar", u ? "collapsed" : "expanded", "h-full overflow-auto", r), "aria-modal": o || void 0, children: [
88
88
  o && u && /* @__PURE__ */ e.jsx(
89
89
  "div",
90
90
  {
91
91
  className: T("navigation-drawer-sidebar-overlay"),
92
92
  onClick: (y) => {
93
- y.preventDefault(), y.stopPropagation(), c && i?.();
93
+ y.preventDefault(), y.stopPropagation(), d && i?.();
94
94
  },
95
95
  "aria-hidden": "true"
96
96
  }
@@ -100,45 +100,45 @@ const Lt = me((t, r) => {
100
100
  g && m
101
101
  ] })
102
102
  ] });
103
- })), Ge = Oe(null), Qe = Oe(null), Tt = () => {
104
- const t = $e(Ge);
103
+ })), Qe = Ie(null), Ze = Ie(null), At = () => {
104
+ const t = $e(Qe);
105
105
  if (!t) throw new Error("useDrawerState must be used within NavigationDrawer");
106
106
  return t;
107
107
  }, ce = () => {
108
- const t = $e(Qe);
108
+ const t = $e(Ze);
109
109
  if (!t) throw new Error("useDrawerActions must be used within NavigationDrawer");
110
110
  return t;
111
- }, he = (t, r) => typeof t == "function" ? r ? t(r) : null : t, Ze = "navigation-drawer-collapsed", He = () => {
111
+ }, be = (t, r) => typeof t == "function" ? r ? t(r) : null : t, et = "navigation-drawer-collapsed", Ve = () => {
112
112
  if (typeof window > "u") return !1;
113
113
  try {
114
- const t = sessionStorage.getItem(Ze);
114
+ const t = sessionStorage.getItem(et);
115
115
  return t ? JSON.parse(t) : !1;
116
116
  } catch {
117
117
  return !1;
118
118
  }
119
- }, At = (t) => {
119
+ }, Ot = (t) => {
120
120
  if (!(typeof window > "u"))
121
121
  try {
122
- sessionStorage.setItem(Ze, JSON.stringify(t));
122
+ sessionStorage.setItem(et, JSON.stringify(t));
123
123
  } catch {
124
124
  }
125
- }, Ot = (t) => {
126
- const { children: r, classNameDrawer: s, classNameSidebar: o, disableDragOpen: c } = t, a = A(null), f = A(null), m = t.outletRef ?? A(null), u = A(null), h = A(He()), i = A(!1), g = A("drawer"), b = A(/* @__PURE__ */ new Set()), j = A(/* @__PURE__ */ new Set()), L = A(!1), y = A(null), w = x((n) => {
125
+ }, It = (t) => {
126
+ const { children: r, classNameDrawer: s, classNameSidebar: o, disableDragOpen: d } = t, a = A(null), f = A(null), m = t.outletRef ?? A(null), u = A(null), b = A(Ve()), i = A(!1), g = A("drawer"), x = A(/* @__PURE__ */ new Set()), j = A(/* @__PURE__ */ new Set()), L = A(!1), y = A(null), N = h((n) => {
127
127
  const p = f.current;
128
128
  p && (p.classList.toggle("collapsed", n), p.classList.toggle("expanded", !n));
129
- }, []), k = x((n) => {
129
+ }, []), k = h((n) => {
130
130
  const p = u.current;
131
131
  if (!p) return;
132
132
  p.classList.toggle("collapsed", n), p.classList.toggle("expanded", !n);
133
133
  const v = a.current;
134
134
  v && (v.classList.toggle("sidebar-collapsed", n), v.classList.toggle("sidebar-expanded", !n));
135
- }, []), P = x(
135
+ }, []), P = h(
136
136
  (n, { notify: p = !0 } = {}) => {
137
- const v = h.current !== n;
138
- h.current = n, At(n), w(n), p && v && b.current.forEach((E) => E(n));
137
+ const v = b.current !== n;
138
+ b.current = n, Ot(n), N(n), p && v && x.current.forEach((E) => E(n));
139
139
  },
140
- [w]
141
- ), z = x(
140
+ [N]
141
+ ), z = h(
142
142
  (n, { notify: p = !0 } = {}) => {
143
143
  const v = i.current !== n;
144
144
  if (i.current = n, k(n), p && v) {
@@ -147,15 +147,15 @@ const Lt = me((t, r) => {
147
147
  }
148
148
  },
149
149
  [k]
150
- ), C = x(
150
+ ), C = h(
151
151
  (n, { notify: p = !0 } = {}) => {
152
152
  const v = g.current, E = v !== n;
153
153
  g.current = n, window.matchMedia("(min-width: 768px)").matches || P(n !== "drawer", { notify: p });
154
154
  const W = v === "sidebar", V = n === "sidebar";
155
- p && E && W !== V && j.current.forEach((X) => X(V)), z(n !== "sidebar", { notify: p }), P(n !== "drawer", { notify: p });
155
+ p && E && W !== V && j.current.forEach((Y) => Y(V)), z(n !== "sidebar", { notify: p }), P(n !== "drawer", { notify: p });
156
156
  },
157
157
  [P, z]
158
- ), H = x((n) => {
158
+ ), H = h((n) => {
159
159
  const p = a.current;
160
160
  if (!p || window.matchMedia("(min-width: 768px)").matches) return;
161
161
  L.current = !0;
@@ -167,7 +167,7 @@ const Lt = me((t, r) => {
167
167
  p.addEventListener("scrollend", V, { once: !0 }), setTimeout(() => {
168
168
  L.current && V();
169
169
  }, 1e3);
170
- }, []), d = x(() => {
170
+ }, []), c = h(() => {
171
171
  const n = a.current, p = m.current;
172
172
  if (!n || !p || window.matchMedia("(min-width: 768px)").matches) return;
173
173
  const v = [
@@ -176,67 +176,67 @@ const Lt = me((t, r) => {
176
176
  ], E = u.current;
177
177
  E && v.push({ panel: "sidebar", offset: E.offsetLeft });
178
178
  const W = n.scrollLeft;
179
- let V = v[0], X = Math.abs(W - V.offset);
179
+ let V = v[0], Y = Math.abs(W - V.offset);
180
180
  for (let ee = 1; ee < v.length; ee++) {
181
181
  const te = Math.abs(W - v[ee].offset);
182
- te < X && (V = v[ee], X = te);
182
+ te < Y && (V = v[ee], Y = te);
183
183
  }
184
184
  C(V.panel);
185
185
  }, [C]);
186
- Z(() => {
186
+ Q(() => {
187
187
  const n = a.current;
188
- n && (c?.drawer && n.classList.add("disabled-dragopen"), c?.sidebar && n.classList.add("disabled-dragopen-sidebar"));
189
- }, [c, a]), Z(() => {
188
+ n && (d?.drawer && n.classList.add("disabled-dragopen"), d?.sidebar && n.classList.add("disabled-dragopen-sidebar"));
189
+ }, [d, a]), Q(() => {
190
190
  const n = a.current, p = m.current;
191
191
  if (!n || !p) return;
192
192
  if (window.matchMedia("(min-width: 768px)").matches) {
193
- const E = He();
193
+ const E = Ve();
194
194
  P(E, { notify: !1 }), z(!0, { notify: !1 });
195
195
  return;
196
196
  }
197
197
  requestAnimationFrame(() => {
198
198
  n.scrollLeft = p.offsetLeft, C("outlet");
199
199
  });
200
- }, [C, P, z]), Z(() => {
200
+ }, [C, P, z]), Q(() => {
201
201
  const n = a.current;
202
202
  if (!n || !m.current) return;
203
203
  let v = !1, E = 0, W = 0;
204
204
  const V = (D) => {
205
205
  E = D.touches[0].clientX, W = D.touches[0].clientY;
206
- }, X = (D, $) => {
207
- const U = window.getComputedStyle(D), re = $ === "x" ? U.overflowX : U.overflowY;
208
- return /(auto|scroll|overlay)/.test(re) ? $ === "x" ? D.scrollWidth > D.clientWidth : D.scrollHeight > D.clientHeight : !1;
209
- }, ee = (D, $) => {
206
+ }, Y = (D, q) => {
207
+ const U = window.getComputedStyle(D), re = q === "x" ? U.overflowX : U.overflowY;
208
+ return /(auto|scroll|overlay)/.test(re) ? q === "x" ? D.scrollWidth > D.clientWidth : D.scrollHeight > D.clientHeight : !1;
209
+ }, ee = (D, q) => {
210
210
  let U = D;
211
211
  for (; U && U !== n; ) {
212
- if (X(U, $))
212
+ if (Y(U, q))
213
213
  return U;
214
214
  U = U.parentElement;
215
215
  }
216
216
  return null;
217
- }, te = (D, $, U) => U === 0 ? !1 : $ === "x" ? U < 0 ? D.scrollLeft + D.clientWidth < D.scrollWidth : D.scrollLeft > 0 : U < 0 ? D.scrollTop + D.clientHeight < D.scrollHeight : D.scrollTop > 0, ge = (D) => {
217
+ }, te = (D, q, U) => U === 0 ? !1 : q === "x" ? U < 0 ? D.scrollLeft + D.clientWidth < D.scrollWidth : D.scrollLeft > 0 : U < 0 ? D.scrollTop + D.clientHeight < D.scrollHeight : D.scrollTop > 0, ge = (D) => {
218
218
  if (!(D.target instanceof HTMLElement)) return;
219
- const $ = D.touches[0].clientX - E, U = D.touches[0].clientY - W, re = Math.abs($) > Math.abs(U) ? "x" : "y", l = re === "x" ? $ : U, N = ee(D.target, re);
220
- if (N && te(N, re, l))
219
+ const q = D.touches[0].clientX - E, U = D.touches[0].clientY - W, re = Math.abs(q) > Math.abs(U) ? "x" : "y", De = re === "x" ? q : U, l = ee(D.target, re);
220
+ if (l && te(l, re, De))
221
221
  return;
222
- const O = n.classList.contains("disabled-dragopen"), S = n.classList.contains("disabled-dragopen-sidebar"), K = () => D.cancelable ? (D.preventDefault(), !0) : !1;
222
+ const w = n.classList.contains("disabled-dragopen"), O = n.classList.contains("disabled-dragopen-sidebar"), S = () => D.cancelable ? (D.preventDefault(), !0) : !1;
223
223
  if (re === "x") {
224
- if ($ > 0) {
225
- if (g.current === "sidebar" && !S) {
224
+ if (q > 0) {
225
+ if (g.current === "sidebar" && !O) {
226
226
  v = !0;
227
227
  return;
228
228
  }
229
- if (O) {
230
- K();
229
+ if (w) {
230
+ S();
231
231
  return;
232
232
  }
233
- } else if ($ < 0) {
234
- if (g.current === "drawer" && !O) {
233
+ } else if (q < 0) {
234
+ if (g.current === "drawer" && !w) {
235
235
  v = !0;
236
236
  return;
237
237
  }
238
- if (S) {
239
- K();
238
+ if (O) {
239
+ S();
240
240
  return;
241
241
  }
242
242
  }
@@ -244,15 +244,15 @@ const Lt = me((t, r) => {
244
244
  }
245
245
  }, ve = () => {
246
246
  setTimeout(() => {
247
- v && (d(), v = !1);
247
+ v && (c(), v = !1);
248
248
  }, 100);
249
249
  };
250
250
  return n.addEventListener("touchstart", V, { passive: !0 }), n.addEventListener("touchmove", ge, { passive: !1 }), n.addEventListener("touchend", ve), () => {
251
251
  n.removeEventListener("touchstart", V), n.removeEventListener("touchmove", ge), n.removeEventListener("touchend", ve);
252
252
  };
253
- }, [d]);
254
- const _ = x(() => {
255
- const n = window.matchMedia("(min-width: 768px)").matches, p = !h.current;
253
+ }, [c]);
254
+ const _ = h(() => {
255
+ const n = window.matchMedia("(min-width: 768px)").matches, p = !b.current;
256
256
  if (n) {
257
257
  P(p);
258
258
  return;
@@ -262,9 +262,9 @@ const Lt = me((t, r) => {
262
262
  }, [H, C, P]), M = A(null);
263
263
  M.current || (M.current = {
264
264
  toggleCollapse: () => _(),
265
- getIsCollapsed: () => h.current,
266
- subscribeToCollapse: (n) => (b.current.add(n), () => {
267
- b.current.delete(n);
265
+ getIsCollapsed: () => b.current,
266
+ subscribeToCollapse: (n) => (x.current.add(n), () => {
267
+ x.current.delete(n);
268
268
  }),
269
269
  openSidebar: () => {
270
270
  if (u.current) {
@@ -323,46 +323,46 @@ const Lt = me((t, r) => {
323
323
  p.classList.add("disabled-dragopen-sidebar");
324
324
  }
325
325
  });
326
- const F = M.current, Y = typeof r == "function" ? r(F) : r, R = ht.toArray(Y);
327
- let I = null, q = null, ne = null;
328
- const G = [];
326
+ const F = M.current, K = typeof r == "function" ? r(F) : r, R = ht.toArray(K);
327
+ let I = null, $ = null, ne = null;
328
+ const J = [];
329
329
  let oe = null, le = null;
330
330
  R.forEach((n) => {
331
331
  if (!Ne(n)) {
332
- G.push(n);
332
+ J.push(n);
333
333
  return;
334
334
  }
335
- if (n.type === _e && !I) {
335
+ if (n.type === Me && !I) {
336
336
  I = n;
337
337
  return;
338
338
  }
339
- if (n.type === ye && !q) {
340
- q = n;
339
+ if (n.type === ye && !$) {
340
+ $ = n;
341
341
  return;
342
342
  }
343
343
  if (n.type === Ce && !ne) {
344
344
  ne = n;
345
345
  return;
346
346
  }
347
- if (n.type === Le && !oe) {
347
+ if (n.type === Te && !oe) {
348
348
  oe = n;
349
349
  return;
350
350
  }
351
- if (n.type === Je && !le) {
351
+ if (n.type === Ge && !le) {
352
352
  le = n;
353
353
  return;
354
354
  }
355
- G.push(n);
355
+ J.push(n);
356
356
  });
357
- const be = !!q, de = q ?? (G.length ? /* @__PURE__ */ e.jsx(ye, { children: G }) : null), Re = be ? G : [], ie = oe ?? (!!oe ? /* @__PURE__ */ e.jsx(Le, { children: Y }) : null), je = ne ?? (!!ne ? /* @__PURE__ */ e.jsx(Ce, { children: ne }) : null), ke = !!le, ae = le, xe = ue(() => ({
358
- isCollapsed: h.current,
357
+ const he = !!$, de = $ ?? (J.length ? /* @__PURE__ */ e.jsx(ye, { children: J }) : null), Be = he ? J : [], ie = oe ?? (!!oe ? /* @__PURE__ */ e.jsx(Te, { children: K }) : null), je = ne ?? (!!ne ? /* @__PURE__ */ e.jsx(Ce, { children: ne }) : null), ke = !!le, ae = le, xe = ue(() => ({
358
+ isCollapsed: b.current,
359
359
  isSidebarOpen: !i.current
360
- }), [h.current, i.current]);
361
- return /* @__PURE__ */ e.jsx(Ge.Provider, { value: xe, children: /* @__PURE__ */ e.jsx(Qe.Provider, { value: F, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: a, className: T(
360
+ }), [b.current, i.current]);
361
+ return /* @__PURE__ */ e.jsx(Qe.Provider, { value: xe, children: /* @__PURE__ */ e.jsx(Ze.Provider, { value: F, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: a, className: T(
362
362
  "w-full h-full max-h-dvh overflow-y-hidden",
363
363
  ke ? "navigation-drawer-with-sidebar" : "navigation-drawer",
364
- c?.drawer ? "disabled-dragopen" : "",
365
- c?.sidebar ? "disabled-dragopen-sidebar" : ""
364
+ d?.drawer ? "disabled-dragopen" : "",
365
+ d?.sidebar ? "disabled-dragopen-sidebar" : ""
366
366
  ), children: [
367
367
  /* @__PURE__ */ e.jsxs(
368
368
  "div",
@@ -370,17 +370,17 @@ const Lt = me((t, r) => {
370
370
  ref: f,
371
371
  className: T(
372
372
  "bg-neutral-default-default border-r border-neutral-strong-default h-dvh md:h-screen p-4 overflow-hidden drawer flex flex-col gap-4",
373
- h.current ? "collapsed" : "expanded w-min",
373
+ b.current ? "collapsed" : "expanded w-min",
374
374
  s
375
375
  ),
376
376
  children: [
377
377
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 gap-4 overflow-hidden", children: [
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
379
- /* @__PURE__ */ e.jsx(et, { onToggleCollapse: _ }),
379
+ /* @__PURE__ */ e.jsx(tt, { onToggleCollapse: _ }),
380
380
  I
381
381
  ] }),
382
382
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 overflow-hidden relative flex-col", children: [
383
- Re,
383
+ Be,
384
384
  de
385
385
  ] })
386
386
  ] }),
@@ -388,53 +388,53 @@ const Lt = me((t, r) => {
388
388
  ]
389
389
  }
390
390
  ),
391
- ie && Ne(ie) ? ze.cloneElement(ie, { ref: m }) : ie,
392
- ae && Ne(ae) ? ze.cloneElement(ae, {
391
+ ie && Ne(ie) ? Ue.cloneElement(ie, { ref: m }) : ie,
392
+ ae && Ne(ae) ? Ue.cloneElement(ae, {
393
393
  ref: u,
394
394
  className: T("sidebar", ae.props?.className, o)
395
395
  }) : ae
396
396
  ] }) }) });
397
- }, Ve = B(Ot), et = B(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
397
+ }, We = B(It), tt = B(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
398
398
  "button",
399
399
  {
400
400
  type: "button",
401
401
  onClick: t,
402
402
  className: "collapse-button cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300 w-max",
403
- children: /* @__PURE__ */ e.jsx(wt, { size: 32, className: "transition-transform duration-300 p-1" })
403
+ children: /* @__PURE__ */ e.jsx(Nt, { size: 32, className: "transition-transform duration-300 p-1" })
404
404
  }
405
405
  ), (t, r) => t.onToggleCollapse === r.onToggleCollapse);
406
- et.displayName = "NavigationDrawerCollapseButton";
407
- const _e = B(({ children: t, className: r, context: s }) => {
408
- const o = he(t, s);
406
+ tt.displayName = "NavigationDrawerCollapseButton";
407
+ const Me = B(({ children: t, className: r, context: s }) => {
408
+ const o = be(t, s);
409
409
  return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
410
410
  });
411
- _e.displayName = "NavigationDrawerHeader";
411
+ Me.displayName = "NavigationDrawerHeader";
412
412
  const ye = B(({ children: t, className: r, context: s, ...o }) => {
413
- const c = he(t, s);
414
- return /* @__PURE__ */ e.jsx("div", { ...o, className: T("w-full flex-1 drawer-content", r), children: c });
413
+ const d = be(t, s);
414
+ return /* @__PURE__ */ e.jsx("div", { ...o, className: T("w-full flex-1 drawer-content", r), children: d });
415
415
  });
416
416
  ye.displayName = "NavigationDrawerContent";
417
417
  const Ce = B(({ children: t, className: r, context: s }) => {
418
- const o = he(t, s);
418
+ const o = be(t, s);
419
419
  return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
420
420
  });
421
421
  Ce.displayName = "NavigationDrawerFooter";
422
- const tt = B(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: T("w-full border-t border-neutral-strong-default ", t) }));
423
- tt.displayName = "NavigationDrawerSpacer";
424
- const Le = B(me(({ children: t, className: r, context: s }, o) => {
425
- const c = he(t, s);
426
- return /* @__PURE__ */ e.jsx("div", { id: "navigation-drawer-outlet", ref: o, className: T("flex-1 overflow-auto ", r), children: c });
427
- }), (t, r) => t.children === r.children && t.className === r.className), Q = Object.assign(Ve, {
428
- Root: Ve,
429
- Header: _e,
422
+ const rt = B(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: T("w-full border-t border-neutral-strong-default ", t) }));
423
+ rt.displayName = "NavigationDrawerSpacer";
424
+ const Te = B(me(({ children: t, className: r, context: s }, o) => {
425
+ const d = be(t, s);
426
+ return /* @__PURE__ */ e.jsx("div", { id: "navigation-drawer-outlet", ref: o, className: T("flex-1 overflow-auto ", r), children: d });
427
+ }), (t, r) => t.children === r.children && t.className === r.className), G = Object.assign(We, {
428
+ Root: We,
429
+ Header: Me,
430
430
  Content: ye,
431
431
  Footer: Ce,
432
- Spacer: tt,
433
- Outlet: Le,
434
- Sidebar: Je
432
+ Spacer: rt,
433
+ Outlet: Te,
434
+ Sidebar: Ge
435
435
  });
436
- Q.displayName = "NavigationDrawer";
437
- const It = "hover:bg-neutral-medium-hover", Et = Ee("", {
436
+ G.displayName = "NavigationDrawer";
437
+ const Et = "hover:bg-neutral-medium-hover", Pt = Pe("", {
438
438
  variants: {
439
439
  isSelected: {
440
440
  true: "bg-neutral-medium-selected ",
@@ -445,7 +445,7 @@ const It = "hover:bg-neutral-medium-hover", Et = Ee("", {
445
445
  false: "cursor-pointer"
446
446
  }
447
447
  }
448
- }), Pt = Ee(
448
+ }), _t = Pe(
449
449
  T(
450
450
  "select-none line-clamp-1 min-w-max",
451
451
  "prometeo-fonts-label-large transition-colors duration-300 ease-out"
@@ -468,7 +468,7 @@ const It = "hover:bg-neutral-medium-hover", Et = Ee("", {
468
468
  { isSelected: !1, disabled: !1, className: " text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
469
469
  ]
470
470
  }
471
- ), De = Ee(
471
+ ), Le = Pe(
472
472
  T(
473
473
  "transition-colors duration-300 ease-out min-w-max"
474
474
  ),
@@ -490,30 +490,30 @@ const It = "hover:bg-neutral-medium-hover", Et = Ee("", {
490
490
  { isSelected: !1, disabled: !1, className: "text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
491
491
  ]
492
492
  }
493
- ), _t = (t) => {
493
+ ), Mt = (t) => {
494
494
  const {
495
495
  title: r,
496
496
  icon: s,
497
497
  count: o,
498
- className: c,
498
+ className: d,
499
499
  isSelected: a = !1,
500
500
  hasSublinks: f,
501
501
  subLinksCollapsed: m,
502
502
  onToggleSublinks: u,
503
- as: h = "div",
503
+ as: b = "div",
504
504
  onClick: i,
505
505
  onAuxClick: g,
506
- disabled: b = !1,
506
+ disabled: x = !1,
507
507
  tooltipText: j
508
508
  } = t, L = (P) => {
509
- b || i?.(P);
509
+ x || i?.(P);
510
510
  }, y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
511
511
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center flex-nowrap", children: [
512
- s && (j ? /* @__PURE__ */ e.jsx(Nt, { title: j, disabled: b, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: De({ disabled: b, isSelected: a }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: De({ disabled: b, isSelected: a }) })),
513
- /* @__PURE__ */ e.jsx("label", { className: Pt({ disabled: b, isSelected: a }), children: r })
512
+ s && (j ? /* @__PURE__ */ e.jsx(yt, { title: j, disabled: x, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: Le({ disabled: x, isSelected: a }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: Le({ disabled: x, isSelected: a }) })),
513
+ /* @__PURE__ */ e.jsx("label", { className: _t({ disabled: x, isSelected: a }), children: r })
514
514
  ] }),
515
515
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
516
- o && o ? /* @__PURE__ */ e.jsx(qe, { count: o, maxCount: 9, className: "badge", disabled: b }) : "",
516
+ o && o ? /* @__PURE__ */ e.jsx(Ke, { count: o, maxCount: 9, className: "badge", disabled: x }) : "",
517
517
  f && /* @__PURE__ */ e.jsx(
518
518
  "div",
519
519
  {
@@ -527,92 +527,92 @@ const It = "hover:bg-neutral-medium-hover", Et = Ee("", {
527
527
  children: /* @__PURE__ */ e.jsx(
528
528
  "button",
529
529
  {
530
- disabled: b,
530
+ disabled: x,
531
531
  type: "button",
532
532
  onClick: u,
533
- className: T("absolute cursor-pointer hover:text-primary-default-hover top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 p-2 z-100 select-none", De({ disabled: b, isSelected: a }), b && "pointer-events-none"),
534
- children: /* @__PURE__ */ e.jsx(yt, {})
533
+ className: T("absolute cursor-pointer hover:text-primary-default-hover top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 p-2 z-100 select-none", Le({ disabled: x, isSelected: a }), x && "pointer-events-none"),
534
+ children: /* @__PURE__ */ e.jsx(Ct, {})
535
535
  }
536
536
  )
537
537
  }
538
538
  )
539
539
  ] })
540
- ] }), w = T(
540
+ ] }), N = T(
541
541
  "group navitem",
542
542
  "h-12 flex-1 flex items-center p-3 rounded-lg justify-between w-full",
543
543
  "transition-all duration-300",
544
- It,
545
- Et({ isSelected: a, disabled: b }),
546
- c
544
+ Et,
545
+ Pt({ isSelected: a, disabled: x }),
546
+ d
547
547
  );
548
- if (h === "a") {
548
+ if (b === "a") {
549
549
  const P = {
550
550
  onClick: L,
551
551
  onAuxClick: g,
552
- className: w
552
+ className: N
553
553
  };
554
554
  return /* @__PURE__ */ e.jsx("a", { ...P, children: y });
555
555
  }
556
- if (h === "button") {
556
+ if (b === "button") {
557
557
  const P = {
558
558
  onClick: L,
559
559
  type: "button",
560
- className: w
560
+ className: N
561
561
  };
562
562
  return /* @__PURE__ */ e.jsx("button", { ...P, children: y });
563
563
  }
564
564
  const k = {
565
565
  onClick: L,
566
- className: w
566
+ className: N
567
567
  };
568
568
  return /* @__PURE__ */ e.jsx("div", { ...k, children: y });
569
- }, Me = B(_t);
570
- Me.displayName = "NavigationDrawerItemBase";
571
- const Mt = (t) => {
572
- const { title: r, icon: s, count: o, className: c, isActive: a, onClick: f, isView: m = !0, disabled: u, tooltipText: h } = t;
569
+ }, Re = B(Mt);
570
+ Re.displayName = "NavigationDrawerItemBase";
571
+ const Rt = (t) => {
572
+ const { title: r, icon: s, count: o, className: d, isActive: a, onClick: f, isView: m = !0, disabled: u, tooltipText: b } = t;
573
573
  return m ? /* @__PURE__ */ e.jsx(
574
- Me,
574
+ Re,
575
575
  {
576
576
  as: "button",
577
577
  title: r,
578
578
  icon: s,
579
579
  count: o,
580
- className: c,
580
+ className: d,
581
581
  isSelected: a,
582
582
  onClick: f,
583
583
  disabled: u,
584
- tooltipText: h
584
+ tooltipText: b
585
585
  }
586
586
  ) : null;
587
- }, rt = B(Mt);
588
- rt.displayName = "NavigationDrawerActionItem";
589
- const Rt = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) => /* @__PURE__ */ e.jsx(pe, { className: T("flex flex-col gap-2 w-full ", o), scrollbarProps: { hide: !0 }, persistScroll: "navigation-actions", indicators: {
587
+ }, st = B(Rt);
588
+ st.displayName = "NavigationDrawerActionItem";
589
+ const Bt = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) => /* @__PURE__ */ e.jsx(pe, { className: T("flex flex-col gap-2 w-full ", o), scrollbarProps: { hide: !0 }, persistScroll: "navigation-actions", indicators: {
590
590
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
591
591
  bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
592
- }, children: t?.map((c) => {
593
- const { id: a, onClick: f, isView: m = !0, payload: u, ...h } = c, i = a === r, g = () => {
592
+ }, children: t?.map((d) => {
593
+ const { id: a, onClick: f, isView: m = !0, payload: u, ...b } = d, i = a === r, g = () => {
594
594
  s?.(a, u), f?.();
595
595
  };
596
596
  return m ? /* @__PURE__ */ e.jsx(
597
- rt,
597
+ st,
598
598
  {
599
- ...h,
599
+ ...b,
600
600
  id: a,
601
601
  isActive: i,
602
602
  onClick: g
603
603
  },
604
604
  a
605
605
  ) : null;
606
- }) }), st = B(Rt);
607
- st.displayName = "NavigationDrawerActions";
608
- const Bt = (t) => {
609
- const { className: r, title: s, path: o, onClick: c, isSelected: a, parentPath: f } = t, m = x(() => {
610
- c?.(o);
611
- }, [o]), u = x(() => {
606
+ }) }), nt = B(Bt);
607
+ nt.displayName = "NavigationDrawerActions";
608
+ const Ft = (t) => {
609
+ const { className: r, title: s, path: o, onClick: d, isSelected: a, parentPath: f } = t, m = h(() => {
610
+ d?.(o);
611
+ }, [o]), u = h(() => {
612
612
  if (o.startsWith("./")) {
613
613
  if (!f) return;
614
- const h = f + o.slice(2);
615
- window.open(h, "_blank");
614
+ const b = f + o.slice(2);
615
+ window.open(b, "_blank");
616
616
  } else
617
617
  window.open(o, "_blank");
618
618
  }, [o]);
@@ -636,16 +636,16 @@ const Bt = (t) => {
636
636
  ), children: s })
637
637
  }
638
638
  );
639
- }, nt = B(Bt);
640
- nt.displayName = "NavItemSecondary";
641
- const Ft = me((t, r) => {
642
- const [s, o] = J(!0), c = A(null), { path: a, title: f, icon: m, count: u, className: h, isSelected: i = !1, onClick: g, sublinks: b, toggleCollapse: j, getIsCollapsed: L, subscribeToCollapse: y, isView: w = !0, disabled: k, tooltipText: P } = t;
643
- Z(() => y ? y((I) => {
639
+ }, at = B(Ft);
640
+ at.displayName = "NavItemSecondary";
641
+ const zt = me((t, r) => {
642
+ const [s, o] = X(!0), d = A(null), { path: a, title: f, icon: m, count: u, className: b, isSelected: i = !1, onClick: g, sublinks: x, toggleCollapse: j, getIsCollapsed: L, subscribeToCollapse: y, isView: N = !0, disabled: k, tooltipText: P } = t;
643
+ Q(() => y ? y((I) => {
644
644
  I && o(!0);
645
645
  }) : void 0, [y]);
646
- const z = x(() => {
646
+ const z = h(() => {
647
647
  o((R) => !R);
648
- }, []), C = x((R) => {
648
+ }, []), C = h((R) => {
649
649
  o(R);
650
650
  }, []), H = {
651
651
  toggle: z,
@@ -659,49 +659,49 @@ const Ft = me((t, r) => {
659
659
  toggleDrawerCollapse: j,
660
660
  subscribeToCollapse: y
661
661
  };
662
- Ie(r, () => H, [H, s, L, j]);
663
- const d = m, _ = x(() => {
662
+ Ee(r, () => H, [H, s, L, j]);
663
+ const c = m, _ = h(() => {
664
664
  const R = L?.() ?? !1;
665
- if (b && b.length > 0 && R) {
665
+ if (x && x.length > 0 && R) {
666
666
  C(!1), j?.();
667
667
  return;
668
668
  }
669
669
  g?.(a);
670
- }, [a, g, b, j, C, L]), M = x(() => {
670
+ }, [a, g, x, j, C, L]), M = h(() => {
671
671
  window.open(a, "_blank");
672
672
  }, [a]), F = () => {
673
- if (!b || k) return null;
674
- if (t.subLinksRender && b)
675
- return t.subLinksRender(b, H);
676
- const R = x((I) => {
673
+ if (!x || k) return null;
674
+ if (t.subLinksRender && x)
675
+ return t.subLinksRender(x, H);
676
+ const R = h((I) => {
677
677
  if (I.startsWith("./")) {
678
- const q = a + I.slice(2);
679
- g?.(q);
678
+ const $ = a + I.slice(2);
679
+ g?.($);
680
680
  } else
681
681
  g?.(I);
682
682
  }, [a]);
683
- return Z(() => {
684
- const I = c.current;
683
+ return Q(() => {
684
+ const I = d.current;
685
685
  if (!I) return;
686
- const q = I.scrollHeight;
687
- I.style.setProperty("--sublinks-max-height", `${q}px`);
688
- }, []), /* @__PURE__ */ e.jsx("div", { ref: c, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: b.map((I) => /* @__PURE__ */ e.jsx(nt, { ...I, onClick: R, parentPath: a }, `${I.title}-${I.path}`)) });
689
- }, Y = (R) => {
686
+ const $ = I.scrollHeight;
687
+ I.style.setProperty("--sublinks-max-height", `${$}px`);
688
+ }, []), /* @__PURE__ */ e.jsx("div", { ref: d, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: x.map((I) => /* @__PURE__ */ e.jsx(at, { ...I, onClick: R, parentPath: a }, `${I.title}-${I.path}`)) });
689
+ }, K = (R) => {
690
690
  R.stopPropagation(), R.preventDefault(), z();
691
691
  };
692
- return w ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
692
+ return N ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
693
693
  /* @__PURE__ */ e.jsx(
694
- Me,
694
+ Re,
695
695
  {
696
696
  as: "a",
697
697
  title: f,
698
- icon: d,
698
+ icon: c,
699
699
  count: u,
700
- className: h,
700
+ className: b,
701
701
  isSelected: i,
702
- hasSublinks: !!b,
702
+ hasSublinks: !!x,
703
703
  subLinksCollapsed: s,
704
- onToggleSublinks: Y,
704
+ onToggleSublinks: K,
705
705
  onClick: _,
706
706
  onAuxClick: M,
707
707
  disabled: k,
@@ -710,23 +710,23 @@ const Ft = me((t, r) => {
710
710
  ),
711
711
  F()
712
712
  ] }) : null;
713
- }), at = B(Ft);
714
- at.displayName = "NavigationDrawerLinkItem";
715
- const zt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o, toggleCollapse: c, subscribeToCollapse: a }) => {
716
- const { pathname: f } = gt();
713
+ }), ot = B(zt);
714
+ ot.displayName = "NavigationDrawerLinkItem";
715
+ const Ut = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o, toggleCollapse: d, subscribeToCollapse: a }) => {
716
+ const { pathname: f } = vt();
717
717
  return /* @__PURE__ */ e.jsx(pe, { className: T("flex flex-col gap-2 w-full ", s), scrollbarProps: { hide: !0 }, persistScroll: "navigation-links", indicators: {
718
718
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
719
719
  bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
720
720
  }, children: t?.map((m, u) => {
721
- const h = m.isSelected || m.path === f || (m.relatedPaths?.some((i) => f.startsWith(i)) ?? !1);
721
+ const b = m.isSelected || m.path === f || (m.relatedPaths?.some((i) => f.startsWith(i)) ?? !1);
722
722
  return /* @__PURE__ */ e.jsx(
723
- at,
723
+ ot,
724
724
  {
725
725
  className: "",
726
726
  ...m,
727
- isSelected: h,
727
+ isSelected: b,
728
728
  onClick: r,
729
- toggleCollapse: c,
729
+ toggleCollapse: d,
730
730
  getIsCollapsed: o,
731
731
  subscribeToCollapse: a,
732
732
  disabled: m.disabled,
@@ -735,15 +735,15 @@ const zt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o,
735
735
  u
736
736
  );
737
737
  }) });
738
- }, ot = B(zt);
739
- ot.displayName = "NavigationDrawerNavlinks";
740
- const lt = B(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: o, onActionClick: c }) => {
738
+ }, lt = B(Ut);
739
+ lt.displayName = "NavigationDrawerNavlinks";
740
+ const it = B(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: o, onActionClick: d }) => {
741
741
  const { getIsCollapsed: a, toggleCollapse: f, subscribeToCollapse: m } = ce();
742
742
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
743
- /* @__PURE__ */ e.jsx(Q.Spacer, { className: "pb-3" }),
743
+ /* @__PURE__ */ e.jsx(G.Spacer, { className: "pb-3" }),
744
744
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col overflow-hidden h-full gap-4", children: [
745
745
  /* @__PURE__ */ e.jsx(
746
- ot,
746
+ lt,
747
747
  {
748
748
  getIsCollapsed: a,
749
749
  toggleCollapse: f,
@@ -754,73 +754,73 @@ const lt = B(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
754
754
  }
755
755
  ),
756
756
  /* @__PURE__ */ e.jsx(
757
- st,
757
+ nt,
758
758
  {
759
759
  actions: s,
760
760
  activeActionId: o,
761
- onActionClick: c,
761
+ onActionClick: d,
762
762
  className: "max-h-[35vh]"
763
763
  }
764
764
  )
765
765
  ] })
766
766
  ] });
767
767
  }, (t, r) => t.navlinks === r.navlinks && t.handleNavigation === r.handleNavigation && t.allActions === r.allActions && t.activeActionId === r.activeActionId && t.onActionClick === r.onActionClick);
768
- lt.displayName = "PyrionNavigationDrawer.Content";
769
- const Ut = (t) => {
770
- const { sessions: r, onSessionClick: s, secondarySlot: o, subImageUrlAccessor: c } = t;
768
+ it.displayName = "PyrionNavigationDrawer.Content";
769
+ const Ht = (t) => {
770
+ const { sessions: r, onSessionClick: s, secondarySlot: o, subImageUrlAccessor: d } = t;
771
771
  if (!r || r.length === 0)
772
772
  return null;
773
773
  const a = (u) => {
774
774
  s && s(u);
775
775
  }, f = (u) => {
776
- if (!c)
776
+ if (!d)
777
777
  return;
778
- const h = u.metadata;
779
- if (!h)
778
+ const b = u.metadata;
779
+ if (!b)
780
780
  return;
781
- const i = we({ metadata: h }, c);
781
+ const i = we({ metadata: b }, d);
782
782
  if (i != null)
783
783
  return typeof i == "string" ? i : String(i);
784
- }, m = x((u) => typeof o == "function" ? o(u) : o, [o]);
784
+ }, m = h((u) => typeof o == "function" ? o(u) : o, [o]);
785
785
  return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-2", children: r?.map((u) => {
786
- const { auth_id: h } = u;
786
+ const { auth_id: b } = u;
787
787
  return /* @__PURE__ */ e.jsx(se, { className: " shrink-0 h-max", children: /* @__PURE__ */ e.jsx(se.Content, { onClick: () => a(u), className: "p-0 group-data-[expanded=true]/ticketcard:border-none", children: /* @__PURE__ */ e.jsx(
788
- Ke,
788
+ Ye,
789
789
  {
790
- name: h.name,
790
+ name: b.name,
791
791
  avatarSize: "xxs",
792
792
  secondarySlot: m(u),
793
793
  subImageUrl: f(u),
794
- imageUrl: h.profile_picture,
794
+ imageUrl: b.profile_picture,
795
795
  className: "pyrion-navigation-drawer-user-card"
796
796
  },
797
797
  u.token
798
798
  ) }) }, u.token);
799
799
  }) });
800
- }, Ht = ({
800
+ }, Vt = ({
801
801
  state: t,
802
802
  currentAppSessions: r,
803
803
  resolveUserSecondarySlot: s,
804
804
  resolveSessionSecondarySlot: o,
805
- onSessionClick: c,
805
+ onSessionClick: d,
806
806
  onLogoutClick: a,
807
807
  onProfileClick: f,
808
808
  options: m,
809
809
  currentSystemId: u,
810
- userOptionsControls: h,
810
+ userOptionsControls: b,
811
811
  mobileAppSwitcherControls: i
812
812
  }) => {
813
- const { getIsCollapsed: g, toggleCollapse: b, subscribeToCollapse: j } = ce(), L = x(() => {
813
+ const { getIsCollapsed: g, toggleCollapse: x, subscribeToCollapse: j } = ce(), L = h(() => {
814
814
  const y = g();
815
- y ? (b(), h.current?.open()) : f?.(y);
816
- }, [g, b, h, f]);
817
- return Z(() => j((y) => {
818
- y && (h.current?.close(), i.current?.close());
819
- }), [j, h, i]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
820
- /* @__PURE__ */ e.jsx(Q.Spacer, { className: "mb-3" }),
821
- /* @__PURE__ */ e.jsxs(se, { className: "", controls: h, children: [
815
+ y ? (x(), b.current?.open()) : f?.(y);
816
+ }, [g, x, b, f]);
817
+ return Q(() => j((y) => {
818
+ y && (b.current?.close(), i.current?.close());
819
+ }), [j, b, i]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
820
+ /* @__PURE__ */ e.jsx(G.Spacer, { className: "mb-3" }),
821
+ /* @__PURE__ */ e.jsxs(se, { className: "", controls: b, children: [
822
822
  /* @__PURE__ */ e.jsx(se.Content, { onClick: L, children: /* @__PURE__ */ e.jsx(
823
- Ke,
823
+ Ye,
824
824
  {
825
825
  className: "pyrion-navigation-drawer-user-card p-0",
826
826
  name: t.user.name,
@@ -834,10 +834,10 @@ const Ut = (t) => {
834
834
  r && r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
835
835
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-medium-default select-none", children: "Cambiar cuenta" }),
836
836
  /* @__PURE__ */ e.jsx(pe, { className: "flex flex-col gap-2 max-h-[165px] flex-1", scrollbarProps: { hide: !0 }, children: /* @__PURE__ */ e.jsx(
837
- Ut,
837
+ Ht,
838
838
  {
839
839
  sessions: r,
840
- onSessionClick: c,
840
+ onSessionClick: d,
841
841
  secondarySlot: o,
842
842
  subImageUrlAccessor: m?.sessionCardOptions?.subImageUrlAccessor,
843
843
  currentSystemId: u
@@ -854,7 +854,7 @@ const Ut = (t) => {
854
854
  animateIcon: !1,
855
855
  variant: "text",
856
856
  label: "Cerrar sesión",
857
- icon: /* @__PURE__ */ e.jsx(Ct, {}),
857
+ icon: /* @__PURE__ */ e.jsx(St, {}),
858
858
  size: "small",
859
859
  color: "secondary"
860
860
  }
@@ -863,27 +863,27 @@ const Ut = (t) => {
863
863
  ] })
864
864
  ] })
865
865
  ] });
866
- }, it = B(Ht, (t, r) => {
866
+ }, ct = B(Vt, (t, r) => {
867
867
  const s = Object.keys(t), o = Object.keys(r);
868
868
  if (s.length !== o.length)
869
869
  return !1;
870
- for (const c of s) {
871
- if (!Object.prototype.hasOwnProperty.call(r, c))
870
+ for (const d of s) {
871
+ if (!Object.prototype.hasOwnProperty.call(r, d))
872
872
  return !1;
873
- const a = t[c], f = r[c];
873
+ const a = t[d], f = r[d];
874
874
  if (a !== f)
875
875
  return !1;
876
876
  }
877
877
  return t.currentAppSessions !== r.currentAppSessions || t.options !== r.options || t.currentSystemId !== r.currentSystemId || t.userOptionsControls !== r.userOptionsControls || t.mobileAppSwitcherControls !== r.mobileAppSwitcherControls;
878
878
  });
879
- it.displayName = "PyrionNavigationDrawer.Footer";
880
- const Vt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se, { controls: s, children: [
879
+ ct.displayName = "PyrionNavigationDrawer.Footer";
880
+ const Wt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se, { controls: s, children: [
881
881
  /* @__PURE__ */ e.jsx(se.Content, { children: typeof r == "function" ? r() : r }),
882
882
  /* @__PURE__ */ e.jsxs(se.Options, { children: [
883
883
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col p-2 pl-4 gap-2", children: [
884
884
  /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-label-medium text-neutral-medium-default", children: "Cambiar módulo" }),
885
885
  /* @__PURE__ */ e.jsx(pe, { className: "max-h-52", scrollbarProps: { hide: !0 }, children: t?.map((o) => {
886
- const c = typeof o.thumbnail == "string" ? /* @__PURE__ */ e.jsx(
886
+ const d = typeof o.thumbnail == "string" ? /* @__PURE__ */ e.jsx(
887
887
  "img",
888
888
  {
889
889
  src: o.thumbnail,
@@ -895,7 +895,7 @@ const Vt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
895
895
  o.disabled || o.onClick && o.onClick(o.name);
896
896
  };
897
897
  return /* @__PURE__ */ e.jsxs("div", { onClick: a, className: "flex gap-2 p-2 rounded-lg h-12", children: [
898
- c,
898
+ d,
899
899
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center h-full justify-center ", children: [
900
900
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1", children: o.name }),
901
901
  o.description && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-medium-default line-clamp-1", children: o.description })
@@ -905,8 +905,8 @@ const Vt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
905
905
  ] }),
906
906
  /* @__PURE__ */ e.jsx("div", {})
907
907
  ] })
908
- ] }), Te = B(({ enabled_systems: t, onClick: r, currentSystemId: s }) => {
909
- const o = x(() => {
908
+ ] }), Ae = B(({ enabled_systems: t, onClick: r, currentSystemId: s }) => {
909
+ const o = h(() => {
910
910
  if (t) {
911
911
  if (s) {
912
912
  const m = t.find((u) => u._id === s);
@@ -916,14 +916,14 @@ const Vt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
916
916
  if (f) return { coverImage: f.coverImage, thumbnail: f.thumbnail };
917
917
  }
918
918
  return { coverImage: "", thumbnail: "" };
919
- }, [t]), c = !!r;
919
+ }, [t]), d = !!r;
920
920
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
921
921
  /* @__PURE__ */ e.jsx(
922
922
  "img",
923
923
  {
924
924
  src: o().coverImage,
925
925
  alt: "System Logo",
926
- className: T("w-full h-12 rounded object-contain system-cover-image ", c && "cursor-pointer"),
926
+ className: T("w-full h-12 rounded object-contain system-cover-image ", d && "cursor-pointer"),
927
927
  draggable: !1,
928
928
  onClick: r
929
929
  }
@@ -933,28 +933,28 @@ const Vt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
933
933
  {
934
934
  src: o().thumbnail,
935
935
  alt: "System Logo",
936
- className: T("w-12 h-12 rounded object-cover system-thumbnail ", c && "cursor-pointer"),
936
+ className: T("w-12 h-12 rounded object-cover system-thumbnail ", d && "cursor-pointer"),
937
937
  draggable: !1,
938
938
  onClick: r
939
939
  }
940
940
  )
941
941
  ] });
942
942
  }, (t, r) => t.enabled_systems === r.enabled_systems && t.onClick === r.onClick && t.currentSystemId === r.currentSystemId);
943
- Te.displayName = "PyrionNavigationDrawer.SystemLogo";
944
- const ct = B(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mobileAppSwitcherControls: c }) => {
945
- const { getIsCollapsed: a } = ce(), f = We(), m = x(() => {
943
+ Ae.displayName = "PyrionNavigationDrawer.SystemLogo";
944
+ const dt = B(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mobileAppSwitcherControls: d }) => {
945
+ const { getIsCollapsed: a } = ce(), f = qe(), m = h(() => {
946
946
  if (t) {
947
947
  const u = a();
948
948
  t(u);
949
949
  }
950
950
  }, [t, a]);
951
951
  return f ? /* @__PURE__ */ e.jsx(
952
- Vt,
952
+ Wt,
953
953
  {
954
- controls: c,
954
+ controls: d,
955
955
  tabs: o,
956
956
  content: /* @__PURE__ */ e.jsx(
957
- Te,
957
+ Ae,
958
958
  {
959
959
  enabled_systems: r.enabled_systems,
960
960
  onClick: m,
@@ -963,7 +963,7 @@ const ct = B(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mob
963
963
  )
964
964
  }
965
965
  ) : /* @__PURE__ */ e.jsx(
966
- Te,
966
+ Ae,
967
967
  {
968
968
  enabled_systems: r.enabled_systems,
969
969
  onClick: m,
@@ -971,45 +971,53 @@ const ct = B(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mob
971
971
  }
972
972
  );
973
973
  });
974
- ct.displayName = "PyrionNavigationDrawer.Header";
975
- const Wt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s, scrollableControls: o }) => {
976
- const [c, a] = J([]), [f, m] = J("NO_LEIDAS"), [u, h] = J(!1), i = A(/* @__PURE__ */ new Set()), g = A(null), b = A(null), j = x((d, _ = "top") => {
974
+ dt.displayName = "PyrionNavigationDrawer.Header";
975
+ const qt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s, scrollableControls: o }) => {
976
+ const [d, a] = X([]), [f, m] = X("NO_LEIDAS"), [u, b] = X(!1), i = A(/* @__PURE__ */ new Set()), g = A(null), x = A(null), j = h((c, _ = "top") => {
977
977
  a((M) => {
978
- const F = Array.isArray(d) ? _ === "bottom" ? [...M, ...d] : [...d, ...M] : _ === "bottom" ? [...M, d] : [d, ...M];
979
- return i.current.forEach((Y) => Y(F, F.length)), F;
978
+ const F = Array.isArray(c) ? _ === "bottom" ? [...M, ...c] : [...c, ...M] : _ === "bottom" ? [...M, c] : [c, ...M];
979
+ return queueMicrotask(() => {
980
+ i.current.forEach((K) => K(F, F.length));
981
+ }), F;
980
982
  });
981
- }, []), L = x((d) => (i.current.add(d), () => {
982
- i.current.delete(d);
983
- }), []), y = x((d) => {
983
+ }, []), L = h((c) => (i.current.add(c), () => {
984
+ i.current.delete(c);
985
+ }), []), y = h((c) => {
984
986
  a((_) => {
985
- const M = Array.isArray(d) ? _.filter((F) => !d.includes(F._id)) : _.filter((F) => F._id !== d);
986
- return i.current.forEach((F) => F(M, M.length)), M;
987
+ const M = Array.isArray(c) ? _.filter((F) => !c.includes(F._id)) : _.filter((F) => F._id !== c);
988
+ return queueMicrotask(() => {
989
+ i.current.forEach((F) => F(M, M.length));
990
+ }), M;
991
+ });
992
+ }, []), N = h(() => {
993
+ a([]), queueMicrotask(() => {
994
+ i.current.forEach((c) => c([], 0));
995
+ });
996
+ }, []), k = h((c) => {
997
+ a(c), queueMicrotask(() => {
998
+ i.current.forEach((_) => _(c, c.length));
987
999
  });
988
- }, []), w = x(() => {
989
- a([]), i.current.forEach((d) => d([], 0));
990
- }, []), k = x((d) => {
991
- a(d), i.current.forEach((_) => _(d, d.length));
992
- }, []), P = x((d) => {
993
- h(d);
1000
+ }, []), P = h((c) => {
1001
+ b(c);
994
1002
  }, []);
995
- Ie(s, () => ({
1003
+ Ee(s, () => ({
996
1004
  addNewNotification: j,
997
1005
  subscribeToUpdates: L,
998
1006
  setNotifications: k,
999
1007
  removeNotification: y,
1000
- removeAllNotifications: w,
1008
+ removeAllNotifications: N,
1001
1009
  setLoading: P
1002
- }), [j, L, k, y, w, P]);
1003
- const z = (d) => {
1004
- m(d);
1005
- }, C = c.length > 0;
1006
- bt(() => {
1007
- if (g.current && b.current) {
1008
- const d = g.current.clientHeight;
1009
- b.current.style.setProperty("height", `calc(100vh - ${d}px - 20px)`);
1010
+ }), [j, L, k, y, N, P]);
1011
+ const z = (c) => {
1012
+ m(c);
1013
+ }, C = d.length > 0;
1014
+ xt(() => {
1015
+ if (g.current && x.current) {
1016
+ const c = g.current.clientHeight;
1017
+ x.current.style.setProperty("height", `calc(100vh - ${c}px - 20px)`);
1010
1018
  }
1011
- }, [g.current?.clientHeight]);
1012
- const H = c.filter((d) => !d.read).length;
1019
+ }, [g?.current]);
1020
+ const H = d.filter((c) => !c.read).length;
1013
1021
  return /* @__PURE__ */ e.jsx(
1014
1022
  "section",
1015
1023
  {
@@ -1018,13 +1026,13 @@ const Wt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s,
1018
1026
  /* @__PURE__ */ e.jsxs("div", { ref: g, className: "flex flex-col gap-4", children: [
1019
1027
  /* @__PURE__ */ e.jsxs("div", { className: "w-full h-max flex gap-2 items-center justify-between pt-8 pb-2 pr-2 pl-4 border-b border-neutral-strong-default sticky top-0 z-50 bg-neutral-default-default", children: [
1020
1028
  /* @__PURE__ */ e.jsxs("span", { className: "flex gap-2 items-center", children: [
1021
- /* @__PURE__ */ e.jsx(Ye, { className: "text-neutral-strong-default", size: 24 }),
1029
+ /* @__PURE__ */ e.jsx(Xe, { className: "text-neutral-strong-default", size: 24 }),
1022
1030
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-headline-small text-neutral-strong-default", children: "Notificaciones" })
1023
1031
  ] }),
1024
- /* @__PURE__ */ e.jsx(fe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(Pe, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
1032
+ /* @__PURE__ */ e.jsx(fe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(_e, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
1025
1033
  ] }),
1026
1034
  /* @__PURE__ */ e.jsx(
1027
- jt,
1035
+ kt,
1028
1036
  {
1029
1037
  className: "px-4 md:px-2 md:pl-2 pl-2 gap-0 md:gap-0",
1030
1038
  onTabChange: z,
@@ -1033,28 +1041,28 @@ const Wt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s,
1033
1041
  { id: "ALL", title: "Todas" },
1034
1042
  { id: "NO_LEIDAS", title: "Sin leer" }
1035
1043
  ],
1036
- renderTab: (d, _, M, F, Y, R, I, q) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1044
+ renderTab: (c, _, M, F, K, R, I, $) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1037
1045
  /* @__PURE__ */ e.jsx(
1038
- kt,
1046
+ Dt,
1039
1047
  {
1040
- id: d.id,
1041
- title: d.title,
1048
+ id: c.id,
1049
+ title: c.title,
1042
1050
  onClick: M,
1043
1051
  isActive: _,
1044
1052
  onIconClick: F,
1045
- onIconHover: Y,
1053
+ onIconHover: K,
1046
1054
  iconTooltipProps: I,
1047
1055
  iconTooltipTitle: R,
1048
- iconSize: q
1056
+ iconSize: $
1049
1057
  }
1050
1058
  ),
1051
- H > 0 && d.title === "Sin leer" && /* @__PURE__ */ e.jsx(qe, { count: H, className: "absolute top-0 right-0" })
1059
+ H > 0 && c.title === "Sin leer" && /* @__PURE__ */ e.jsx(Ke, { count: H, className: "absolute top-0 right-0" })
1052
1060
  ] })
1053
1061
  }
1054
1062
  ),
1055
1063
  r && C && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(fe, { onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
1056
1064
  ] }),
1057
- /* @__PURE__ */ e.jsx("div", { ref: b, className: "", children: /* @__PURE__ */ e.jsxs(
1065
+ /* @__PURE__ */ e.jsx("div", { ref: x, className: "", children: /* @__PURE__ */ e.jsxs(
1058
1066
  pe,
1059
1067
  {
1060
1068
  className: "px-4 md:px-2 py-0 md:py-0 flex flex-col gap-3 h-full",
@@ -1063,8 +1071,11 @@ const Wt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s,
1063
1071
  axis: "y",
1064
1072
  disableMouseScroll: !1,
1065
1073
  controls: o,
1074
+ scrollTopButton: {
1075
+ target: "2000px"
1076
+ },
1066
1077
  children: [
1067
- C ? c?.filter((d) => f === "NO_LEIDAS" ? !d.read : d)?.map((d, _) => /* @__PURE__ */ e.jsx(St, { ...d, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, _)) : /* @__PURE__ */ e.jsx("p", { className: "flex-1 grid place-items-center prometeo-fonts-headline-xsmall text-neutral-default-default text-center py-8 text-balance", children: "No tienes notificaciones nuevas por el momento" }),
1078
+ C ? d?.filter((c) => f === "NO_LEIDAS" ? !c.read : c)?.map((c, _) => /* @__PURE__ */ e.jsx(jt, { ...c, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, _)) : /* @__PURE__ */ e.jsx("p", { className: "flex-1 grid place-items-center prometeo-fonts-headline-xsmall text-neutral-default-default text-center py-8 text-balance", children: "No tienes notificaciones nuevas por el momento" }),
1068
1079
  u && /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-body-large text-neutral-medium-default w-full text-center py-4", children: "Cargando más ..." })
1069
1080
  ]
1070
1081
  }
@@ -1079,115 +1090,115 @@ const Wt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s,
1079
1090
  children: [
1080
1091
  /* @__PURE__ */ e.jsxs("div", { className: "w-full h-max flex gap-2 items-center justify-between pt-8 pb-2 pr-2 pl-4 border-b border-neutral-strong-default sticky top-0 z-50 bg-neutral-default-default", children: [
1081
1092
  /* @__PURE__ */ e.jsxs("span", { className: "flex gap-2 items-center", children: [
1082
- /* @__PURE__ */ e.jsx(Xe, { className: "text-neutral-strong-default", size: 24 }),
1093
+ /* @__PURE__ */ e.jsx(Je, { className: "text-neutral-strong-default", size: 24 }),
1083
1094
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-headline-small text-neutral-strong-default", children: s })
1084
1095
  ] }),
1085
- /* @__PURE__ */ e.jsx(fe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(Pe, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
1096
+ /* @__PURE__ */ e.jsx(fe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(_e, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
1086
1097
  ] }),
1087
1098
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-8 pt-4 px-4 ", children: r })
1088
1099
  ]
1089
1100
  }
1090
- ), qt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: o, notificationsListControls: c, scrollableControls: a }, f) => {
1091
- const [m, u] = J(o ?? "notifications");
1092
- Ie(f, () => ({
1101
+ ), Kt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: o, notificationsListControls: d, scrollableControls: a }, f) => {
1102
+ const [m, u] = X(o ?? "notifications");
1103
+ Ee(f, () => ({
1093
1104
  setActiveSection: u
1094
1105
  }));
1095
- const h = () => {
1106
+ const b = () => {
1096
1107
  t();
1097
1108
  };
1098
1109
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1099
1110
  m === "notifications" && !r?.notificationsDrawerOptions?.hide && /* @__PURE__ */ e.jsx(
1100
- Wt,
1111
+ qt,
1101
1112
  {
1102
- onCloseClick: h,
1113
+ onCloseClick: b,
1103
1114
  onMarkAllAsRead: r?.notificationsDrawerOptions?.onMarkAllAsRead,
1104
- notificationsListControls: c,
1115
+ notificationsListControls: d,
1105
1116
  scrollableControls: a
1106
1117
  }
1107
1118
  ),
1108
- m === "help" && s && !r?.helpSectionDrawerOptions?.hide && /* @__PURE__ */ e.jsx($t, { onCloseClick: h, children: typeof s == "function" ? s() : s })
1119
+ m === "help" && s && !r?.helpSectionDrawerOptions?.hide && /* @__PURE__ */ e.jsx($t, { onCloseClick: b, children: typeof s == "function" ? s() : s })
1109
1120
  ] });
1110
- }, dt = me(qt);
1111
- dt.displayName = "SidebarContent";
1112
- const Kt = ({
1121
+ }, ut = me(Kt);
1122
+ ut.displayName = "SidebarContent";
1123
+ const Yt = ({
1113
1124
  options: t,
1114
1125
  helpSection: r,
1115
1126
  sidebarContentRef: s,
1116
1127
  initialSectionRef: o,
1117
- notificationsListControls: c,
1128
+ notificationsListControls: d,
1118
1129
  scrollableControls: a
1119
1130
  }) => {
1120
1131
  const { closeSidebar: f } = ce();
1121
1132
  return /* @__PURE__ */ e.jsx(
1122
- dt,
1133
+ ut,
1123
1134
  {
1124
1135
  ref: s,
1125
1136
  closeSidebar: f,
1126
1137
  options: t,
1127
1138
  helpSection: r,
1128
1139
  initialSection: o.current,
1129
- notificationsListControls: c,
1140
+ notificationsListControls: d,
1130
1141
  scrollableControls: a
1131
1142
  }
1132
1143
  );
1133
- }, ut = B(Kt);
1134
- ut.displayName = "PyrionNavigationDrawer.Sidebar";
1135
- const Yt = ({ navigationControlsRef: t }) => {
1144
+ }, ft = B(Yt);
1145
+ ft.displayName = "PyrionNavigationDrawer.Sidebar";
1146
+ const Xt = ({ navigationControlsRef: t }) => {
1136
1147
  const r = ce();
1137
1148
  return t.current.toggleCollapse = r.toggleCollapse, t.current.getIsCollapsed = r.getIsCollapsed, t.current.subscribeToCollapse = r.subscribeToCollapse, t.current.openSidebar = r.openSidebar, t.current.closeSidebar = r.closeSidebar, t.current.toggleSidebar = r.toggleSidebar, t.current.getIsSidebarOpen = r.getIsSidebarOpen, t.current.subscribeToSidebarOpen = r.subscribeToSidebarOpen, t.current.setDrawerDragEnabled = r.setDrawerDragEnabled, t.current.setSidebarDragEnabled = r.setSidebarDragEnabled, null;
1138
- }, Xt = (t) => {
1139
- const { children: r, currentAppSessions: s, resolveUserSecondarySlot: o, resolveSessionSecondarySlot: c, handleNavigation: a, allActions: f, tabs: m, navigationControlsRef: u, sidebarContentRef: h, initialSectionRef: i, userOptionsControls: g, mobileAppSwitcherControls: b, notificationsListControls: j, scrollableControls: L, outletRef: y, ...w } = t;
1140
- return /* @__PURE__ */ e.jsxs(Q, { disableDragOpen: w.options?.disableDragOpen, outletRef: y, children: [
1141
- /* @__PURE__ */ e.jsx(Yt, { navigationControlsRef: u }),
1142
- /* @__PURE__ */ e.jsx(Q.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
1143
- ct,
1149
+ }, Jt = (t) => {
1150
+ const { children: r, currentAppSessions: s, resolveUserSecondarySlot: o, resolveSessionSecondarySlot: d, handleNavigation: a, allActions: f, tabs: m, navigationControlsRef: u, sidebarContentRef: b, initialSectionRef: i, userOptionsControls: g, mobileAppSwitcherControls: x, notificationsListControls: j, scrollableControls: L, outletRef: y, ...N } = t;
1151
+ return /* @__PURE__ */ e.jsxs(G, { disableDragOpen: N.options?.disableDragOpen, outletRef: y, children: [
1152
+ /* @__PURE__ */ e.jsx(Xt, { navigationControlsRef: u }),
1153
+ /* @__PURE__ */ e.jsx(G.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
1154
+ dt,
1144
1155
  {
1145
- onSystemLogoClick: w.onSystemLogoClick,
1146
- state: w.state,
1147
- currentSystemId: w.currentSystemId,
1156
+ onSystemLogoClick: N.onSystemLogoClick,
1157
+ state: N.state,
1158
+ currentSystemId: N.currentSystemId,
1148
1159
  tabs: m,
1149
- mobileAppSwitcherControls: b
1160
+ mobileAppSwitcherControls: x
1150
1161
  }
1151
1162
  ) }, "PL-Header"),
1152
- /* @__PURE__ */ e.jsx(Q.Content, { className: "overflow-hidden flex flex-col relative flex-1 w-[285px] md:w-auto", children: /* @__PURE__ */ e.jsx(
1153
- lt,
1163
+ /* @__PURE__ */ e.jsx(G.Content, { className: "overflow-hidden flex flex-col relative flex-1 w-[285px] md:w-auto", children: /* @__PURE__ */ e.jsx(
1164
+ it,
1154
1165
  {
1155
- navlinks: w.links,
1166
+ navlinks: N.links,
1156
1167
  handleNavigation: a,
1157
1168
  allActions: f,
1158
- activeActionId: w.activeActionId,
1159
- onActionClick: w.onActionClick
1169
+ activeActionId: N.activeActionId,
1170
+ onActionClick: N.onActionClick
1160
1171
  }
1161
1172
  ) }, "PL-Content"),
1162
- /* @__PURE__ */ e.jsx(Q.Footer, { className: "md:min-h-max flex flex-col w-full overflow-hidden max-w-full", children: /* @__PURE__ */ e.jsx(
1163
- it,
1173
+ /* @__PURE__ */ e.jsx(G.Footer, { className: "md:min-h-max flex flex-col w-full overflow-hidden max-w-full", children: /* @__PURE__ */ e.jsx(
1174
+ ct,
1164
1175
  {
1165
- state: w.state,
1176
+ state: N.state,
1166
1177
  currentAppSessions: s,
1167
1178
  resolveUserSecondarySlot: o,
1168
- resolveSessionSecondarySlot: c,
1169
- onSessionClick: w.onSessionClick,
1170
- onLogoutClick: w.onLogoutClick,
1171
- options: w.options,
1172
- currentSystemId: w.currentSystemId,
1179
+ resolveSessionSecondarySlot: d,
1180
+ onSessionClick: N.onSessionClick,
1181
+ onLogoutClick: N.onLogoutClick,
1182
+ options: N.options,
1183
+ currentSystemId: N.currentSystemId,
1173
1184
  userOptionsControls: g,
1174
- mobileAppSwitcherControls: b,
1175
- onProfileClick: w.onProfileClick
1185
+ mobileAppSwitcherControls: x,
1186
+ onProfileClick: N.onProfileClick
1176
1187
  }
1177
1188
  ) }, "PL-Footer"),
1178
- /* @__PURE__ */ e.jsx(Q.Outlet, { children: /* @__PURE__ */ e.jsx(ft, { children: r }) }),
1189
+ /* @__PURE__ */ e.jsx(G.Outlet, { children: /* @__PURE__ */ e.jsx(mt, { children: r }) }),
1179
1190
  /* @__PURE__ */ e.jsx(
1180
- Q.Sidebar,
1191
+ G.Sidebar,
1181
1192
  {
1182
1193
  className: "bg-neutral-default-default",
1183
- modal: w.options?.sidebarOptions?.modal,
1184
- closeOnOverlayClick: w.options?.sidebarOptions?.closeOnOverlayClick,
1194
+ modal: N.options?.sidebarOptions?.modal,
1195
+ closeOnOverlayClick: N.options?.sidebarOptions?.closeOnOverlayClick,
1185
1196
  children: /* @__PURE__ */ e.jsx(
1186
- ut,
1197
+ ft,
1187
1198
  {
1188
- options: w.options,
1189
- helpSection: w.helpSection,
1190
- sidebarContentRef: h,
1199
+ options: N.options,
1200
+ helpSection: N.helpSection,
1201
+ sidebarContentRef: b,
1191
1202
  initialSectionRef: i,
1192
1203
  notificationsListControls: j,
1193
1204
  scrollableControls: L
@@ -1196,42 +1207,42 @@ const Yt = ({ navigationControlsRef: t }) => {
1196
1207
  }
1197
1208
  )
1198
1209
  ] });
1199
- }, Ae = B(Xt, (t, r) => {
1200
- const { children: s, ...o } = t, { children: c, ...a } = r, f = Object.keys(o), m = Object.keys(a);
1210
+ }, Oe = B(Jt, (t, r) => {
1211
+ const { children: s, ...o } = t, { children: d, ...a } = r, f = Object.keys(o), m = Object.keys(a);
1201
1212
  if (f.length !== m.length)
1202
1213
  return !1;
1203
1214
  for (const u of f) {
1204
1215
  if (!Object.prototype.hasOwnProperty.call(a, u))
1205
1216
  return !1;
1206
- const h = o[u], i = a[u];
1207
- if (h !== i)
1217
+ const b = o[u], i = a[u];
1218
+ if (b !== i)
1208
1219
  return !1;
1209
1220
  }
1210
1221
  return !0;
1211
1222
  });
1212
- Ae.displayName = "PyrionNavigationDrawer.LayoutBase";
1213
- const ft = B(({ children: t }) => /* @__PURE__ */ e.jsx(Q.Outlet, { children: t }));
1214
- ft.displayName = "PyrionNavigationDrawer.IsolatedOutlet";
1215
- const mt = Oe(null), vr = () => {
1216
- const t = xt(mt);
1223
+ Oe.displayName = "PyrionNavigationDrawer.LayoutBase";
1224
+ const mt = B(({ children: t }) => /* @__PURE__ */ e.jsx(G.Outlet, { children: t }));
1225
+ mt.displayName = "PyrionNavigationDrawer.IsolatedOutlet";
1226
+ const pt = Ie(null), wr = () => {
1227
+ const t = gt(pt);
1217
1228
  if (!t)
1218
1229
  throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
1219
1230
  return t;
1220
- }, wr = ({ children: t, helpSection: r, state: s, links: o, onLinkClick: c, onNavigate: a, onLogoutClick: f, actions: m, activeActionId: u, onActionClick: h, tabsProps: i, currentSystemId: g, onSessionClick: b, onSystemLogoClick: j, onProfileClick: L, ...y }) => {
1231
+ }, Nr = ({ children: t, helpSection: r, state: s, links: o, onLinkClick: d, onNavigate: a, onLogoutClick: f, actions: m, activeActionId: u, onActionClick: b, tabsProps: i, currentSystemId: g, onSessionClick: x, onSystemLogoClick: j, onProfileClick: L, ...y }) => {
1221
1232
  const k = Object.assign({
1222
1233
  closeDrawerOnNavigate: !0,
1223
1234
  disableDragOpen: {
1224
1235
  sidebar: !0,
1225
1236
  drawer: !1
1226
1237
  }
1227
- }, y.options), P = vt(), z = We(), C = A(null), H = A(null), d = A({}), _ = A(null), M = A("notifications"), F = A(null), Y = A(null), R = A(null), [I, q] = J(0), [ne, G] = J(!1), [oe, le] = J(null), be = x((l) => {
1228
- if (G(!1), c) {
1229
- c(l);
1238
+ }, y.options), P = wt(), z = qe(), C = A(null), H = A(null), c = A({}), _ = A(null), M = A("notifications"), F = A(null), K = A(null), R = A(null), [I, $] = X(0), [ne, J] = X(!1), [oe, le] = X(null), he = h((l) => {
1239
+ if (J(!1), d) {
1240
+ d(l);
1230
1241
  return;
1231
1242
  }
1232
- const N = window.location.pathname;
1233
- P(l), k.closeDrawerOnNavigate && pt() && !d.current?.getIsCollapsed?.() && d.current?.toggleCollapse?.(), a && a(N, l);
1234
- }, [c, a, P]), de = (l) => {
1243
+ const w = window.location.pathname;
1244
+ P(l), k.closeDrawerOnNavigate && bt() && !c.current?.getIsCollapsed?.() && c.current?.toggleCollapse?.(), a && a(w, l);
1245
+ }, [d, a, P]), de = (l) => {
1235
1246
  l && window.open(l, "_blank");
1236
1247
  }, Se = {
1237
1248
  system: {
@@ -1244,155 +1255,157 @@ const mt = Oe(null), vr = () => {
1244
1255
  mobile: de,
1245
1256
  desktop: de
1246
1257
  }
1247
- }, ie = x((l) => {
1248
- const N = z ? "mobile" : "desktop", O = s.enabled_systems.find((S) => S.name === l)?.url;
1249
- Se.system[N](O), i?.onTabClick?.(l);
1250
- }, [z, s.enabled_systems, i?.onTabClick]), Be = x((l) => {
1251
- const N = z ? "mobile" : "desktop", O = s.company.products?.find((S) => S.name === l)?.domain;
1252
- Se.product[N](O), i?.onTabClick?.(l);
1253
- }, [z, s.company.products, i?.onTabClick]), je = x((l, N) => {
1254
- if (N) {
1255
- N(l), i?.onTabClick?.(l);
1258
+ }, ie = h((l) => {
1259
+ const w = z ? "mobile" : "desktop", O = s.enabled_systems.find((S) => S.name === l)?.url;
1260
+ Se.system[w](O), i?.onTabClick?.(l);
1261
+ }, [z, s.enabled_systems, i?.onTabClick]), Fe = h((l) => {
1262
+ const w = z ? "mobile" : "desktop", O = s.company.products?.find((S) => S.name === l)?.domain;
1263
+ Se.product[w](O), i?.onTabClick?.(l);
1264
+ }, [z, s.company.products, i?.onTabClick]), je = h((l, w) => {
1265
+ if (w) {
1266
+ w(l), i?.onTabClick?.(l);
1256
1267
  return;
1257
1268
  } else
1258
1269
  i?.onTabClick?.(l);
1259
- }, [i?.onTabClick]), ke = x(() => {
1270
+ }, [i?.onTabClick]), ke = h(() => {
1260
1271
  const l = {};
1261
1272
  s.enabled_systems.forEach((O) => {
1262
1273
  l[O.url] = O.name;
1263
1274
  });
1264
- const N = window.location.origin;
1275
+ const w = window.location.origin;
1265
1276
  for (const [O, S] of Object.entries(l))
1266
- if (N === O)
1277
+ if (w === O)
1267
1278
  return S;
1268
1279
  return "";
1269
1280
  }, [s.enabled_systems]), ae = i?.currentTabName || ke(), xe = ue(
1270
1281
  () => s.sessions || [],
1271
1282
  [s.sessions]
1272
- ), n = (l) => l == null ? null : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : Ne(l) ? l : typeof l == "object" ? JSON.stringify(l) : null, p = x((l, N) => {
1283
+ ), n = (l) => l == null ? null : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : Ne(l) ? l : typeof l == "object" ? JSON.stringify(l) : null, p = h((l, w) => {
1273
1284
  if (!l) return null;
1274
1285
  if (Array.isArray(l)) {
1275
- const O = l?.[0] ? we(N, l[0]) : null, S = l?.[1] ? we(N, l[1]) : null, K = n(O), Fe = n(S);
1286
+ const O = l?.[0] ? we(w, l[0]) : null, S = l?.[1] ? we(w, l[1]) : null, Z = n(O), ze = n(S);
1276
1287
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1277
- /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-break-spaces min-w-1/2", children: K }),
1278
- Fe && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 flex-1 grow shrink-0 min-w-[40%] overflow-hidden", children: [
1288
+ /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-break-spaces min-w-1/2", children: Z }),
1289
+ ze && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 flex-1 grow shrink-0 min-w-[40%] overflow-hidden", children: [
1279
1290
  /* @__PURE__ */ e.jsx("span", { className: "size-0.5 bg-[--neutral-300] rounded-full" }),
1280
- /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children: Fe })
1291
+ /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children: ze })
1281
1292
  ] })
1282
1293
  ] });
1283
1294
  }
1284
1295
  if (typeof l == "string") {
1285
- const O = we(N, l);
1296
+ const O = we(w, l);
1286
1297
  return n(O);
1287
1298
  }
1288
- return typeof l == "function" ? n(l(N)) : null;
1289
- }, []), v = x(
1299
+ return typeof l == "function" ? n(l(w)) : null;
1300
+ }, []), v = h(
1290
1301
  (l) => {
1291
- const N = k?.userCardOptions?.secondarySlot;
1292
- if (!N) return null;
1293
- const O = s.enabled_systems?.find((K) => K._id === g), S = { company: s.company, user: s.user, system: O, metadata: l };
1294
- return p(N, S);
1302
+ const w = k?.userCardOptions?.secondarySlot;
1303
+ if (!w) return null;
1304
+ const O = s.enabled_systems?.find((Z) => Z._id === g), S = { company: s.company, user: s.user, system: O, metadata: l };
1305
+ return p(w, S);
1295
1306
  },
1296
1307
  [g, k?.userCardOptions?.secondarySlot, p, s.company, s.enabled_systems, s.user]
1297
- ), E = x(
1308
+ ), E = h(
1298
1309
  (l) => {
1299
- const N = k?.sessionCardOptions?.secondarySlot || k?.userCardOptions?.secondarySlot;
1300
- if (!N) return null;
1301
- const O = s.enabled_systems?.find((K) => K._id === g), S = { company: s.company, user: l.auth_id, metadata: l?.metadata, system: O };
1302
- return p(N, S);
1310
+ const w = k?.sessionCardOptions?.secondarySlot || k?.userCardOptions?.secondarySlot;
1311
+ if (!w) return null;
1312
+ const O = s.enabled_systems?.find((Z) => Z._id === g), S = { company: s.company, user: l.auth_id, metadata: l?.metadata, system: O };
1313
+ return p(w, S);
1303
1314
  },
1304
1315
  [g, k?.sessionCardOptions?.secondarySlot, k?.userCardOptions?.secondarySlot, p, s.company]
1305
1316
  ), W = ue(() => {
1306
1317
  const l = [];
1307
- return d.current.openNotifications = () => {
1308
- M.current = "notifications", d.current.openSidebar?.(), _.current?.setActiveSection("notifications");
1309
- }, d.current.openHelp = () => {
1310
- M.current = "help", d.current.openSidebar?.(), _.current?.setActiveSection("help");
1318
+ return c.current.openNotifications = () => {
1319
+ M.current = "notifications", c.current.openSidebar?.(), _.current?.setActiveSection("notifications");
1320
+ }, c.current.openHelp = () => {
1321
+ M.current = "help", c.current.openSidebar?.(), _.current?.setActiveSection("help");
1311
1322
  }, !k?.notificationsDrawerOptions?.hideActionButton && !k?.notificationsDrawerOptions?.hide && l.push({
1312
1323
  id: "notifications",
1313
1324
  title: "Notificaciones",
1314
- icon: Ye,
1315
- onClick: d.current.openNotifications,
1325
+ icon: Xe,
1326
+ onClick: c.current.openNotifications,
1316
1327
  count: I
1317
1328
  }), !k?.helpSectionDrawerOptions?.hideActionButton && r && !k?.helpSectionDrawerOptions?.hide && l.push({
1318
1329
  id: "help",
1319
1330
  title: "Ayuda",
1320
- icon: Xe,
1321
- onClick: d.current.openHelp
1331
+ icon: Je,
1332
+ onClick: c.current.openHelp
1322
1333
  }), k?.configurationActionOptions?.onClick && !k?.configurationActionOptions?.hideActionButton && l.push({
1323
1334
  id: "configuration",
1324
1335
  title: "Configuracion",
1325
- icon: Dt,
1336
+ icon: Lt,
1326
1337
  onClick: k.configurationActionOptions?.onClick
1327
1338
  }), l;
1328
- }, [k, r, h, I]), V = ue(
1339
+ }, [k, r, b, I]), V = ue(
1329
1340
  () => [...W, ...m || []],
1330
1341
  [W, m]
1331
- ), X = ue(() => {
1342
+ ), Y = ue(() => {
1332
1343
  const l = s.enabled_systems.map((S) => ({
1333
1344
  name: S.name,
1334
1345
  thumbnail: S.thumbnail,
1335
1346
  onClick: ie,
1336
1347
  id: S._id
1337
- })) || [], N = i?.customTabs?.map((S) => ({
1348
+ })) || [], w = i?.customTabs?.map((S) => ({
1338
1349
  ...S,
1339
1350
  onClick: () => je(S.name, S?.onClick)
1340
1351
  })) || [], O = s.company.products?.map((S) => ({
1341
1352
  name: S.name,
1342
1353
  thumbnail: S.thumbnail,
1343
- onClick: Be
1354
+ onClick: Fe
1344
1355
  })) || [];
1345
- return [...l, ...N, ...O];
1346
- }, [s.enabled_systems, s.company.products, i?.customTabs]), ee = x((l, N) => {
1347
- C.current?.addNewNotification ? C.current.addNewNotification(l, N) : console.warn("Notifications controls not ready yet");
1348
- }, []), te = x((l) => C.current?.subscribeToUpdates ? C.current.subscribeToUpdates(l) : (console.warn("Notifications controls not ready yet"), () => {
1349
- }), []), ge = x((l) => {
1356
+ return [...l, ...w, ...O];
1357
+ }, [s.enabled_systems, s.company.products, i?.customTabs]), ee = h((l, w) => {
1358
+ C.current?.addNewNotification ? C.current.addNewNotification(l, w) : console.warn("Notifications controls not ready yet");
1359
+ }, []), te = h((l) => C.current?.subscribeToUpdates ? C.current.subscribeToUpdates(l) : (console.warn("Notifications controls not ready yet"), () => {
1360
+ }), []), ge = h((l) => {
1350
1361
  C.current?.removeNotification ? C.current.removeNotification(l) : console.warn("Notifications controls not ready yet");
1351
- }, []), ve = x(() => {
1362
+ }, []), ve = h(() => {
1352
1363
  C.current?.removeAllNotifications ? C.current.removeAllNotifications() : console.warn("Notifications controls not ready yet");
1353
- }, []), D = x((l) => {
1364
+ }, []), D = h((l) => {
1354
1365
  C.current?.setNotifications ? C.current.setNotifications(l) : console.warn("Notifications controls not ready yet");
1355
- }, []), $ = x((l) => H.current?.subscribeToScrollTarget ? H.current.subscribeToScrollTarget(l) : (console.warn("Scrollable controls not ready yet"), () => {
1356
- }), []), U = x((l, N, O) => {
1357
- const S = /* @__PURE__ */ e.jsxs("div", { className: T(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", N ? "fixed" : "sticky"), children: [
1358
- !O && /* @__PURE__ */ e.jsx(fe, { label: "", icon: /* @__PURE__ */ e.jsx(Pe, {}), onClick: () => G(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
1366
+ }, []), q = h((l, w) => H.current?.subscribeToScrollTarget ? H.current.subscribeToScrollTarget(l, w) : (console.warn("Scrollable controls not ready yet"), () => {
1367
+ }), []), U = h((l) => {
1368
+ C.current?.setLoading ? C.current.setLoading(l) : console.warn("Notifications controls not ready yet");
1369
+ }, []), re = h((l, w, O) => {
1370
+ const S = /* @__PURE__ */ e.jsxs("div", { className: T(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", w ? "fixed" : "sticky"), children: [
1371
+ !O && /* @__PURE__ */ e.jsx(fe, { label: "", icon: /* @__PURE__ */ e.jsx(_e, {}), onClick: () => J(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
1359
1372
  typeof l == "function" ? l() : l
1360
1373
  ] });
1361
- let K;
1362
- return N ? K = Ue(S, document.body, `modal-error-${Date.now()}`) : R.current && (K = Ue(S, R.current, `modal-error-${Date.now()}`)), le(K), G(!0), S;
1363
- }, [R]), re = x(() => {
1364
- G(!1);
1374
+ let Z;
1375
+ return w ? Z = He(S, document.body, `modal-error-${Date.now()}`) : R.current && (Z = He(S, R.current, `modal-error-${Date.now()}`)), le(Z), J(!0), S;
1376
+ }, [R]), De = h(() => {
1377
+ J(!1);
1365
1378
  }, []);
1366
- return d.current.addNewNotification = ee, d.current.subscribeToNotificationsUpdates = te, d.current.removeNotification = ge, d.current.removeAllNotifications = ve, d.current.setNotifications = D, d.current.subscribeToNotificationsScroll = $, d.current.showErrorModal = U, d.current.closeErrorModal = re, Z(() => {
1367
- te((l, N) => {
1368
- q(N);
1379
+ return c.current.addNewNotification = ee, c.current.subscribeToNotificationsUpdates = te, c.current.removeNotification = ge, c.current.removeAllNotifications = ve, c.current.setNotifications = D, c.current.setNotificationsLoading = U, c.current.subscribeToNotificationsScroll = q, c.current.showErrorModal = re, c.current.closeErrorModal = De, Q(() => {
1380
+ te((l, w) => {
1381
+ $(w);
1369
1382
  });
1370
- }, [te]), /* @__PURE__ */ e.jsxs(mt.Provider, { value: d.current, children: [
1383
+ }, [te]), /* @__PURE__ */ e.jsxs(pt.Provider, { value: c.current, children: [
1371
1384
  ne && oe,
1372
1385
  z ? /* @__PURE__ */ e.jsx("div", { className: "flex h-screen", children: /* @__PURE__ */ e.jsx(
1373
- Ae,
1386
+ Oe,
1374
1387
  {
1375
1388
  links: o,
1376
- handleNavigation: be,
1389
+ handleNavigation: he,
1377
1390
  allActions: V,
1378
1391
  activeActionId: u,
1379
- onActionClick: h,
1392
+ onActionClick: b,
1380
1393
  state: s,
1381
1394
  currentAppSessions: xe,
1382
1395
  resolveUserSecondarySlot: v,
1383
1396
  resolveSessionSecondarySlot: E,
1384
- onSessionClick: b,
1397
+ onSessionClick: x,
1385
1398
  onLogoutClick: f,
1386
1399
  options: k,
1387
1400
  currentSystemId: g,
1388
1401
  userOptionsControls: F,
1389
- mobileAppSwitcherControls: Y,
1402
+ mobileAppSwitcherControls: K,
1390
1403
  onSystemLogoClick: j,
1391
- tabs: X,
1404
+ tabs: Y,
1392
1405
  helpSection: r,
1393
1406
  sidebarContentRef: _,
1394
1407
  initialSectionRef: M,
1395
- navigationControlsRef: d,
1408
+ navigationControlsRef: c,
1396
1409
  notificationsListControls: C,
1397
1410
  scrollableControls: H,
1398
1411
  outletRef: R,
@@ -1400,40 +1413,40 @@ const mt = Oe(null), vr = () => {
1400
1413
  children: t
1401
1414
  }
1402
1415
  ) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-screen", children: [
1403
- X.length > 0 && /* @__PURE__ */ e.jsx(
1404
- Lt,
1416
+ Y.length > 0 && /* @__PURE__ */ e.jsx(
1417
+ Tt,
1405
1418
  {
1406
1419
  className: "hidden md:flex",
1407
- tabs: X,
1420
+ tabs: Y,
1408
1421
  activeColor: "var(--neutral-900)",
1409
1422
  currentTabName: ae,
1410
1423
  currentSystemId: g
1411
1424
  }
1412
1425
  ),
1413
1426
  /* @__PURE__ */ e.jsx(
1414
- Ae,
1427
+ Oe,
1415
1428
  {
1416
1429
  links: o,
1417
- handleNavigation: be,
1430
+ handleNavigation: he,
1418
1431
  allActions: V,
1419
1432
  activeActionId: u,
1420
- onActionClick: h,
1433
+ onActionClick: b,
1421
1434
  state: s,
1422
1435
  currentAppSessions: xe,
1423
1436
  resolveUserSecondarySlot: v,
1424
1437
  resolveSessionSecondarySlot: E,
1425
- onSessionClick: b,
1438
+ onSessionClick: x,
1426
1439
  onLogoutClick: f,
1427
1440
  options: k,
1428
1441
  currentSystemId: g,
1429
1442
  userOptionsControls: F,
1430
- mobileAppSwitcherControls: Y,
1443
+ mobileAppSwitcherControls: K,
1431
1444
  onSystemLogoClick: j,
1432
- tabs: X,
1445
+ tabs: Y,
1433
1446
  helpSection: r,
1434
1447
  sidebarContentRef: _,
1435
1448
  initialSectionRef: M,
1436
- navigationControlsRef: d,
1449
+ navigationControlsRef: c,
1437
1450
  notificationsListControls: C,
1438
1451
  scrollableControls: H,
1439
1452
  outletRef: R,
@@ -1445,6 +1458,6 @@ const mt = Oe(null), vr = () => {
1445
1458
  ] });
1446
1459
  };
1447
1460
  export {
1448
- wr as default,
1449
- vr as u
1461
+ Nr as default,
1462
+ wr as u
1450
1463
  };