prometeo-design-system 6.3.2 → 6.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,17 +6,17 @@ import je, { forwardRef as le, useState as R, useRef as I, useEffect as Y, memo
6
6
  import { createPortal as Be } from "react-dom";
7
7
  import { CloseNavBarDesktop as Et } from "./Icons/CloseNavBarDesktop.es.js";
8
8
  import { c as Ie } from "./index-BOQuZ0gG.js";
9
- import { B as We } from "./badge-BEx-0Q-K.js";
9
+ import { B as We } from "./badge-CWYEc-DA.js";
10
10
  import _t from "./PlainTooltip.es.js";
11
11
  import { CrevronLeft as Pt } from "./Icons/CrevronLeft.es.js";
12
- import { S as Oe, a as Mt } from "./Scrollable-Bo9WaCTx.js";
12
+ import { S as Oe, a as Mt } from "./Scrollable-BhxCCeiu.js";
13
13
  import { useLocation as Ve } from "react-router";
14
14
  import de from "./TicketCard.es.js";
15
15
  import He from "./UserCard.es.js";
16
16
  import Ee from "./Button.es.js";
17
17
  import { Logout as Rt } from "./Icons/Logout.es.js";
18
- import se from "./Skeleton.es.js";
19
- import { u as Bt } from "./useScrollable-Bw17eU40.js";
18
+ import ae from "./Skeleton.es.js";
19
+ import { u as Bt } from "./useScrollable-CSfF1lbV.js";
20
20
  import $e from "./IconButton.es.js";
21
21
  import { Help as qe } from "./Icons/Help.es.js";
22
22
  import { Close as _e } from "./Icons/Close.es.js";
@@ -25,11 +25,11 @@ import { T as Ut, a as zt } from "./TabLinks-DnoWdrdk.js";
25
25
  import { Notifications as Ke } from "./Icons/Notifications.es.js";
26
26
  import { Settings as Wt } from "./Icons/Settings.es.js";
27
27
  const Vt = le((t, r) => {
28
- const [n, a] = R(t?.currentTabName || t.tabs[0]?.name), p = I(null), { tabs: l = [], className: d, activeColor: h = "var(--neutral-900)", currentSystemId: i, isLoading: f = !1 } = t;
28
+ const [n, a] = R(t?.currentTabName || t.tabs[0]?.name), m = I(null), { tabs: l = [], className: d, activeColor: h = "var(--neutral-900)", currentSystemId: i, isLoading: f = !1 } = t;
29
29
  Y(() => {
30
- p.current?.style.setProperty("--tab-bg", h);
30
+ m.current?.style.setProperty("--tab-bg", h);
31
31
  }, [h]);
32
- const w = l.find((m) => m?.id === i || m?.name === t?.currentTabName) || l.find((m) => m?.name === n);
32
+ const w = l.find((p) => p?.id === i || p?.name === t?.currentTabName) || l.find((p) => p?.name === n);
33
33
  return /* @__PURE__ */ e.jsx(
34
34
  "div",
35
35
  {
@@ -43,7 +43,7 @@ const Vt = le((t, r) => {
43
43
  d
44
44
  ),
45
45
  children: (f ? Array(3).fill(null) : l).map(
46
- (m, b) => {
46
+ (p, b) => {
47
47
  if (f) return /* @__PURE__ */ e.jsx(
48
48
  "div",
49
49
  {
@@ -60,12 +60,12 @@ const Vt = le((t, r) => {
60
60
  "grid place-items-center",
61
61
  "tab-thumbnail-icon",
62
62
  "bg-transparent text-neutral-default-default",
63
- m?.className
64
- ), children: /* @__PURE__ */ e.jsx(se, { shape: "rounded", className: "w-full h-full" }) })
63
+ p?.className
64
+ ), children: /* @__PURE__ */ e.jsx(ae, { shape: "rounded", className: "w-full h-full" }) })
65
65
  }
66
66
  );
67
- const S = m?.name === w?.name, j = typeof m?.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: m?.thumbnail, alt: m?.description, className: "aspect-square object-contain rounded", draggable: !1 }) : m?.thumbnail, u = () => {
68
- m.disabled || (a(m?.name), m.onClick && m.onClick(m?.name));
67
+ const S = p?.name === w?.name, j = typeof p?.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: p?.thumbnail, alt: p?.description, className: "aspect-square object-contain rounded", draggable: !1 }) : p?.thumbnail, u = () => {
68
+ p.disabled || (a(p?.name), p.onClick && p.onClick(p?.name));
69
69
  };
70
70
  return /* @__PURE__ */ e.jsx(
71
71
  "div",
@@ -79,23 +79,23 @@ const Vt = le((t, r) => {
79
79
  S && "active"
80
80
  ),
81
81
  onClick: u,
82
- ref: p,
82
+ ref: m,
83
83
  children: /* @__PURE__ */ e.jsx("div", { className: D(
84
84
  "size-8 rounded-[4px]",
85
85
  "grid place-items-center",
86
86
  "tab-thumbnail-icon",
87
87
  "bg-transparent text-neutral-default-default",
88
- m?.className
88
+ p?.className
89
89
  ), children: j })
90
90
  },
91
- m?.name
91
+ p?.name
92
92
  );
93
93
  }
94
94
  )
95
95
  }
96
96
  );
97
- }), Je = O(le(({ children: t, className: r, context: n, modal: a = !1, closeOnOverlayClick: p = !1, unmountChildrenOnClose: l = !0 }, d) => {
98
- const h = ue(t, n), i = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: f } = Ht(), { closeSidebar: w } = ne(), [m, b] = R(() => l ? f : !0), [S, j] = R(!1);
97
+ }), Je = O(le(({ children: t, className: r, context: n, modal: a = !1, closeOnOverlayClick: m = !1, unmountChildrenOnClose: l = !0 }, d) => {
98
+ const h = ue(t, n), i = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: f } = Ht(), { closeSidebar: w } = se(), [p, b] = R(() => l ? f : !0), [S, j] = R(!1);
99
99
  return Y(() => {
100
100
  l && n?.subscribeToSidebarOpen((u) => {
101
101
  u ? (j(!1), b(!0)) : j(!0);
@@ -113,14 +113,14 @@ const Vt = le((t, r) => {
113
113
  {
114
114
  className: D("navigation-drawer-sidebar-overlay"),
115
115
  onClick: (u) => {
116
- u.preventDefault(), u.stopPropagation(), p && w?.();
116
+ u.preventDefault(), u.stopPropagation(), m && w?.();
117
117
  },
118
118
  "aria-hidden": "true"
119
119
  }
120
120
  ),
121
121
  /* @__PURE__ */ e.jsx("div", { ref: d, className: D("sidebar collapsed", "h-full overflow-auto", r), "aria-modal": a || void 0, children: /* @__PURE__ */ e.jsxs("div", { className: D("navigation-drawer-sidebar-inner h-full max-h-full! overflow-hidden!"), children: [
122
122
  /* @__PURE__ */ e.jsx("div", { className: "secure-click-margin hidden" }),
123
- m && h
123
+ p && h
124
124
  ] }) })
125
125
  ] });
126
126
  })), Pe = O(le(({ children: t }, r) => /* @__PURE__ */ e.jsx("div", { ref: r, className: "h-full w-max top-0 left-0 z-50", children: t })));
@@ -129,7 +129,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
129
129
  const t = ze(Ge);
130
130
  if (!t) throw new Error("useDrawerState must be used within NavigationDrawer");
131
131
  return t;
132
- }, ne = () => {
132
+ }, se = () => {
133
133
  const t = ze(Ye);
134
134
  if (!t) throw new Error("useDrawerActions must be used within NavigationDrawer");
135
135
  return t;
@@ -147,11 +147,11 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
147
147
  desktop: !1,
148
148
  mobile: !0
149
149
  }, Gt = (t) => {
150
- const { children: r, classNameDrawer: n, classNameSidebar: a, disableDragOpen: p, modal: l = !0, closeOnOutsideClick: d = !0 } = t, h = I(null), i = I(null), f = I(null), w = t.outletRef ?? I(null), m = I(null), b = I(qt($t(), t.defaultCollapsedState ?? Jt)), S = I(!1), j = I("drawer"), u = I(/* @__PURE__ */ new Set()), C = I(/* @__PURE__ */ new Set()), v = x((o) => {
150
+ const { children: r, classNameDrawer: n, classNameSidebar: a, disableDragOpen: m, modal: l = !0, closeOnOutsideClick: d = !0 } = t, h = I(null), i = I(null), f = I(null), w = t.outletRef ?? I(null), p = I(null), b = I(qt($t(), t.defaultCollapsedState ?? Jt)), S = I(!1), j = I("drawer"), u = I(/* @__PURE__ */ new Set()), C = I(/* @__PURE__ */ new Set()), v = x((o) => {
151
151
  const g = f.current;
152
152
  g && (g.classList.toggle("collapsed", o), g.classList.toggle("expanded", !o));
153
153
  }, []), A = x((o) => {
154
- const g = m.current;
154
+ const g = p.current;
155
155
  if (!g) return;
156
156
  g.classList.toggle("collapsed", o), g.classList.toggle("expanded", !o);
157
157
  const L = h.current;
@@ -232,7 +232,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
232
232
  u.current.delete(o);
233
233
  }),
234
234
  openSidebar: () => {
235
- if (m.current) {
235
+ if (p.current) {
236
236
  if (window.matchMedia("(min-width: 768px)").matches) {
237
237
  P(!1);
238
238
  return;
@@ -248,7 +248,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
248
248
  N("outlet"), o?.();
249
249
  },
250
250
  toggleSidebar: (o) => {
251
- if (!m.current) return;
251
+ if (!p.current) return;
252
252
  if (window.matchMedia("(min-width: 768px)").matches) {
253
253
  P(!S.current);
254
254
  return;
@@ -256,7 +256,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
256
256
  const g = j.current === "sidebar" ? "outlet" : "sidebar";
257
257
  N(g), o?.(S.current ? "closed" : "open");
258
258
  },
259
- getIsSidebarOpen: () => m.current ? window.matchMedia("(min-width: 768px)").matches ? !S.current : j.current === "sidebar" : !1,
259
+ getIsSidebarOpen: () => p.current ? window.matchMedia("(min-width: 768px)").matches ? !S.current : j.current === "sidebar" : !1,
260
260
  subscribeToSidebarOpen: (o) => (C.current.add(o), () => {
261
261
  C.current.delete(o);
262
262
  }),
@@ -291,7 +291,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
291
291
  const F = q.current, Q = typeof r == "function" ? r(F) : r, M = It.toArray(Q);
292
292
  let _ = null, U = null, X = null;
293
293
  const Z = [];
294
- let K = null, oe = null, W = null;
294
+ let K = null, ne = null, W = null;
295
295
  M.forEach((o) => {
296
296
  if (!ce(o)) {
297
297
  Z.push(o);
@@ -313,8 +313,8 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
313
313
  K = o;
314
314
  return;
315
315
  }
316
- if (o.type === Je && !oe) {
317
- oe = o;
316
+ if (o.type === Je && !ne) {
317
+ ne = o;
318
318
  return;
319
319
  }
320
320
  if (o.type === Pe && !W) {
@@ -323,7 +323,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
323
323
  }
324
324
  Z.push(o);
325
325
  });
326
- const we = !!U, fe = U ?? (Z.length ? /* @__PURE__ */ e.jsx(xe, { children: Z }) : null), me = we ? Z : [], ee = K ?? (!!K ? /* @__PURE__ */ e.jsx(Ae, { children: Q, context: F, modal: l, closeOnOutsideClick: d }) : null), pe = X ?? (!!X ? /* @__PURE__ */ e.jsx(ge, { children: X }) : null), ye = !!oe, te = oe, ie = !!W, ae = re(() => ({
326
+ const we = !!U, fe = U ?? (Z.length ? /* @__PURE__ */ e.jsx(xe, { children: Z }) : null), me = we ? Z : [], ee = K ?? (!!K ? /* @__PURE__ */ e.jsx(Ae, { children: Q, context: F, modal: l, closeOnOutsideClick: d }) : null), pe = X ?? (!!X ? /* @__PURE__ */ e.jsx(ge, { children: X }) : null), ye = !!ne, te = ne, ie = !!W, oe = re(() => ({
327
327
  isCollapsed: b.current,
328
328
  isSidebarOpen: !S.current
329
329
  }), [b.current, S.current]);
@@ -336,11 +336,11 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
336
336
  o.style.transition = "none";
337
337
  const L = b.current;
338
338
  o.className = o.className.replace(/\b(collapsed|expanded|has-left-slot)\b/g, "").trim(), o.classList.add(L ? "collapsed" : "expanded"), ie && o.classList.add("has-left-slot"), o.style.transition = g;
339
- }, [ie]), /* @__PURE__ */ e.jsx(Ge.Provider, { value: ae, children: /* @__PURE__ */ e.jsx(Ye.Provider, { value: F, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: h, className: D(
339
+ }, [ie]), /* @__PURE__ */ e.jsx(Ge.Provider, { value: oe, children: /* @__PURE__ */ e.jsx(Ye.Provider, { value: F, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: h, className: D(
340
340
  "w-full h-full max-h-dvh overflow-y-hidden",
341
341
  ye ? "navigation-drawer-with-sidebar" : "navigation-drawer",
342
- p?.drawer ? "disabled-dragopen" : "",
343
- p?.sidebar ? "disabled-dragopen-sidebar" : ""
342
+ m?.drawer ? "disabled-dragopen" : "",
343
+ m?.sidebar ? "disabled-dragopen-sidebar" : ""
344
344
  ), children: [
345
345
  /* @__PURE__ */ e.jsxs(
346
346
  "div",
@@ -370,7 +370,7 @@ const Ge = Le(null), Ye = Le(null), Ht = () => {
370
370
  ),
371
371
  ee && ce(ee) ? je.cloneElement(ee, { ref: w, modal: l, closeOnOutsideClick: d }) : ee,
372
372
  te && ce(te) ? je.cloneElement(te, {
373
- ref: m,
373
+ ref: p,
374
374
  className: D("sidebar", te.props?.className, a),
375
375
  context: F
376
376
  }) : te
@@ -391,8 +391,8 @@ const Me = O(({ children: t, className: r, context: n }) => {
391
391
  });
392
392
  Me.displayName = "NavigationDrawerHeader";
393
393
  const xe = O(({ children: t, className: r, context: n, ...a }) => {
394
- const p = ue(t, n);
395
- return /* @__PURE__ */ e.jsx("div", { ...a, className: D("w-full flex-1 drawer-content select-none", r), children: p });
394
+ const m = ue(t, n);
395
+ return /* @__PURE__ */ e.jsx("div", { ...a, className: D("w-full flex-1 drawer-content select-none", r), children: m });
396
396
  });
397
397
  xe.displayName = "NavigationDrawerContent";
398
398
  const ge = O(({ children: t, className: r, context: n }) => {
@@ -402,9 +402,9 @@ const ge = O(({ children: t, className: r, context: n }) => {
402
402
  ge.displayName = "NavigationDrawerFooter";
403
403
  const Ze = O(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: D("w-full border-t border-neutral-strong-default ", t) }));
404
404
  Ze.displayName = "NavigationDrawerSpacer";
405
- const Ae = O(le(({ children: t, className: r, context: n, modal: a, closeOnOutsideClick: p }, l) => {
406
- const d = ue(t, n), h = ne(), i = () => {
407
- p && (h.closeDrawer(), h.closeSidebar());
405
+ const Ae = O(le(({ children: t, className: r, context: n, modal: a, closeOnOutsideClick: m }, l) => {
406
+ const d = ue(t, n), h = se(), i = () => {
407
+ m && (h.closeDrawer(), h.closeSidebar());
408
408
  };
409
409
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: l, className: D("flex-1 overflow-auto relative h-full max-h-dvh", r), children: [
410
410
  a && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick: i }),
@@ -482,14 +482,14 @@ const Yt = "hover:bg-neutral-medium-hover", Qt = Ie("", {
482
482
  title: r,
483
483
  icon: n,
484
484
  count: a,
485
- className: p,
485
+ className: m,
486
486
  isSelected: l = !1,
487
487
  hasSublinks: d,
488
488
  subLinksCollapsed: h,
489
489
  onToggleSublinks: i,
490
490
  as: f = "div",
491
491
  onClick: w,
492
- onAuxClick: m,
492
+ onAuxClick: p,
493
493
  disabled: b = !1,
494
494
  tooltipText: S,
495
495
  selectorCss: j
@@ -501,7 +501,7 @@ const Yt = "hover:bg-neutral-medium-hover", Qt = Ie("", {
501
501
  /* @__PURE__ */ e.jsx("label", { className: Xt({ disabled: b, isSelected: l }), children: r })
502
502
  ] }),
503
503
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
504
- a && a ? /* @__PURE__ */ e.jsx(We, { count: a, maxCount: 9, className: "badge", disabled: b }) : "",
504
+ a && a ? /* @__PURE__ */ e.jsx(We, { count: a, maxCount: 99, className: "badge", disabled: b }) : "",
505
505
  d && /* @__PURE__ */ e.jsx(
506
506
  "div",
507
507
  {
@@ -531,12 +531,12 @@ const Yt = "hover:bg-neutral-medium-hover", Qt = Ie("", {
531
531
  "transition-all duration-300",
532
532
  Yt,
533
533
  Qt({ isSelected: l, disabled: b }),
534
- p
534
+ m
535
535
  );
536
536
  if (f === "a") {
537
537
  const c = {
538
538
  onClick: u,
539
- onAuxClick: m,
539
+ onAuxClick: p,
540
540
  className: v
541
541
  };
542
542
  return /* @__PURE__ */ e.jsx("a", { ...c, children: C });
@@ -558,7 +558,7 @@ const Yt = "hover:bg-neutral-medium-hover", Qt = Ie("", {
558
558
  }, Re = O(Zt);
559
559
  Re.displayName = "NavigationDrawerItemBase";
560
560
  const er = (t) => {
561
- const { title: r, icon: n, count: a, className: p, isActive: l, onClick: d, isView: h = !0, disabled: i, tooltipText: f, selectorCss: w } = t;
561
+ const { title: r, icon: n, count: a, className: m, isActive: l, onClick: d, isView: h = !0, disabled: i, tooltipText: f, selectorCss: w } = t;
562
562
  return h ? /* @__PURE__ */ e.jsx(
563
563
  Re,
564
564
  {
@@ -566,7 +566,7 @@ const er = (t) => {
566
566
  title: r,
567
567
  icon: n,
568
568
  count: a,
569
- className: p,
569
+ className: m,
570
570
  isSelected: l,
571
571
  onClick: d,
572
572
  disabled: i,
@@ -579,8 +579,8 @@ et.displayName = "NavigationDrawerActionItem";
579
579
  const tr = ({ actions: t, activeActionId: r, onActionClick: n, className: a }) => /* @__PURE__ */ e.jsx(Oe, { className: D("flex flex-col w-full ", a), contentClassName: "space-y-2", scrollbarProps: { hide: !0 }, indicators: {
580
580
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
581
581
  bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
582
- }, children: t?.map((p) => {
583
- const { id: l, onClick: d, isView: h = !0, payload: i, ...f } = p, w = l === r, m = () => {
582
+ }, children: t?.map((m) => {
583
+ const { id: l, onClick: d, isView: h = !0, payload: i, ...f } = m, w = l === r, p = () => {
584
584
  n?.(l, i), d?.();
585
585
  };
586
586
  return h ? /* @__PURE__ */ e.jsx(
@@ -589,20 +589,20 @@ const tr = ({ actions: t, activeActionId: r, onActionClick: n, className: a }) =
589
589
  ...f,
590
590
  id: l,
591
591
  isActive: w,
592
- onClick: m
592
+ onClick: p
593
593
  },
594
594
  l
595
595
  ) : null;
596
596
  }) }), tt = O(tr);
597
597
  tt.displayName = "NavigationDrawerActions";
598
598
  const rr = (t) => {
599
- const { className: r, title: n, path: a, onClick: p, isSelected: l, parentPath: d } = t, { pathname: h } = Ve(), i = x(() => {
600
- p?.(a);
599
+ const { className: r, title: n, path: a, onClick: m, isSelected: l, parentPath: d } = t, { pathname: h } = Ve(), i = x(() => {
600
+ m?.(a);
601
601
  }, [a]), f = x(() => {
602
602
  if (a.startsWith("./")) {
603
603
  if (!d) return;
604
- const m = d + a.slice(2);
605
- window.open(m, "_blank");
604
+ const p = d + a.slice(2);
605
+ window.open(p, "_blank");
606
606
  } else
607
607
  window.open(a, "_blank");
608
608
  }, [a]), w = l || a === h;
@@ -629,7 +629,7 @@ const rr = (t) => {
629
629
  }, rt = O(rr);
630
630
  rt.displayName = "NavItemSecondary";
631
631
  const sr = le((t, r) => {
632
- const [n, a] = R(!0), p = I(null), { path: l, title: d, icon: h, count: i, className: f, isSelected: w = !1, onClick: m, sublinks: b, toggleCollapse: S, getIsCollapsed: j, subscribeToCollapse: u, isView: C = !0, disabled: v, tooltipText: A, selectorCss: c } = t;
632
+ const [n, a] = R(!0), m = I(null), { path: l, title: d, icon: h, count: i, className: f, isSelected: w = !1, onClick: p, sublinks: b, toggleCollapse: S, getIsCollapsed: j, subscribeToCollapse: u, isView: C = !0, disabled: v, tooltipText: A, selectorCss: c } = t;
633
633
  Y(() => u ? u((_) => {
634
634
  _ && a(!0);
635
635
  }) : void 0, [u]);
@@ -656,8 +656,8 @@ const sr = le((t, r) => {
656
656
  N(!1), S?.();
657
657
  return;
658
658
  }
659
- m?.(l);
660
- }, [l, m, b, S, N, j]), q = x(() => {
659
+ p?.(l);
660
+ }, [l, p, b, S, N, j]), q = x(() => {
661
661
  window.open(l, "_blank");
662
662
  }, [l]), F = () => {
663
663
  if (!b || v) return null;
@@ -666,16 +666,16 @@ const sr = le((t, r) => {
666
666
  const M = x((_) => {
667
667
  if (_.startsWith("./")) {
668
668
  const U = l + _.slice(2);
669
- m?.(U);
669
+ p?.(U);
670
670
  } else
671
- m?.(_);
671
+ p?.(_);
672
672
  }, [l]);
673
673
  return Y(() => {
674
- const _ = p.current;
674
+ const _ = m.current;
675
675
  if (!_) return;
676
676
  const U = _.scrollHeight;
677
677
  _.style.setProperty("--sublinks-max-height", `${U}px`);
678
- }, []), /* @__PURE__ */ e.jsx("div", { ref: p, className: `sublinks flex flex-col gap-1 ml-8 ${n ? "collapsed" : "expanded"}`, children: b.map((_) => /* @__PURE__ */ e.jsx(rt, { ..._, onClick: M, parentPath: l }, `${_.title}-${_.path}`)) });
678
+ }, []), /* @__PURE__ */ e.jsx("div", { ref: m, className: `sublinks flex flex-col gap-1 ml-8 ${n ? "collapsed" : "expanded"}`, children: b.map((_) => /* @__PURE__ */ e.jsx(rt, { ..._, onClick: M, parentPath: l }, `${_.title}-${_.path}`)) });
679
679
  }, Q = (M) => {
680
680
  M.stopPropagation(), M.preventDefault(), P();
681
681
  };
@@ -702,7 +702,7 @@ const sr = le((t, r) => {
702
702
  ] }) : null;
703
703
  }), st = O(sr);
704
704
  st.displayName = "NavigationDrawerLinkItem";
705
- const nr = ({ navlinks: t, handleNavigation: r, className: n, getIsCollapsed: a, toggleCollapse: p, subscribeToCollapse: l }) => {
705
+ const nr = ({ navlinks: t, handleNavigation: r, className: n, getIsCollapsed: a, toggleCollapse: m, subscribeToCollapse: l }) => {
706
706
  const { pathname: d } = Ve();
707
707
  return /* @__PURE__ */ e.jsx(Oe, { className: D("flex flex-col w-full", n), contentClassName: "space-y-2", axis: "y", scrollbarProps: { hide: !0 }, indicators: {
708
708
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
@@ -715,7 +715,7 @@ const nr = ({ navlinks: t, handleNavigation: r, className: n, getIsCollapsed: a,
715
715
  ...h,
716
716
  isSelected: f,
717
717
  onClick: r,
718
- toggleCollapse: p,
718
+ toggleCollapse: m,
719
719
  getIsCollapsed: a,
720
720
  subscribeToCollapse: l,
721
721
  disabled: h.disabled,
@@ -727,8 +727,8 @@ const nr = ({ navlinks: t, handleNavigation: r, className: n, getIsCollapsed: a,
727
727
  }) });
728
728
  }, nt = O(nr);
729
729
  nt.displayName = "NavigationDrawerNavlinks";
730
- const ot = O(({ navlinks: t, handleNavigation: r, allActions: n, activeActionId: a, initialSectionRef: p, navigationControlsRef: l, onActionClick: d }) => {
731
- const { getIsCollapsed: h, toggleCollapse: i, subscribeToCollapse: f, subscribeToSidebarOpen: w, getIsSidebarOpen: m } = ne(), [b, S] = R(() => m?.() ?? !1), [j, u] = R(() => p?.current ?? "notifications");
730
+ const ot = O(({ navlinks: t, handleNavigation: r, allActions: n, activeActionId: a, initialSectionRef: m, navigationControlsRef: l, onActionClick: d }) => {
731
+ const { getIsCollapsed: h, toggleCollapse: i, subscribeToCollapse: f, subscribeToSidebarOpen: w, getIsSidebarOpen: p } = se(), [b, S] = R(() => p?.() ?? !1), [j, u] = R(() => m?.current ?? "notifications");
732
732
  Y(() => {
733
733
  const A = w?.(S), c = l?.current?.subscribeToSection?.(u);
734
734
  return () => {
@@ -764,15 +764,15 @@ const ot = O(({ navlinks: t, handleNavigation: r, allActions: n, activeActionId:
764
764
  }, (t, r) => t.navlinks === r.navlinks && t.handleNavigation === r.handleNavigation && t.allActions === r.allActions && t.activeActionId === r.activeActionId && t.initialSectionRef === r.initialSectionRef && t.navigationControlsRef === r.navigationControlsRef && t.onActionClick === r.onActionClick);
765
765
  ot.displayName = "PyrionLayout.Content";
766
766
  const or = (t) => {
767
- const { sessions: r, onSessionClick: n, secondarySlot: a, subImageUrlAccessor: p } = t;
767
+ const { sessions: r, onSessionClick: n, secondarySlot: a, subImageUrlAccessor: m } = t;
768
768
  if (!r || r.length === 0)
769
769
  return null;
770
770
  const l = (i, f) => {
771
771
  n && f && n(i, f);
772
772
  }, d = (i) => {
773
- if (!p)
773
+ if (!m)
774
774
  return;
775
- const f = be({ session: i }, p);
775
+ const f = be({ session: i }, m);
776
776
  if (f != null)
777
777
  return typeof f == "string" ? f : String(f);
778
778
  }, h = x((i) => typeof a == "function" ? a(i) : a, [a]);
@@ -796,7 +796,7 @@ const or = (t) => {
796
796
  currentAppSessions: r,
797
797
  resolveUserSecondarySlot: n,
798
798
  resolveSessionSecondarySlot: a,
799
- onSessionClick: p,
799
+ onSessionClick: m,
800
800
  onLogoutClick: l,
801
801
  onProfileClick: d,
802
802
  options: h,
@@ -804,10 +804,10 @@ const or = (t) => {
804
804
  userOptionsControls: f,
805
805
  mobileAppSwitcherControls: w
806
806
  }) => {
807
- const { getIsCollapsed: m, toggleCollapse: b, subscribeToCollapse: S } = ne(), j = x(() => {
808
- const u = m();
807
+ const { getIsCollapsed: p, toggleCollapse: b, subscribeToCollapse: S } = se(), j = x(() => {
808
+ const u = p();
809
809
  u ? (b(), f.current?.open()) : d?.(u);
810
- }, [m, b, f, d]);
810
+ }, [p, b, f, d]);
811
811
  return Y(() => S((u) => {
812
812
  u && (f.current?.close(), w.current?.close());
813
813
  }), [S, f, w]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -842,7 +842,7 @@ const or = (t) => {
842
842
  or,
843
843
  {
844
844
  sessions: r,
845
- onSessionClick: p,
845
+ onSessionClick: m,
846
846
  secondarySlot: a,
847
847
  subImageUrlAccessor: h?.sessionCardOptions?.subImageUrlAccessor,
848
848
  currentSystemId: i,
@@ -876,10 +876,10 @@ const or = (t) => {
876
876
  const n = Object.keys(t), a = Object.keys(r);
877
877
  if (n.length !== a.length)
878
878
  return !1;
879
- for (const p of n) {
880
- if (!Object.prototype.hasOwnProperty.call(r, p))
879
+ for (const m of n) {
880
+ if (!Object.prototype.hasOwnProperty.call(r, m))
881
881
  return !1;
882
- const l = t[p], d = r[p];
882
+ const l = t[m], d = r[m];
883
883
  if (l !== d)
884
884
  return !1;
885
885
  }
@@ -897,34 +897,34 @@ const lt = O(({ enabled_systems: t, onClick: r, currentSystemId: n }) => {
897
897
  if (d) return { coverImage: d.coverImage, thumbnail: d.thumbnail };
898
898
  }
899
899
  return { coverImage: "", thumbnail: "" };
900
- }, [t]), p = !!r;
900
+ }, [t]), m = !!r;
901
901
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
902
902
  a().coverImage ? /* @__PURE__ */ e.jsx(
903
903
  "img",
904
904
  {
905
905
  src: a().coverImage,
906
906
  alt: "System Logo",
907
- className: D("w-full h-12 rounded object-contain system-cover-image ", p && "cursor-pointer"),
907
+ className: D("w-full h-12 rounded object-contain system-cover-image ", m && "cursor-pointer"),
908
908
  draggable: !1,
909
909
  onClick: r
910
910
  }
911
- ) : /* @__PURE__ */ e.jsx(se, { className: "w-full h-12 rounded object-contain system-cover-image " }),
911
+ ) : /* @__PURE__ */ e.jsx(ae, { className: "w-full h-12 rounded object-contain system-cover-image " }),
912
912
  a().thumbnail ? /* @__PURE__ */ e.jsx(
913
913
  "img",
914
914
  {
915
915
  src: a().thumbnail,
916
916
  alt: "System Logo",
917
- className: D("w-12 h-12 rounded object-cover system-thumbnail ", p && "cursor-pointer"),
917
+ className: D("w-12 h-12 rounded object-cover system-thumbnail ", m && "cursor-pointer"),
918
918
  draggable: !1,
919
919
  onClick: r
920
920
  }
921
- ) : /* @__PURE__ */ e.jsx(se, { className: "w-12 h-12 rounded object-cover system-thumbnail " })
921
+ ) : /* @__PURE__ */ e.jsx(ae, { className: "w-12 h-12 rounded object-cover system-thumbnail " })
922
922
  ] });
923
923
  }, (t, r) => t.enabled_systems === r.enabled_systems && t.onClick === r.onClick && t.currentSystemId === r.currentSystemId);
924
924
  lt.displayName = "PyrionNavigationDrawer.SystemLogo";
925
925
  const it = O(
926
926
  ({ onSystemLogoClick: t, state: r, currentSystemId: n }) => {
927
- const { getIsCollapsed: a } = ne(), p = x(() => {
927
+ const { getIsCollapsed: a } = se(), m = x(() => {
928
928
  if (t) {
929
929
  const l = a();
930
930
  t(l);
@@ -934,7 +934,7 @@ const it = O(
934
934
  lt,
935
935
  {
936
936
  enabled_systems: r.enabled_systems,
937
- onClick: p,
937
+ onClick: m,
938
938
  currentSystemId: n
939
939
  }
940
940
  );
@@ -961,26 +961,28 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
961
961
  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(ir, {}) })) });
962
962
  }, ir = () => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-end gap-1 p-2", children: [
963
963
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 w-full", children: [
964
- /* @__PURE__ */ e.jsx(se, { shape: "circle", className: "w-12 h-12 aspect-square!" }),
965
- /* @__PURE__ */ e.jsx(se, { shape: "rounded", className: "w-full h-12 min-h-12" })
964
+ /* @__PURE__ */ e.jsx(ae, { shape: "circle", className: "w-12 h-12 aspect-square!" }),
965
+ /* @__PURE__ */ e.jsx(ae, { shape: "rounded", className: "w-full h-12 min-h-12" })
966
966
  ] }),
967
- /* @__PURE__ */ e.jsx(se, { shape: "rounded", className: "w-20 h-3" })
968
- ] }), cr = ({ onCloseClick: t, onMarkAllAsRead: r, loadingState: n, errorState: a, notifications: p, scrollableState: l }) => {
967
+ /* @__PURE__ */ e.jsx(ae, { shape: "rounded", className: "w-20 h-3" })
968
+ ] }), cr = ({ onCloseClick: t, onMarkAllAsRead: r, loadingState: n, errorState: a, notifications: m, scrollableState: l }) => {
969
969
  const [d, h] = R("NO_LEIDAS"), i = I(null), f = I(null), w = (c) => {
970
970
  h(c);
971
- }, m = p.length > 0;
971
+ }, p = m.length > 0;
972
972
  De(() => {
973
973
  if (i.current && f.current) {
974
974
  const c = i.current.clientHeight;
975
975
  f.current.style.setProperty("height", `calc(100dvh - ${c}px - 20px)`);
976
976
  }
977
977
  }, [i?.current, d]);
978
- const b = p.filter((c) => !c.read).length, { isLoading: S, type: j } = n, { hasError: u, children: C } = a, v = re(() => p?.filter(
978
+ const b = m.filter((c) => !c.read).length, { isLoading: S, type: j } = n, { hasError: u, children: C } = a, v = re(() => m?.filter(
979
979
  (c) => d === "NO_LEIDAS" ? !c.read : c
980
- ), [p, d]), A = re(() => ({
980
+ ), [m, d]), A = re(() => ({
981
981
  activeTab: d,
982
- isLoading: S
983
- }), [d, S]);
982
+ isLoading: S,
983
+ notificationsLength: m.length
984
+ // Añadir la longitud de las notificaciones como metadata
985
+ }), [d, S, m.length]);
984
986
  return /* @__PURE__ */ e.jsx(
985
987
  "section",
986
988
  {
@@ -1019,14 +1021,11 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1019
1021
  iconSize: F
1020
1022
  }
1021
1023
  ),
1022
- b > 0 && c.id === "NO_LEIDAS" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1023
- /* @__PURE__ */ e.jsx(We, { count: b, className: "absolute top-1 -right-1" }),
1024
- S && /* @__PURE__ */ e.jsx("div", { className: "absolute top-0.5 -right-1.5", children: /* @__PURE__ */ e.jsx(se, { className: "size-6!", shape: "circle", animation: "border" }) })
1025
- ] })
1024
+ b > 0 && c.id === "NO_LEIDAS" && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(We, { count: b, maxCount: 99, className: "absolute top-1 -right-1" }) })
1026
1025
  ] })
1027
1026
  }
1028
1027
  ),
1029
- r && m && d === "NO_LEIDAS" && !u && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(Ee, { disabled: S || b === 0, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
1028
+ r && p && d === "NO_LEIDAS" && !u && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(Ee, { disabled: S || b === 0, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
1030
1029
  ] }),
1031
1030
  /* @__PURE__ */ e.jsx("div", { ref: f, className: " ", children: /* @__PURE__ */ e.jsxs(
1032
1031
  Mt,
@@ -1044,7 +1043,7 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1044
1043
  children: [
1045
1044
  u && /* @__PURE__ */ e.jsx("div", { className: "w-full h-full grid place-items-center", children: typeof C == "function" ? C() : C }),
1046
1045
  !u && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col md:h-[110%] h-[120%] ", children: [
1047
- S && j === "skeletons" ? /* @__PURE__ */ e.jsx(Ue, { type: j }) : m ? v?.map((c) => /* @__PURE__ */ e.jsxs("div", { children: [
1046
+ S && j === "skeletons" ? /* @__PURE__ */ e.jsx(Ue, { type: j }) : p ? v?.map((c) => /* @__PURE__ */ e.jsxs("div", { children: [
1048
1047
  /* @__PURE__ */ e.jsx(Ft, { ...c, className: "mt-2" }),
1049
1048
  /* @__PURE__ */ e.jsx("div", { className: "h-0 mt-2 w-full border-b border-neutral-strong-default" })
1050
1049
  ] }, c._id)) : /* @__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" }),
@@ -1057,7 +1056,7 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1057
1056
  }
1058
1057
  );
1059
1058
  }, dr = (t) => {
1060
- const { notificationsListControls: r } = t, [n, a] = R([]), [p, l] = R({ isLoading: !1, type: "load_more" }), [d, h] = R({ hasError: !1 }), i = I(/* @__PURE__ */ new Set()), f = x((C, v = "top") => {
1059
+ const { notificationsListControls: r } = t, [n, a] = R([]), [m, l] = R({ isLoading: !1, type: "load_more" }), [d, h] = R({ hasError: !1 }), i = I(/* @__PURE__ */ new Set()), f = x((C, v = "top") => {
1061
1060
  a((A) => {
1062
1061
  const c = Array.isArray(C) ? v === "bottom" ? [...A, ...C] : [...C, ...A] : v === "bottom" ? [...A, C] : [C, ...A];
1063
1062
  return queueMicrotask(() => {
@@ -1066,7 +1065,7 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1066
1065
  });
1067
1066
  }, []), w = x((C) => (i.current.add(C), () => {
1068
1067
  i.current.delete(C);
1069
- }), []), m = x((C) => {
1068
+ }), []), p = x((C) => {
1070
1069
  a((v) => {
1071
1070
  const A = Array.isArray(C) ? v.filter((c) => !C.includes(c._id)) : v.filter((c) => c._id !== C);
1072
1071
  return queueMicrotask(() => {
@@ -1091,16 +1090,16 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1091
1090
  addNewNotification: f,
1092
1091
  subscribeToUpdates: w,
1093
1092
  setNotifications: S,
1094
- removeNotification: m,
1093
+ removeNotification: p,
1095
1094
  removeAllNotifications: b,
1096
1095
  setLoading: j,
1097
1096
  setError: u
1098
- }), [f, w, S, m, b, j, u]), {
1097
+ }), [f, w, S, p, b, j, u]), {
1099
1098
  notifications: n,
1100
- loadingState: p,
1099
+ loadingState: m,
1101
1100
  errorState: d
1102
1101
  };
1103
- }, ur = ({ closeSidebar: t, options: r, helpSection: n, initialSection: a, notificationsListControls: p, scrollableControls: l, navigationControls: d }) => {
1102
+ }, ur = ({ closeSidebar: t, options: r, helpSection: n, initialSection: a, notificationsListControls: m, scrollableControls: l, navigationControls: d }) => {
1104
1103
  const [h, i] = R(a ?? "notifications");
1105
1104
  Y(() => {
1106
1105
  const j = d?.current?.subscribeToSection?.(i);
@@ -1110,7 +1109,7 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1110
1109
  }, [d]);
1111
1110
  const f = () => {
1112
1111
  t();
1113
- }, { notifications: w, loadingState: m, errorState: b } = dr({ notificationsListControls: p }), S = Bt({ scrollTopButton: { target: "2000px" } });
1112
+ }, { notifications: w, loadingState: p, errorState: b } = dr({ notificationsListControls: m }), S = Bt({ scrollTopButton: { target: "2000px" } });
1114
1113
  return Te(l, () => ({
1115
1114
  subscribeToScrollTarget: S.handlers.subscribeToScrollTarget
1116
1115
  }), [S]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -1120,7 +1119,7 @@ const lr = ({ onCloseClick: t, children: r, title: n = "Ayuda" }) => /* @__PURE_
1120
1119
  onCloseClick: f,
1121
1120
  onMarkAllAsRead: r?.notificationsDrawerOptions?.onMarkAllAsRead,
1122
1121
  notifications: w,
1123
- loadingState: m,
1122
+ loadingState: p,
1124
1123
  errorState: b,
1125
1124
  scrollableState: S
1126
1125
  }
@@ -1134,10 +1133,10 @@ const fr = ({
1134
1133
  helpSection: r,
1135
1134
  initialSectionRef: n,
1136
1135
  notificationsListControls: a,
1137
- scrollableControls: p,
1136
+ scrollableControls: m,
1138
1137
  navigationControls: l
1139
1138
  }) => {
1140
- const { closeSidebar: d } = ne();
1139
+ const { closeSidebar: d } = se();
1141
1140
  return /* @__PURE__ */ e.jsx(
1142
1141
  ct,
1143
1142
  {
@@ -1146,17 +1145,17 @@ const fr = ({
1146
1145
  helpSection: r,
1147
1146
  initialSection: n.current,
1148
1147
  notificationsListControls: a,
1149
- scrollableControls: p,
1148
+ scrollableControls: m,
1150
1149
  navigationControls: l
1151
1150
  }
1152
1151
  );
1153
1152
  }, dt = O(fr);
1154
1153
  dt.displayName = "PyrionLayout.Sidebar";
1155
1154
  const mr = ({ navigationControlsRef: t }) => {
1156
- const r = ne();
1155
+ const r = se();
1157
1156
  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;
1158
1157
  }, pr = (t) => {
1159
- const { children: r, currentAppSessions: n, resolveUserSecondarySlot: a, resolveSessionSecondarySlot: p, handleNavigation: l, allActions: d, tabs: h, navigationControlsRef: i, initialSectionRef: f, userOptionsControls: w, mobileAppSwitcherControls: m, notificationsListControls: b, scrollableControls: S, outletRef: j, ...u } = t;
1158
+ const { children: r, currentAppSessions: n, resolveUserSecondarySlot: a, resolveSessionSecondarySlot: m, handleNavigation: l, allActions: d, tabs: h, navigationControlsRef: i, initialSectionRef: f, userOptionsControls: w, mobileAppSwitcherControls: p, notificationsListControls: b, scrollableControls: S, outletRef: j, ...u } = t;
1160
1159
  return /* @__PURE__ */ e.jsxs(V, { disableDragOpen: u.options?.disableDragOpen, outletRef: j, defaultCollapsedState: u.options?.defaultCollapsedState, children: [
1161
1160
  /* @__PURE__ */ e.jsx(mr, { navigationControlsRef: i }),
1162
1161
  /* @__PURE__ */ e.jsx(V.LeftSlot, { children: /* @__PURE__ */ e.jsx(
@@ -1196,13 +1195,13 @@ const mr = ({ navigationControlsRef: t }) => {
1196
1195
  state: u.state,
1197
1196
  currentAppSessions: n,
1198
1197
  resolveUserSecondarySlot: a,
1199
- resolveSessionSecondarySlot: p,
1198
+ resolveSessionSecondarySlot: m,
1200
1199
  onSessionClick: u.onSessionClick,
1201
1200
  onLogoutClick: u.onLogoutClick,
1202
1201
  options: u.options,
1203
1202
  currentSystemId: u.currentSystemId,
1204
1203
  userOptionsControls: w,
1205
- mobileAppSwitcherControls: m,
1204
+ mobileAppSwitcherControls: p,
1206
1205
  onProfileClick: u.onProfileClick
1207
1206
  }
1208
1207
  ) }, "PL-Footer"),
@@ -1229,7 +1228,7 @@ const mr = ({ navigationControlsRef: t }) => {
1229
1228
  )
1230
1229
  ] });
1231
1230
  }, ut = O(pr, (t, r) => {
1232
- const { children: n, ...a } = t, { children: p, ...l } = r, d = Object.keys(a), h = Object.keys(l);
1231
+ const { children: n, ...a } = t, { children: m, ...l } = r, d = Object.keys(a), h = Object.keys(l);
1233
1232
  if (d.length !== h.length)
1234
1233
  return !1;
1235
1234
  for (const i of d) {
@@ -1249,7 +1248,7 @@ const mt = Le(null), zr = () => {
1249
1248
  if (!t)
1250
1249
  throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
1251
1250
  return t;
1252
- }, Wr = ({ children: t, helpSection: r, state: n, links: a, onLinkClick: p, onNavigate: l, onLogoutClick: d, actions: h, activeActionId: i, onActionClick: f, tabsProps: w, currentSystemId: m, onSessionClick: b, onSystemLogoClick: S, onProfileClick: j, ...u }) => {
1251
+ }, Wr = ({ children: t, helpSection: r, state: n, links: a, onLinkClick: m, onNavigate: l, onLogoutClick: d, actions: h, activeActionId: i, onActionClick: f, tabsProps: w, currentSystemId: p, onSessionClick: b, onSystemLogoClick: S, onProfileClick: j, ...u }) => {
1253
1252
  const v = Object.assign({
1254
1253
  closeDrawerOnNavigate: !0,
1255
1254
  disableDragOpen: {
@@ -1258,13 +1257,13 @@ const mt = Le(null), zr = () => {
1258
1257
  }
1259
1258
  }, u.options), A = Lt(), c = I(null), P = I(null), N = I({}), B = I("notifications"), H = I(/* @__PURE__ */ new Set()), $ = I(null), q = I(null), F = I(null), [Q, M] = R({ total: 0, unread: 0 }), [_, U] = R(!1), [X, Z] = R(null), K = x((s) => {
1260
1259
  if (!(!s || typeof window > "u")) {
1261
- if (p) {
1262
- p(s);
1260
+ if (m) {
1261
+ m(s);
1263
1262
  return;
1264
1263
  }
1265
1264
  window.history.pushState({}, "", s), window.dispatchEvent(new PopStateEvent("popstate"));
1266
1265
  }
1267
- }, [p]), oe = x((s) => {
1266
+ }, [m]), ne = x((s) => {
1268
1267
  U(!1);
1269
1268
  const y = window.location.pathname;
1270
1269
  K(s), v.closeDrawerOnNavigate && Tt() && !N.current?.getIsCollapsed?.() && N.current?.toggleCollapse?.(), l && l(y, s);
@@ -1298,14 +1297,14 @@ const mt = Le(null), zr = () => {
1298
1297
  return;
1299
1298
  }
1300
1299
  }, []), ee = x((s) => {
1301
- const y = A ? "mobile" : "desktop", T = n.enabled_systems.find((he) => he.name === s), k = T?._id === m ? "internal" : "external";
1300
+ const y = A ? "mobile" : "desktop", T = n.enabled_systems.find((he) => he.name === s), k = T?._id === p ? "internal" : "external";
1302
1301
  console.log("navigationType", k);
1303
1302
  const z = {
1304
1303
  internal: ve(T?.url),
1305
1304
  external: T?.url
1306
1305
  };
1307
1306
  console.log("sanitizedUrl", z), me.system[y][k](z[k]), w?.onTabClick?.(s);
1308
- }, [m, ve, A, n.enabled_systems, w?.onTabClick]), Ne = x((s) => {
1307
+ }, [p, ve, A, n.enabled_systems, w?.onTabClick]), Ne = x((s) => {
1309
1308
  const y = A ? "mobile" : "desktop", T = n.company.products?.find((k) => k.name === s)?.domain;
1310
1309
  me.product[y](T), w?.onTabClick?.(s);
1311
1310
  }, [A, n.company.products, w?.onTabClick]), pe = x((s, y) => {
@@ -1327,10 +1326,10 @@ const mt = Le(null), zr = () => {
1327
1326
  }, [n.enabled_systems]), te = w?.currentTabName || ye(), ie = re(
1328
1327
  () => n.sessions || [],
1329
1328
  [n.sessions]
1330
- ), ae = (s) => s == null ? null : typeof s == "string" || typeof s == "number" || typeof s == "boolean" ? String(s) : ce(s) ? s : typeof s == "object" ? JSON.stringify(s) : null, o = x((s, y) => {
1329
+ ), oe = (s) => s == null ? null : typeof s == "string" || typeof s == "number" || typeof s == "boolean" ? String(s) : ce(s) ? s : typeof s == "object" ? JSON.stringify(s) : null, o = x((s, y) => {
1331
1330
  if (!s) return null;
1332
1331
  if (Array.isArray(s)) {
1333
- const T = s?.[0] ? be(y, s[0]) : null, k = s?.[1] ? be(y, s[1]) : null, z = ae(T), he = ae(k);
1332
+ const T = s?.[0] ? be(y, s[0]) : null, k = s?.[1] ? be(y, s[1]) : null, z = oe(T), he = oe(k);
1334
1333
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1335
1334
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default overflow-hidden truncate", children: z }),
1336
1335
  he && /* @__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: [
@@ -1341,25 +1340,25 @@ const mt = Le(null), zr = () => {
1341
1340
  }
1342
1341
  if (typeof s == "string") {
1343
1342
  const T = be(y, s);
1344
- return ae(T);
1343
+ return oe(T);
1345
1344
  }
1346
- return typeof s == "function" ? ae(s(y)) : null;
1345
+ return typeof s == "function" ? oe(s(y)) : null;
1347
1346
  }, []), g = x(
1348
1347
  (s) => {
1349
1348
  const y = v?.userCardOptions?.secondarySlot;
1350
1349
  if (!y) return null;
1351
- const T = n.enabled_systems?.find((z) => z._id === m), k = { company: n.company, user: n.user, system: T, metadata: s };
1350
+ const T = n.enabled_systems?.find((z) => z._id === p), k = { company: n.company, user: n.user, system: T, metadata: s };
1352
1351
  return o(y, k);
1353
1352
  },
1354
- [m, v?.userCardOptions?.secondarySlot, o, n.company, n.enabled_systems, n.user]
1353
+ [p, v?.userCardOptions?.secondarySlot, o, n.company, n.enabled_systems, n.user]
1355
1354
  ), L = x(
1356
1355
  (s) => {
1357
1356
  const y = v?.sessionCardOptions?.secondarySlot || v?.userCardOptions?.secondarySlot;
1358
1357
  if (!y) return null;
1359
- const T = n.enabled_systems?.find((z) => z._id === m), k = { company: n.company, user: s.auth_id, metadata: s?.metadata, system: T };
1358
+ const T = n.enabled_systems?.find((z) => z._id === p), k = { company: n.company, user: s.auth_id, metadata: s?.metadata, system: T };
1360
1359
  return o(y, k);
1361
1360
  },
1362
- [m, v?.sessionCardOptions?.secondarySlot, v?.userCardOptions?.secondarySlot, o, n.company, n.enabled_systems]
1361
+ [p, v?.sessionCardOptions?.secondarySlot, v?.userCardOptions?.secondarySlot, o, n.company, n.enabled_systems]
1363
1362
  ), E = re(() => {
1364
1363
  const s = [];
1365
1364
  return N.current.openNotifications = () => {
@@ -1450,7 +1449,7 @@ const mt = Le(null), zr = () => {
1450
1449
  ut,
1451
1450
  {
1452
1451
  links: a,
1453
- handleNavigation: oe,
1452
+ handleNavigation: ne,
1454
1453
  allActions: J,
1455
1454
  activeActionId: i,
1456
1455
  onActionClick: f,
@@ -1461,7 +1460,7 @@ const mt = Le(null), zr = () => {
1461
1460
  onSessionClick: At,
1462
1461
  onLogoutClick: kt,
1463
1462
  options: v,
1464
- currentSystemId: m,
1463
+ currentSystemId: p,
1465
1464
  userOptionsControls: $,
1466
1465
  mobileAppSwitcherControls: q,
1467
1466
  onSystemLogoClick: S,