prometeo-design-system 4.3.1 → 4.3.3

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