prometeo-design-system 5.2.2 → 5.3.1

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