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