@gspa/ui 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +18 -0
  2. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  3. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  4. package/dist/components/Accordion.cjs +1 -0
  5. package/dist/components/Accordion.js +192 -0
  6. package/dist/components/AccordionItem.cjs +1 -0
  7. package/dist/components/AccordionItem.js +109 -0
  8. package/dist/components/AddReminderModal.cjs +1 -0
  9. package/dist/components/AddReminderModal.js +107 -0
  10. package/dist/components/Alert.cjs +1 -0
  11. package/dist/components/Alert.js +222 -0
  12. package/dist/components/Avatar.cjs +1 -0
  13. package/dist/components/Avatar.js +86 -0
  14. package/dist/components/Badge.cjs +1 -0
  15. package/dist/components/Badge.js +109 -0
  16. package/dist/components/Breadcrumb.cjs +1 -0
  17. package/dist/components/Breadcrumb.js +72 -0
  18. package/dist/components/Button.cjs +1 -0
  19. package/dist/components/Button.js +190 -0
  20. package/dist/components/ButtonGroup.cjs +1 -0
  21. package/dist/components/ButtonGroup.js +46 -0
  22. package/dist/components/Calendar.cjs +1 -0
  23. package/dist/components/Calendar.js +341 -0
  24. package/dist/components/Card.cjs +1 -0
  25. package/dist/components/Card.js +316 -0
  26. package/dist/components/CardBody.cjs +1 -0
  27. package/dist/components/CardBody.js +34 -0
  28. package/dist/components/CardContent.cjs +1 -0
  29. package/dist/components/CardContent.js +17 -0
  30. package/dist/components/CardFooter.cjs +1 -0
  31. package/dist/components/CardFooter.js +34 -0
  32. package/dist/components/CardHeader.cjs +1 -0
  33. package/dist/components/CardHeader.js +91 -0
  34. package/dist/components/CardTitle.cjs +1 -0
  35. package/dist/components/CardTitle.js +17 -0
  36. package/dist/components/Checkbox.cjs +1 -0
  37. package/dist/components/Checkbox.js +185 -0
  38. package/dist/components/CircularProgress.cjs +1 -0
  39. package/dist/components/CircularProgress.js +141 -0
  40. package/dist/components/DataTable.cjs +1 -0
  41. package/dist/components/DataTable.js +863 -0
  42. package/dist/components/DataTableCell.cjs +1 -0
  43. package/dist/components/DataTableCell.js +95 -0
  44. package/dist/components/DataTableFilters.cjs +1 -0
  45. package/dist/components/DataTableFilters.js +519 -0
  46. package/dist/components/DataTableHeader.cjs +1 -0
  47. package/dist/components/DataTableHeader.js +116 -0
  48. package/dist/components/DataTablePagination.cjs +1 -0
  49. package/dist/components/DataTablePagination.js +290 -0
  50. package/dist/components/DataTableRow.cjs +1 -0
  51. package/dist/components/DataTableRow.js +199 -0
  52. package/dist/components/DataTableToolBar.cjs +1 -0
  53. package/dist/components/DataTableToolBar.js +477 -0
  54. package/dist/components/DatePicker.cjs +1 -0
  55. package/dist/components/DatePicker.js +401 -0
  56. package/dist/components/Divider.cjs +1 -0
  57. package/dist/components/Divider.js +103 -0
  58. package/dist/components/Dropdown.cjs +1 -0
  59. package/dist/components/Dropdown.js +104 -0
  60. package/dist/components/DropdownItem.cjs +1 -0
  61. package/dist/components/DropdownItem.js +60 -0
  62. package/dist/components/EventsCalendar.cjs +1 -0
  63. package/dist/components/EventsCalendar.js +863 -0
  64. package/dist/components/FileUpload.cjs +1 -0
  65. package/dist/components/FileUpload.js +195 -0
  66. package/dist/components/FilterDrawer.cjs +1 -0
  67. package/dist/components/FilterDrawer.js +412 -0
  68. package/dist/components/Footer.cjs +1 -0
  69. package/dist/components/Footer.js +157 -0
  70. package/dist/components/FormField.cjs +1 -0
  71. package/dist/components/FormField.js +190 -0
  72. package/dist/components/Graph.cjs +1 -0
  73. package/dist/components/Graph.js +164 -0
  74. package/dist/components/GraphFilters.cjs +1 -0
  75. package/dist/components/GraphFilters.js +305 -0
  76. package/dist/components/Header.cjs +1 -0
  77. package/dist/components/Header.js +674 -0
  78. package/dist/components/Icon.cjs +1 -0
  79. package/dist/components/Icon.js +51 -0
  80. package/dist/components/Image.cjs +1 -0
  81. package/dist/components/Image.js +112 -0
  82. package/dist/components/Input.cjs +1 -0
  83. package/dist/components/Input.js +166 -0
  84. package/dist/components/InputGroup.cjs +1 -0
  85. package/dist/components/InputGroup.js +45 -0
  86. package/dist/components/Label.cjs +1 -0
  87. package/dist/components/Label.js +46 -0
  88. package/dist/components/Link.cjs +1 -0
  89. package/dist/components/Link.js +119 -0
  90. package/dist/components/ListItem.cjs +1 -0
  91. package/dist/components/ListItem.js +89 -0
  92. package/dist/components/Loader.cjs +1 -0
  93. package/dist/components/Loader.js +154 -0
  94. package/dist/components/Logo.cjs +1 -0
  95. package/dist/components/Logo.js +67 -0
  96. package/dist/components/MenuItem.cjs +1 -0
  97. package/dist/components/MenuItem.js +66 -0
  98. package/dist/components/Modal.cjs +1 -0
  99. package/dist/components/Modal.js +110 -0
  100. package/dist/components/ModalBody.cjs +1 -0
  101. package/dist/components/ModalBody.js +33 -0
  102. package/dist/components/ModalFooter.cjs +1 -0
  103. package/dist/components/ModalFooter.js +33 -0
  104. package/dist/components/ModalHeader.cjs +1 -0
  105. package/dist/components/ModalHeader.js +24 -0
  106. package/dist/components/MultiSelect.cjs +1 -0
  107. package/dist/components/MultiSelect.js +211 -0
  108. package/dist/components/Notification.cjs +1 -0
  109. package/dist/components/Notification.js +121 -0
  110. package/dist/components/Option.cjs +1 -0
  111. package/dist/components/Option.js +44 -0
  112. package/dist/components/Progress.cjs +1 -0
  113. package/dist/components/Progress.js +77 -0
  114. package/dist/components/ProgressBar.cjs +1 -0
  115. package/dist/components/ProgressBar.js +101 -0
  116. package/dist/components/Radio.cjs +1 -0
  117. package/dist/components/Radio.js +81 -0
  118. package/dist/components/RailNav.cjs +1 -0
  119. package/dist/components/RailNav.js +124 -0
  120. package/dist/components/ReminderConfig.cjs +1 -0
  121. package/dist/components/ReminderConfig.js +375 -0
  122. package/dist/components/ReusableForm.cjs +1 -0
  123. package/dist/components/ReusableForm.js +657 -0
  124. package/dist/components/ReusableFormModal.cjs +1 -0
  125. package/dist/components/ReusableFormModal.js +112 -0
  126. package/dist/components/RightDrawer.cjs +1 -0
  127. package/dist/components/RightDrawer.js +143 -0
  128. package/dist/components/Search.cjs +1 -0
  129. package/dist/components/Search.js +252 -0
  130. package/dist/components/Select.cjs +1 -0
  131. package/dist/components/Select.js +243 -0
  132. package/dist/components/Sidebar.cjs +1 -0
  133. package/dist/components/Sidebar.js +372 -0
  134. package/dist/components/Slider.cjs +1 -0
  135. package/dist/components/Slider.js +42 -0
  136. package/dist/components/Spinner.cjs +1 -0
  137. package/dist/components/Spinner.js +87 -0
  138. package/dist/components/Stepper.cjs +1 -0
  139. package/dist/components/Stepper.js +12 -0
  140. package/dist/components/StepperItem.cjs +1 -0
  141. package/dist/components/StepperItem.js +33 -0
  142. package/dist/components/Switch.cjs +1 -0
  143. package/dist/components/Switch.js +112 -0
  144. package/dist/components/Tab.cjs +1 -0
  145. package/dist/components/Tab.js +134 -0
  146. package/dist/components/TabPanel.cjs +1 -0
  147. package/dist/components/TabPanel.js +49 -0
  148. package/dist/components/Text.cjs +1 -0
  149. package/dist/components/Text.js +84 -0
  150. package/dist/components/Textarea.cjs +1 -0
  151. package/dist/components/Textarea.js +102 -0
  152. package/dist/components/ThemeConfigurator.cjs +1 -0
  153. package/dist/components/ThemeConfigurator.js +50 -0
  154. package/dist/components/Timeline.cjs +1 -0
  155. package/dist/components/Timeline.js +24 -0
  156. package/dist/components/TimelineItem.cjs +1 -0
  157. package/dist/components/TimelineItem.js +63 -0
  158. package/dist/components/Toast.cjs +1 -0
  159. package/dist/components/Toast.js +231 -0
  160. package/dist/components/Tooltip.cjs +1 -0
  161. package/dist/components/Tooltip.js +124 -0
  162. package/dist/components/Typography.cjs +1 -0
  163. package/dist/components/Typography.js +267 -0
  164. package/dist/components/charts/BarChart.cjs +1 -0
  165. package/dist/components/charts/BarChart.js +323 -0
  166. package/dist/components/charts/LineChart.cjs +1 -0
  167. package/dist/components/charts/LineChart.js +322 -0
  168. package/dist/components/charts/PieChart.cjs +1 -0
  169. package/dist/components/charts/PieChart.js +311 -0
  170. package/dist/components/charts/StackedBarChart.cjs +1 -0
  171. package/dist/components/charts/StackedBarChart.js +348 -0
  172. package/dist/components/widgets/DashboardWidget.cjs +1 -0
  173. package/dist/components/widgets/DashboardWidget.js +309 -0
  174. package/dist/directives/tooltip.cjs +47 -0
  175. package/dist/directives/tooltip.js +115 -0
  176. package/dist/index.cjs +1 -0
  177. package/dist/index.esm.js +311 -19548
  178. package/dist/layouts/AuthLayout.cjs +1 -0
  179. package/dist/layouts/AuthLayout.js +190 -0
  180. package/dist/layouts/DashboardLayout.cjs +1 -0
  181. package/dist/layouts/DashboardLayout.js +244 -0
  182. package/dist/layouts/DefaultLayout.cjs +1 -0
  183. package/dist/layouts/DefaultLayout.js +94 -0
  184. package/dist/layouts/ErrorLayout.cjs +1 -0
  185. package/dist/layouts/ErrorLayout.js +452 -0
  186. package/dist/lib/auth.cjs +1 -0
  187. package/dist/lib/auth.js +4 -0
  188. package/dist/lib/theme.cjs +1 -0
  189. package/dist/lib/theme.js +135 -0
  190. package/dist/lib/toast.cjs +1 -0
  191. package/dist/lib/toast.js +81 -0
  192. package/dist/tsconfig.tsbuildinfo +1 -1
  193. package/dist/utils/cn.cjs +1 -0
  194. package/dist/utils/cn.js +7 -0
  195. package/package.json +37 -7
  196. package/dist/index.js +0 -605
@@ -0,0 +1,674 @@
1
+ import { ref as x, computed as p, onMounted as ze, onUnmounted as Ee, watch as R, resolveComponent as Fe, createElementBlock as n, openBlock as a, normalizeClass as f, unref as T, createElementVNode as r, createCommentVNode as l, createVNode as d, toDisplayString as i, Transition as P, withCtx as B, createTextVNode as O, Fragment as H, renderList as W, normalizeStyle as j, createBlock as S } from "vue";
2
+ import { cn as M } from "../utils/cn.js";
3
+ import { setMode as Re, getMode as Pe } from "../lib/theme.js";
4
+ import c from "./Icon.js";
5
+ import We from "./Search.js";
6
+ import Ye from "./Switch.js";
7
+ import { _ as qe } from "../_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const Ge = { class: "relative flex items-center justify-between h-20 sm:h-18 px-3 sm:px-4 md:px-6" }, Qe = { class: "flex items-center gap-2 sm:gap-3 md:gap-4 min-w-0 flex-1" }, Ze = ["src"], Je = {
9
+ key: 2,
10
+ class: "h-5 sm:h-18 w-px ui-border-strong-bg shrink-0 hidden sm:block"
11
+ }, Xe = {
12
+ key: 3,
13
+ class: "shrink-0 ui-surface border ui-border-strong px-2 py-1.5 sm:px-3 sm:py-2 rounded-xl shadow-sm flex items-center gap-2 relative hover:bg-(--ui-surface-muted) transition-colors max-w-52 sm:max-w-72"
14
+ }, Ke = { class: "w-8 h-8 rounded-lg ui-surface-muted border ui-border-strong flex items-center justify-center shrink-0" }, et = { class: "flex-1 min-w-0" }, tt = { class: "text-xs sm:text-sm font-semibold ui-text truncate group-hover:text-(--ui-primary) leading-tight" }, st = {
15
+ key: 1,
16
+ class: "min-w-0 flex-1 px-1"
17
+ }, rt = { class: "text-xs sm:text-sm font-semibold ui-text truncate max-w-[160px] sm:max-w-52 leading-tight" }, ot = {
18
+ key: 0,
19
+ class: "ui-surface absolute top-full left-0 right-0 sm:left-0 sm:right-auto mt-2 w-[min(92vw,24rem)] rounded-2xl border ui-border-strong shadow-2xl z-50 max-h-96 overflow-hidden"
20
+ }, at = { class: "p-3 sm:p-4 border-b ui-border-strong ui-surface-muted" }, nt = { class: "text-sm sm:text-base font-semibold ui-text flex items-center gap-2" }, lt = { class: "text-xs ui-text mt-1" }, it = { class: "py-2 max-h-80 overflow-y-auto" }, ut = ["onClick"], ct = {
21
+ key: 0,
22
+ class: "shrink-0 mr-2 sm:mr-3"
23
+ }, dt = ["src", "alt"], mt = {
24
+ key: 1,
25
+ class: "w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-linear-to-br from-(--ui-bg) to-(--ui-bg) flex items-center justify-center mr-2 sm:mr-3 shrink-0"
26
+ }, pt = { class: "flex-1 text-left min-w-0" }, ft = { class: "font-semibold truncate text-sm sm:text-md" }, ht = {
27
+ key: 0,
28
+ class: "pointer-events-none absolute left-1/2 -translate-x-1/2"
29
+ }, yt = ["src"], gt = { class: "flex items-center gap-1 sm:gap-2 md:gap-3 pl-2" }, vt = {
30
+ key: 0,
31
+ class: "absolute -top-0.5 -right-0.5 sm:-top-1 sm:-right-1 min-w-4 h-4 sm:min-w-[18px] sm:h-[18px] ui-danger-bg ui-text-inverse text-[10px] sm:text-xs rounded-full flex items-center justify-center font-semibold px-0.5 sm:px-1"
32
+ }, xt = {
33
+ key: 0,
34
+ class: "ui-surface absolute right-2 sm:right-4 md:right-6 top-14 sm:top-16 mt-2 w-[calc(100vw-1rem)] max-w-sm sm:w-80 md:w-96 rounded-2xl border ui-border-strong shadow-2xl z-9999 overflow-hidden"
35
+ }, bt = { class: "p-3 sm:p-4 border-b ui-border-strong ui-surface-muted" }, wt = { class: "text-sm sm:text-base font-semibold ui-text" }, _t = {
36
+ key: 0,
37
+ class: "text-xs ui-text mt-1"
38
+ }, kt = { class: "max-h-[60vh] sm:max-h-96 overflow-y-auto" }, Ct = {
39
+ key: 0,
40
+ class: "p-6 sm:p-8 text-center"
41
+ }, St = ["onClick"], At = { class: "flex items-start space-x-2 sm:space-x-3" }, Lt = { class: "flex-1 min-w-0" }, Nt = { class: "flex items-start justify-between gap-2" }, Tt = { class: "text-xs sm:text-md font-semibold ui-text flex-1 leading-tight" }, jt = {
42
+ key: 0,
43
+ class: "shrink-0 w-2 h-2 mt-1 ui-primary-bg rounded-full"
44
+ }, Mt = {
45
+ key: 0,
46
+ class: "flex items-center gap-1 sm:gap-1.5 mt-1.5 flex-wrap"
47
+ }, Dt = { class: "inline-flex items-center px-1.5 sm:px-2 py-0.5 rounded text-[10px] sm:text-xs font-semibold ui-accent-soft ui-accent border border-(--ui-accent-soft)" }, It = { class: "inline-flex items-center px-1.5 sm:px-2 py-0.5 rounded text-[10px] sm:text-xs font-medium ui-surface-muted ui-text border ui-border-strong" }, Ut = { class: "flex items-center gap-1.5 sm:gap-2 mt-1.5 sm:mt-2 flex-wrap" }, $t = {
48
+ key: 0,
49
+ class: "inline-flex items-center px-1.5 sm:px-2 py-0.5 rounded text-[10px] sm:text-xs font-medium ui-primary-soft ui-primary"
50
+ }, Bt = { class: "truncate max-w-[100px] sm:max-w-none" }, Ot = { class: "text-[10px] sm:text-xs ui-text mt-1.5 sm:mt-2 flex items-center" }, Ht = {
51
+ key: 0,
52
+ class: "p-2 sm:p-3 text-center border-t ui-border-strong ui-surface-muted"
53
+ }, Vt = {
54
+ key: 1,
55
+ class: "w-40 sm:w-52 md:w-64"
56
+ }, zt = { class: "relative" }, Et = ["aria-label"], Ft = { class: "w-9 h-9 sm:w-10 sm:h-10 bg-linear-to-br from-(--ui-primary-soft) to-(--ui-accent-soft) rounded-full flex items-center justify-center shadow-sm overflow-hidden border ui-border-strong" }, Rt = ["src", "alt"], Pt = {
57
+ key: 1,
58
+ class: "ui-primary text-sm sm:text-base font-semibold"
59
+ }, Wt = {
60
+ key: 0,
61
+ class: "ui-surface absolute right-0 mt-2 w-56 sm:w-60 rounded-xl border ui-border-strong shadow-xl z-50 overflow-hidden"
62
+ }, Yt = { class: "p-3 sm:p-4 border-b ui-border-strong flex items-center gap-3" }, qt = { class: "w-10 h-10 shrink-0 bg-linear-to-br from-(--ui-primary-soft) to-(--ui-accent-soft) rounded-full flex items-center justify-center shadow-sm overflow-hidden" }, Gt = ["src", "alt"], Qt = {
63
+ key: 1,
64
+ class: "ui-primary text-sm font-semibold"
65
+ }, Zt = { class: "min-w-0" }, Jt = { class: "text-sm font-semibold ui-text truncate" }, Xt = { class: "text-xs ui-text truncate" }, Kt = {
66
+ key: 0,
67
+ class: "px-3 py-3 border-b ui-border-strong"
68
+ }, es = { class: "flex items-center justify-between gap-3" }, ts = { class: "flex items-center gap-2 min-w-0" }, ss = { class: "text-sm font-medium ui-text truncate" }, rs = { class: "py-2" }, os = ["onClick"], as = { class: "flex items-center justify-center w-7 h-7 sm:w-8 sm:h-8 rounded-lg mr-2 sm:mr-3 shrink-0 transition-colors ml-1 sm:ml-2 ui-surface-muted ui-text group-hover:bg-(--ui-bg)" }, ns = { class: "flex-1 truncate font-semibold ui-text text-xs sm:text-md" }, ls = { class: "border-t ui-border-strong py-2" }, is = { class: "flex items-center justify-center w-7 h-7 sm:w-8 sm:h-8 rounded-lg mr-1 sm:mr-1 shrink-0 transition-colors ml-1 sm:ml-2 ui-danger-soft ui-danger group-hover:bg-(--ui-danger-soft)" }, us = {
69
+ __name: "Header",
70
+ props: {
71
+ sidebarWidth: { type: Number, default: 256 },
72
+ currentSection: { type: String, default: "Dashboard" },
73
+ currentPage: { type: String, default: "Overview" },
74
+ currentRoute: { type: String, default: "" },
75
+ user: { type: Object, required: !0 },
76
+ notifications: { type: Array, default: () => [] },
77
+ profileMenuItems: { type: Array, required: !0 },
78
+ mobileOpen: { type: Boolean, default: !1 },
79
+ currentCompany: { type: Object, default: null },
80
+ companyLogo: { type: String, default: "/logo.png" },
81
+ currentCompanyLogo: { type: String, default: "" },
82
+ companyLogos: { type: Object, default: () => ({}) },
83
+ companies: { type: Array, default: () => [] },
84
+ activeRoles: { type: Array, default: () => [] },
85
+ showSearch: { type: Boolean, default: !0 },
86
+ showNotifications: { type: Boolean, default: !0 },
87
+ showBreadcrumb: { type: Boolean, default: !0 },
88
+ showCompanyInfo: { type: Boolean, default: !0 },
89
+ showHeaderLogo: { type: Boolean, default: !0 },
90
+ logoUrl: { type: String, default: "/applogo.png" },
91
+ headerLogo: { type: String, default: "/logo.png" },
92
+ companyLogoClass: { type: String, default: "h-16 sm:h-22 md:h-22" },
93
+ searchPlaceholder: { type: String, default: "Search..." },
94
+ notificationsTitle: { type: String, default: "Notifications" },
95
+ companySwitcherTitle: { type: String, default: "Switch Company" },
96
+ companySwitcherDescription: { type: String, default: "Select a company to view its data" },
97
+ entityLabel: { type: String, default: "Company" },
98
+ entityFieldMap: { type: Object, default: () => ({}) },
99
+ showSettings: { type: Boolean, default: !0 },
100
+ settingsLabel: { type: String, default: "Settings" },
101
+ settingsRoute: { type: [String, Object], default: "/settings" },
102
+ showThemeSwitcher: { type: Boolean, default: !0 },
103
+ themeSwitcherTitle: { type: String, default: "Appearance" },
104
+ themeModes: {
105
+ type: Array,
106
+ default: () => ["light", "dark"]
107
+ },
108
+ userInitialsOverride: { type: String, default: "" },
109
+ userRoleDisplayOverride: { type: String, default: "" },
110
+ userAvatarUrl: { type: String, default: "" },
111
+ userAvatarAlt: { type: String, default: "" },
112
+ showUserAvatar: { type: Boolean, default: !0 },
113
+ themeScope: {
114
+ type: String,
115
+ default: "default",
116
+ validator: (u) => ["default", "module"].includes(u)
117
+ }
118
+ },
119
+ emits: [
120
+ "search",
121
+ "profile-action",
122
+ "logout",
123
+ "navigate",
124
+ "toggle-mobile-sidebar",
125
+ "company-change",
126
+ "notification-click",
127
+ "view-all-notifications",
128
+ "theme-change"
129
+ ],
130
+ setup(u, { emit: ae }) {
131
+ const o = u, h = ae, V = x(""), b = x(!1), y = x(!1), Y = x(!1), w = x(!1), D = x("light"), I = x("/logo.png"), z = x(!1), A = p(() => o.notifications.filter((e) => !e.read).length), L = p(() => {
132
+ const e = (Array.isArray(o.themeModes) ? o.themeModes : []).map((s) => String(s || "").toLowerCase()).filter((s) => s === "light" || s === "dark");
133
+ return e.length > 0 ? [...new Set(e)] : ["light", "dark"];
134
+ }), ne = p(() => L.value.length > 1), q = p({
135
+ get: () => D.value === "dark",
136
+ set: (e) => {
137
+ const s = e ? "dark" : "light";
138
+ L.value.includes(s) && Be(s);
139
+ }
140
+ }), G = p(() => o.userInitialsOverride ? o.userInitialsOverride : (o.user?.name || "Guest").split(" ").map((s) => s[0] || "").join("").toUpperCase()), U = p(() => o.showUserAvatar && o.userAvatarUrl || ""), Q = p(() => !!U.value && !z.value), Z = p(() => o.userAvatarAlt || `${o.user?.name || "User"} avatar`), J = () => {
141
+ z.value = !0;
142
+ }, le = p(() => String(o.entityLabel || "Company").toLowerCase()), X = p(() => o.showCompanyInfo), ie = p(() => o.companySwitcherTitle || `Switch ${o.entityLabel || "Company"}`), ue = p(() => o.companySwitcherDescription || `Select a ${(o.entityLabel || "Company").toLowerCase()} to view its data`), _ = p(() => ({
143
+ id: o.entityFieldMap?.id || "",
144
+ name: o.entityFieldMap?.name || "",
145
+ role: o.entityFieldMap?.role || "",
146
+ type: o.entityFieldMap?.type || "",
147
+ typeName: o.entityFieldMap?.typeName || ""
148
+ })), K = ["company_id", "companyId", "id"], ce = ["company_name", "companyName", "name"], de = ["company_role", "companyRole", "role"], me = ["company_type", "companyType", "type"], ee = ["name", "label", "title", "company_type_name", "companyTypeName"], k = (e, s, m = []) => {
149
+ if (!e || typeof e != "object") return null;
150
+ if (s && e[s] != null) return e[s];
151
+ for (const t of m)
152
+ if (e[t] != null) return e[t];
153
+ return null;
154
+ }, pe = (e) => {
155
+ if (!e || typeof e != "object") return "";
156
+ const s = k(e, _.value.type, me);
157
+ if (typeof s == "string") return s;
158
+ if (s && typeof s == "object") {
159
+ const t = k(s, _.value.typeName, ee);
160
+ if (t != null) return String(t);
161
+ }
162
+ const m = k(e, _.value.typeName, ee);
163
+ return m != null ? String(m) : "";
164
+ }, te = (e) => {
165
+ if (!e || typeof e != "object") return null;
166
+ const s = k(e, _.value.id, K), m = k(e, _.value.name, ce), t = k(e, _.value.role, de);
167
+ return {
168
+ ...e,
169
+ __id: s,
170
+ __name: m != null ? String(m) : "Unknown",
171
+ __role: t != null ? String(t) : "",
172
+ __typeName: pe(e),
173
+ __raw: e
174
+ };
175
+ }, fe = p(() => o.currentCompany), he = p(() => Array.isArray(o.companies) ? o.companies : []), g = p(() => te(fe.value)), se = p(() => he.value.map(te).filter(Boolean)), ye = () => {
176
+ b.value = !b.value, y.value = !1;
177
+ }, ge = () => {
178
+ y.value = !y.value, b.value = !1, w.value = !1;
179
+ }, ve = () => {
180
+ w.value = !w.value, y.value = !1, b.value = !1;
181
+ }, xe = (e) => {
182
+ h("navigate", e), y.value = !1;
183
+ }, v = (e) => e.route ? !!(o.currentRoute === e.route || o.currentRoute.startsWith(e.route + "/")) : !1, be = () => o.themeScope === "module" ? "border-b ui-border-strong bg-[color:color-mix(in oklab, var(--module-soft, var(--ui-primary-soft)), transparent 10%)]" : "border-b ui-border-strong bg-[color:color-mix(in oklab, var(--module-soft, var(--ui-primary-soft)), transparent 8%)]", we = (e) => e ? o.themeScope === "module" ? "shadow-sm border" : "bg-linear-to-br from-(--ui-primary-soft) to-(--ui-primary-soft) ui-primary shadow-sm border border-(--ui-primary-soft)" : "ui-text hover:bg-(--ui-surface-muted) hover:text-(--ui-text) border border-transparent", _e = (e) => !e || o.themeScope !== "module" ? null : {
184
+ backgroundColor: "var(--module-soft, var(--ui-primary-soft))",
185
+ borderColor: "var(--module-border, var(--ui-border-strong))"
186
+ }, ke = (e) => !e || o.themeScope !== "module" ? null : { background: "var(--module-primary, var(--ui-primary))" }, Ce = (e) => e ? o.themeScope === "module" ? "shadow-md border" : "bg-linear-to-br from-(--ui-primary) to-(--ui-primary) ui-text shadow-md" : "ui-surface-muted ui-text group-hover:bg-(--ui-bg)", Se = (e) => !e || o.themeScope !== "module" ? null : {
187
+ backgroundColor: "var(--module-primary, var(--ui-primary))",
188
+ color: "var(--ui-text-inverse, #fff)",
189
+ borderColor: "var(--module-border, var(--ui-border-strong))"
190
+ }, Ae = (e) => e ? o.themeScope === "module" ? "font-semibold" : "ui-primary" : "ui-text", Le = (e) => !e || o.themeScope !== "module" ? null : { color: "var(--module-text, var(--ui-primary))" }, Ne = (e) => e ? o.themeScope === "module" ? "border shadow-sm font-semibold" : "bg-[color:color-mix(in oklab, var(--ui-primary-soft), transparent 25%)] ui-primary border-(--ui-primary-soft)" : "ui-text border-transparent hover:bg-(--ui-surface-muted)", Te = (e) => !e || o.themeScope !== "module" ? null : {
191
+ backgroundColor: "var(--module-soft, var(--ui-primary-soft))",
192
+ borderColor: "var(--module-border, var(--ui-border-strong))",
193
+ color: "var(--module-text, var(--ui-primary))"
194
+ }, je = (e) => !e || o.themeScope !== "module" ? null : { color: "var(--module-primary, var(--ui-primary))" }, Me = (e) => {
195
+ h("profile-action", e), y.value = !1;
196
+ }, De = () => {
197
+ h("logout"), y.value = !1;
198
+ }, Ie = (e) => {
199
+ const s = e?.__raw || e;
200
+ h("company-change", s), w.value = !1;
201
+ }, Ue = (e) => {
202
+ h("notification-click", e);
203
+ }, $e = () => {
204
+ h("view-all-notifications"), b.value = !1;
205
+ }, re = (e) => {
206
+ !e.target.closest(".absolute") && !e.target.closest("button") && (b.value = !1, y.value = !1, w.value = !1);
207
+ }, Be = (e) => {
208
+ L.value.includes(e) && (D.value = e, Re(e), h("theme-change", e));
209
+ }, E = () => {
210
+ Y.value = window.innerWidth < 768;
211
+ }, Oe = (e) => {
212
+ if (e.title.includes("Overdue")) return "ui-danger-soft ui-danger";
213
+ if (e.title.includes("Due in 0")) return "ui-warning-soft ui-warning";
214
+ const s = {
215
+ due_date_reminder: "ui-warning-soft ui-warning",
216
+ info: "ui-primary-soft ui-primary",
217
+ success: "ui-success-soft ui-success",
218
+ warning: "ui-warning-soft ui-warning",
219
+ error: "ui-danger-soft ui-danger"
220
+ };
221
+ return s[e.type] || s.info;
222
+ }, He = (e) => {
223
+ if (!e) return "";
224
+ const s = e.split("\\");
225
+ return s[s.length - 1].replace(/([A-Z])/g, " $1").trim().split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join(" ");
226
+ }, Ve = (e) => {
227
+ if (!e) return "";
228
+ const s = new Date(e), m = /* @__PURE__ */ new Date();
229
+ m.setHours(0, 0, 0, 0);
230
+ const t = new Date(s);
231
+ t.setHours(0, 0, 0, 0);
232
+ const C = t - m, N = Math.ceil(C / (1e3 * 60 * 60 * 24));
233
+ return N === 0 ? "Due Today" : N === 1 ? "Due Tomorrow" : N < 0 ? `${Math.abs(N)} days overdue` : N <= 7 ? `Due in ${N} days` : s.toLocaleDateString("en-KE", {
234
+ month: "short",
235
+ day: "numeric",
236
+ year: s.getFullYear() !== m.getFullYear() ? "numeric" : void 0
237
+ });
238
+ }, F = (e) => {
239
+ const s = e?.__id ?? k(e, _.value.id, K);
240
+ return s == null ? null : o.companyLogos[s] || null;
241
+ }, $ = p(() => {
242
+ if (o.currentCompanyLogo) return o.currentCompanyLogo;
243
+ const e = F(g.value);
244
+ return e || (o.companyLogo ? o.companyLogo : "/logo.png");
245
+ }), oe = (e) => {
246
+ const s = "/logo.png", m = e || s;
247
+ if (m === s || typeof Image > "u") {
248
+ I.value = s;
249
+ return;
250
+ }
251
+ const t = new Image();
252
+ t.onload = () => {
253
+ I.value = m;
254
+ }, t.onerror = () => {
255
+ I.value = s;
256
+ }, t.src = m;
257
+ };
258
+ return ze(() => {
259
+ document.addEventListener("click", re), E(), window.addEventListener("resize", E);
260
+ const e = Pe() || L.value[0] || "light";
261
+ D.value = L.value.includes(e) ? e : L.value[0], oe($.value);
262
+ }), Ee(() => {
263
+ document.removeEventListener("click", re), window.removeEventListener("resize", E);
264
+ }), R(V, (e) => h("search", e)), R($, (e) => {
265
+ oe(e);
266
+ }), R(U, () => {
267
+ z.value = !1;
268
+ }), (e, s) => {
269
+ const m = Fe("router-link");
270
+ return a(), n("header", {
271
+ class: f(T(M)(
272
+ "fixed top-0 z-50 w-full backdrop-blur-md transition-all duration-300 ease-out",
273
+ o.themeScope === "module" && "kv-module-header",
274
+ be()
275
+ )),
276
+ style: { left: "0" }
277
+ }, [
278
+ r("div", Ge, [
279
+ r("div", Qe, [
280
+ Y.value ? (a(), n("button", {
281
+ key: 0,
282
+ class: "p-2 ui-text rounded-lg hover:bg-(--ui-surface-muted) transition-colors shrink-0",
283
+ onClick: s[0] || (s[0] = (t) => h("toggle-mobile-sidebar"))
284
+ }, [
285
+ d(c, {
286
+ icon: "bars",
287
+ class: "w-5 h-5"
288
+ })
289
+ ])) : l("", !0),
290
+ $.value ? (a(), n("div", {
291
+ key: 1,
292
+ class: f(T(M)("shrink-0 overflow-hidden rounded-2xl flex items-center justify-center", o.companyLogoClass))
293
+ }, [
294
+ r("img", {
295
+ src: I.value,
296
+ alt: "Company logo",
297
+ class: "max-w-full max-h-full w-auto h-auto object-contain object-center"
298
+ }, null, 8, Ze)
299
+ ], 2)) : l("", !0),
300
+ $.value && X.value && g.value ? (a(), n("div", Je)) : l("", !0),
301
+ X.value && g.value ? (a(), n("div", Xe, [
302
+ se.value.length > 1 ? (a(), n("button", {
303
+ key: 0,
304
+ class: "flex items-center gap-2 sm:gap-3 w-44 sm:w-60 cursor-pointer rounded-lg px-1.5 py-1 transition-all group",
305
+ onClick: ve
306
+ }, [
307
+ r("div", Ke, [
308
+ d(c, {
309
+ icon: "building",
310
+ class: "w-4 h-4 ui-primary"
311
+ })
312
+ ]),
313
+ r("div", et, [
314
+ r("p", tt, i(g.value.__name), 1)
315
+ ]),
316
+ d(c, {
317
+ icon: "chevron-down",
318
+ class: f(["w-3.5 h-3.5 ui-text-soft shrink-0 group-hover:text-(--ui-primary) transition-transform", { "rotate-180": w.value }])
319
+ }, null, 8, ["class"])
320
+ ])) : (a(), n("div", st, [
321
+ r("p", rt, i(g.value.__name), 1)
322
+ ])),
323
+ d(P, {
324
+ "enter-active-class": "transition-all duration-200 ease-out",
325
+ "leave-active-class": "transition-all duration-200 ease-in",
326
+ "enter-from-class": "opacity-0 translate-y-2 scale-95",
327
+ "enter-to-class": "opacity-100 translate-y-0 scale-100",
328
+ "leave-from-class": "opacity-100 translate-y-0 scale-100",
329
+ "leave-to-class": "opacity-0 translate-y-2 scale-95"
330
+ }, {
331
+ default: B(() => [
332
+ w.value ? (a(), n("div", ot, [
333
+ r("div", at, [
334
+ r("h3", nt, [
335
+ d(c, {
336
+ icon: "list",
337
+ class: "w-4 h-4 ui-primary"
338
+ }),
339
+ O(" " + i(ie.value), 1)
340
+ ]),
341
+ r("p", lt, i(ue.value), 1)
342
+ ]),
343
+ r("div", it, [
344
+ (a(!0), n(H, null, W(se.value, (t) => (a(), n("button", {
345
+ key: t.__id || t.__name,
346
+ class: f(T(M)(
347
+ "mx-2 flex items-center w-[calc(100%-1rem)] rounded-xl px-3 sm:px-4 py-2.5 text-sm transition-all group border",
348
+ Ne(t.__id === g.value?.__id)
349
+ )),
350
+ style: j(Te(t.__id === g.value?.__id)),
351
+ onClick: (C) => Ie(t)
352
+ }, [
353
+ F(t) ? (a(), n("div", ct, [
354
+ r("img", {
355
+ src: F(t),
356
+ alt: `${t.__name} ${le.value} logo`,
357
+ class: "w-7 h-7 sm:w-8 sm:h-8 object-contain rounded-lg ui-surface p-0.5 sm:p-1 border ui-border-strong group-hover:border-(--ui-primary-soft) transition-colors",
358
+ onError: s[1] || (s[1] = (C) => {
359
+ C.target.src = "/logo.png";
360
+ })
361
+ }, null, 40, dt)
362
+ ])) : (a(), n("div", mt, [
363
+ d(c, {
364
+ icon: "building",
365
+ class: "w-3.5 h-3.5 sm:w-4 sm:h-4 ui-text"
366
+ })
367
+ ])),
368
+ r("div", pt, [
369
+ r("p", ft, i(t.__name), 1)
370
+ ]),
371
+ t.__id === g.value?.__id ? (a(), S(c, {
372
+ key: 2,
373
+ icon: "check-circle",
374
+ class: "w-4 h-4 sm:w-5 sm:h-5 ui-primary shrink-0 ml-2",
375
+ style: j(je(t.__id === g.value?.__id))
376
+ }, null, 8, ["style"])) : l("", !0)
377
+ ], 14, ut))), 128))
378
+ ])
379
+ ])) : l("", !0)
380
+ ]),
381
+ _: 1
382
+ })
383
+ ])) : l("", !0)
384
+ ]),
385
+ u.showHeaderLogo && (u.logoUrl || u.headerLogo) ? (a(), n("div", ht, [
386
+ r("img", {
387
+ src: u.logoUrl || u.headerLogo,
388
+ alt: "App logo",
389
+ class: "h-16 sm:h-32 md:h-32 mt-4 w-auto object-contain",
390
+ onError: s[2] || (s[2] = (t) => {
391
+ t.target.src = "/applogo.png";
392
+ })
393
+ }, null, 40, yt)
394
+ ])) : l("", !0),
395
+ r("div", gt, [
396
+ u.showNotifications ? (a(), n("button", {
397
+ key: 0,
398
+ class: "relative p-2 ui-text rounded-xl hover:bg-(--ui-surface-muted) transition-colors",
399
+ onClick: ye
400
+ }, [
401
+ d(c, {
402
+ icon: "bell",
403
+ class: "w-5 h-5"
404
+ }),
405
+ A.value > 0 ? (a(), n("span", vt, i(A.value > 9 ? "9+" : A.value), 1)) : l("", !0)
406
+ ])) : l("", !0),
407
+ d(P, {
408
+ "enter-active-class": "transition-all duration-300 ease-out",
409
+ "leave-active-class": "transition-all duration-300 ease-in",
410
+ "enter-from-class": "opacity-0 translate-y-2 scale-95",
411
+ "enter-to-class": "opacity-100 translate-y-0 scale-100",
412
+ "leave-from-class": "opacity-100 translate-y-0 scale-100",
413
+ "leave-to-class": "opacity-0 translate-y-2 scale-95"
414
+ }, {
415
+ default: B(() => [
416
+ b.value ? (a(), n("div", xt, [
417
+ r("div", bt, [
418
+ r("h3", wt, i(u.notificationsTitle), 1),
419
+ A.value > 0 ? (a(), n("p", _t, " You have " + i(A.value) + " unread notification" + i(A.value > 1 ? "s" : ""), 1)) : l("", !0)
420
+ ]),
421
+ r("div", kt, [
422
+ u.notifications.length === 0 ? (a(), n("div", Ct, [
423
+ d(c, {
424
+ icon: "bell",
425
+ class: "w-10 h-10 sm:w-12 sm:h-12 mx-auto ui-text mb-2"
426
+ }),
427
+ s[5] || (s[5] = r("p", { class: "text-md ui-text" }, " No notifications ", -1))
428
+ ])) : (a(!0), n(H, { key: 1 }, W(u.notifications, (t) => (a(), n("div", {
429
+ key: t.id,
430
+ class: f([
431
+ "p-3 sm:p-4 border-b ui-border-strong hover:bg-(--ui-surface-muted) cursor-pointer transition-colors",
432
+ t.read ? "opacity-60" : ""
433
+ ]),
434
+ onClick: (C) => Ue(t)
435
+ }, [
436
+ r("div", At, [
437
+ r("div", {
438
+ class: f([
439
+ "shrink-0 w-8 h-8 sm:w-9 sm:h-9 rounded-lg flex items-center justify-center",
440
+ Oe(t)
441
+ ])
442
+ }, [
443
+ t.title.includes("Overdue") ? (a(), S(c, {
444
+ key: 0,
445
+ icon: "exclamation-triangle",
446
+ class: "w-4 h-4 sm:w-5 sm:h-5"
447
+ })) : t.type === "due_date_reminder" ? (a(), S(c, {
448
+ key: 1,
449
+ icon: "clock",
450
+ class: "w-4 h-4 sm:w-5 sm:h-5"
451
+ })) : (a(), S(c, {
452
+ key: 2,
453
+ icon: "bell",
454
+ class: "w-4 h-4 sm:w-5 sm:h-5"
455
+ }))
456
+ ], 2),
457
+ r("div", Lt, [
458
+ r("div", Nt, [
459
+ r("p", Tt, i(t.title), 1),
460
+ t.read ? l("", !0) : (a(), n("div", jt))
461
+ ]),
462
+ t.source ? (a(), n("div", Mt, [
463
+ r("span", Dt, [
464
+ d(c, {
465
+ icon: "tag",
466
+ class: "w-2.5 h-2.5 sm:w-3 sm:h-3 mr-0.5 sm:mr-1"
467
+ }),
468
+ O(" " + i(t.source.body_code), 1)
469
+ ]),
470
+ d(c, {
471
+ icon: "chevron-right",
472
+ class: "w-2.5 h-2.5 sm:w-3 sm:h-3 ui-text hidden xs:block"
473
+ }),
474
+ r("span", It, i(t.source.code), 1)
475
+ ])) : l("", !0),
476
+ r("div", Ut, [
477
+ t.model ? (a(), n("span", $t, [
478
+ d(c, {
479
+ icon: "file",
480
+ class: "w-2.5 h-2.5 sm:w-3 sm:h-3 mr-0.5 sm:mr-1"
481
+ }),
482
+ r("span", Bt, i(He(t.model)), 1)
483
+ ])) : l("", !0),
484
+ t.due_date ? (a(), n("span", {
485
+ key: 1,
486
+ class: f([
487
+ "inline-flex items-center px-1.5 sm:px-2 py-0.5 rounded text-[10px] sm:text-xs font-medium whitespace-nowrap",
488
+ t.title.includes("Overdue") ? "ui-danger-soft ui-danger border border-(--ui-danger-soft)" : (t.title.includes("Due in 0"), "ui-warning-soft ui-warning border border-(--ui-warning-soft)")
489
+ ])
490
+ }, [
491
+ d(c, {
492
+ icon: "calendar",
493
+ class: "w-2.5 h-2.5 sm:w-3 sm:h-3 mr-0.5 sm:mr-1 shrink-0"
494
+ }),
495
+ O(" " + i(Ve(t.due_date)), 1)
496
+ ], 2)) : l("", !0)
497
+ ]),
498
+ r("p", Ot, [
499
+ d(c, {
500
+ icon: "clock",
501
+ class: "w-2.5 h-2.5 sm:w-3 sm:h-3 mr-0.5 sm:mr-1"
502
+ }),
503
+ O(" " + i(t.time), 1)
504
+ ])
505
+ ])
506
+ ])
507
+ ], 10, St))), 128))
508
+ ]),
509
+ u.notifications.length > 0 ? (a(), n("div", Ht, [
510
+ r("button", {
511
+ class: "text-sm font-semibold ui-primary hover:text-(--ui-primary-strong) transition-colors",
512
+ onClick: $e
513
+ }, " View all notifications → ")
514
+ ])) : l("", !0)
515
+ ])) : l("", !0)
516
+ ]),
517
+ _: 1
518
+ }),
519
+ u.showSearch ? (a(), n("div", Vt, [
520
+ d(We, {
521
+ modelValue: V.value,
522
+ "onUpdate:modelValue": s[3] || (s[3] = (t) => V.value = t),
523
+ placeholder: u.searchPlaceholder,
524
+ size: "sm",
525
+ "show-no-results": !1,
526
+ "min-length": 0,
527
+ debounce: 200,
528
+ results: []
529
+ }, null, 8, ["modelValue", "placeholder"])
530
+ ])) : l("", !0),
531
+ r("div", zt, [
532
+ r("button", {
533
+ class: "shrink-0 rounded-full transition-transform hover:scale-105 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-primary)",
534
+ "aria-label": `${u.user.name} profile menu`,
535
+ onClick: ge
536
+ }, [
537
+ r("div", Ft, [
538
+ Q.value ? (a(), n("img", {
539
+ key: 0,
540
+ src: U.value,
541
+ alt: Z.value,
542
+ class: "w-full h-full object-cover",
543
+ onError: J
544
+ }, null, 40, Rt)) : (a(), n("span", Pt, i(G.value), 1))
545
+ ])
546
+ ], 8, Et),
547
+ d(P, {
548
+ "enter-active-class": "transition-all duration-200 ease-out",
549
+ "leave-active-class": "transition-all duration-200 ease-in",
550
+ "enter-from-class": "opacity-0 translate-y-2 scale-95",
551
+ "enter-to-class": "opacity-100 translate-y-0 scale-100",
552
+ "leave-from-class": "opacity-100 translate-y-0 scale-100",
553
+ "leave-to-class": "opacity-0 translate-y-2 scale-95"
554
+ }, {
555
+ default: B(() => [
556
+ y.value ? (a(), n("div", Wt, [
557
+ r("div", Yt, [
558
+ r("div", qt, [
559
+ Q.value ? (a(), n("img", {
560
+ key: 0,
561
+ src: U.value,
562
+ alt: Z.value,
563
+ class: "w-full h-full object-cover",
564
+ onError: J
565
+ }, null, 40, Gt)) : (a(), n("span", Qt, i(G.value), 1))
566
+ ]),
567
+ r("div", Zt, [
568
+ r("p", Jt, i(u.user.name), 1),
569
+ r("p", Xt, i(u.user.email), 1)
570
+ ])
571
+ ]),
572
+ u.showThemeSwitcher ? (a(), n("div", Kt, [
573
+ r("div", es, [
574
+ r("div", ts, [
575
+ d(c, {
576
+ icon: D.value === "dark" ? "moon" : "sun",
577
+ class: f(["w-4 h-4 shrink-0", D.value === "dark" ? "ui-primary" : "ui-text"])
578
+ }, null, 8, ["icon", "class"]),
579
+ r("span", ss, i(u.themeSwitcherTitle), 1)
580
+ ]),
581
+ d(Ye, {
582
+ modelValue: q.value,
583
+ "onUpdate:modelValue": s[4] || (s[4] = (t) => q.value = t),
584
+ size: "md",
585
+ disabled: !ne.value
586
+ }, null, 8, ["modelValue", "disabled"])
587
+ ])
588
+ ])) : l("", !0),
589
+ r("div", rs, [
590
+ (a(!0), n(H, null, W(u.profileMenuItems, (t) => (a(), n(H, {
591
+ key: t.name
592
+ }, [
593
+ t.route ? (a(), S(m, {
594
+ key: 0,
595
+ to: t.route,
596
+ class: f(T(M)(
597
+ "flex items-center px-2.5 sm:px-3 py-2 sm:py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative",
598
+ we(v(t))
599
+ )),
600
+ style: j(_e(v(t))),
601
+ onClick: (C) => xe(t)
602
+ }, {
603
+ default: B(() => [
604
+ v(t) ? (a(), n("div", {
605
+ key: 0,
606
+ class: "absolute left-0 top-1/2 transform -translate-y-1/2 w-1 h-6 sm:h-8 bg-linear-to-b from-(--ui-primary) to-(--ui-primary) rounded-r-full",
607
+ style: j(ke(v(t)))
608
+ }, null, 4)) : l("", !0),
609
+ r("div", {
610
+ class: f(T(M)(
611
+ "flex items-center justify-center w-7 h-7 sm:w-8 sm:h-8 rounded-lg mr-2 sm:mr-3 shrink-0 transition-colors ml-1 sm:ml-2",
612
+ Ce(v(t))
613
+ )),
614
+ style: j(Se(v(t)))
615
+ }, [
616
+ t.icon ? (a(), S(c, {
617
+ key: 0,
618
+ icon: t.icon,
619
+ class: "w-3.5 h-3.5 sm:w-4 sm:h-4"
620
+ }, null, 8, ["icon"])) : l("", !0)
621
+ ], 6),
622
+ r("span", {
623
+ class: f(T(M)(
624
+ "flex-1 truncate font-semibold text-xs sm:text-md",
625
+ Ae(v(t))
626
+ )),
627
+ style: j(Le(v(t)))
628
+ }, i(t.label), 7)
629
+ ]),
630
+ _: 2
631
+ }, 1032, ["to", "class", "style", "onClick"])) : (a(), n("button", {
632
+ key: 1,
633
+ class: "flex items-center w-full px-2.5 sm:px-3 py-2 sm:py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative ui-text hover:bg-(--ui-surface-muted) hover:text-(--ui-text) border border-transparent",
634
+ onClick: (C) => Me(t)
635
+ }, [
636
+ r("div", as, [
637
+ t.icon ? (a(), S(c, {
638
+ key: 0,
639
+ icon: t.icon,
640
+ class: "w-3.5 h-3.5 sm:w-4 sm:h-4"
641
+ }, null, 8, ["icon"])) : l("", !0)
642
+ ]),
643
+ r("span", ns, i(t.label), 1)
644
+ ], 8, os))
645
+ ], 64))), 128))
646
+ ]),
647
+ r("div", ls, [
648
+ r("button", {
649
+ class: "flex items-center w-full px-2.5 sm:px-3 py-2 sm:py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative ui-danger hover:bg-(--ui-danger-soft) border border-transparent",
650
+ onClick: De
651
+ }, [
652
+ r("div", is, [
653
+ d(c, {
654
+ icon: "sign-out-alt",
655
+ class: "w-3.5 h-3.5 sm:w-4 sm:h-4"
656
+ })
657
+ ]),
658
+ s[6] || (s[6] = r("span", { class: "truncate font-semibold ui-danger text-xs sm:text-md" }, " Sign out ", -1))
659
+ ])
660
+ ])
661
+ ])) : l("", !0)
662
+ ]),
663
+ _: 1
664
+ })
665
+ ])
666
+ ])
667
+ ])
668
+ ], 2);
669
+ };
670
+ }
671
+ }, gs = /* @__PURE__ */ qe(us, [["__scopeId", "data-v-3e4b26b8"]]);
672
+ export {
673
+ gs as default
674
+ };