@customafk/lunas-ui 0.1.18 → 0.1.19

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 (365) hide show
  1. package/dist/{avatar-BNU7KL48.mjs → avatar-BaxX-xI9.mjs} +1 -1
  2. package/dist/{avatar-BNU7KL48.mjs.map → avatar-BaxX-xI9.mjs.map} +1 -1
  3. package/dist/{avatar-DzZQenXU.cjs → avatar-dAu1c0bC.cjs} +1 -1
  4. package/dist/{avatar-DzZQenXU.cjs.map → avatar-dAu1c0bC.cjs.map} +1 -1
  5. package/dist/{button-JJaTl28Z.mjs → button-DIEXNBpi.mjs} +2 -2
  6. package/dist/{button-JJaTl28Z.mjs.map → button-DIEXNBpi.mjs.map} +1 -1
  7. package/dist/{button-vNDXA78a.d.mts → button-DUf6JdVx.d.cts} +7 -7
  8. package/dist/{button-C8HSrN_3.d.cts → button-Dv8PU7Hv.d.mts} +6 -6
  9. package/dist/{button.variants-CgCCe7qb.mjs → button.variants-DmUzMbB8.mjs} +1 -1
  10. package/dist/{button.variants-CgCCe7qb.mjs.map → button.variants-DmUzMbB8.mjs.map} +1 -1
  11. package/dist/{card-C8fcblBB.mjs → card-jwcpmq7e.mjs} +1 -1
  12. package/dist/{card-C8fcblBB.mjs.map → card-jwcpmq7e.mjs.map} +1 -1
  13. package/dist/cards/grid-product-card.mjs +1 -1
  14. package/dist/cards/product-card.mjs +1 -1
  15. package/dist/cards/simple-card.mjs +1 -1
  16. package/dist/{close-B_PnUzNN.mjs → close-CGei_VQ6.mjs} +1 -1
  17. package/dist/{close-B_PnUzNN.mjs.map → close-CGei_VQ6.mjs.map} +1 -1
  18. package/dist/{close-DKsjFTou.cjs → close-CXhpIVAZ.cjs} +1 -1
  19. package/dist/{close-DKsjFTou.cjs.map → close-CXhpIVAZ.cjs.map} +1 -1
  20. package/dist/{command-Dohhg_fY.cjs → command-B8Tbe4oe.cjs} +2 -2
  21. package/dist/{command-Dohhg_fY.cjs.map → command-B8Tbe4oe.cjs.map} +1 -1
  22. package/dist/{command-CtWxCsMm.mjs → command-BLlJzBw9.mjs} +2 -2
  23. package/dist/{command-CtWxCsMm.mjs.map → command-BLlJzBw9.mjs.map} +1 -1
  24. package/dist/data-display/country.cjs +1 -1
  25. package/dist/data-display/country.cjs.map +1 -1
  26. package/dist/data-display/country.d.cts +1 -1
  27. package/dist/data-display/country.d.mts +1 -1
  28. package/dist/data-display/country.mjs +1 -1
  29. package/dist/data-display/country.mjs.map +1 -1
  30. package/dist/data-display/data-list.cjs +1 -1
  31. package/dist/data-display/data-list.cjs.map +1 -1
  32. package/dist/data-display/data-list.mjs +1 -1
  33. package/dist/data-display/data-list.mjs.map +1 -1
  34. package/dist/data-display/date-tooltip.cjs +1 -1
  35. package/dist/data-display/date-tooltip.mjs +1 -1
  36. package/dist/data-display/date.cjs +1 -1
  37. package/dist/data-display/date.mjs +1 -1
  38. package/dist/data-display/empty.cjs +1 -1
  39. package/dist/data-display/empty.cjs.map +1 -1
  40. package/dist/data-display/empty.mjs +1 -1
  41. package/dist/data-display/empty.mjs.map +1 -1
  42. package/dist/data-display/name.cjs +1 -1
  43. package/dist/data-display/name.cjs.map +1 -1
  44. package/dist/data-display/name.mjs +1 -1
  45. package/dist/data-display/name.mjs.map +1 -1
  46. package/dist/data-display/phone-number.cjs +1 -1
  47. package/dist/data-display/phone-number.mjs +1 -1
  48. package/dist/data-display/role-badge.d.cts +1 -1
  49. package/dist/data-display/role-badge.d.mts +1 -1
  50. package/dist/data-display/role-badge.mjs +1 -1
  51. package/dist/data-display/statistic.cjs +1 -1
  52. package/dist/data-display/statistic.cjs.map +1 -1
  53. package/dist/data-display/statistic.d.cts +2 -2
  54. package/dist/data-display/statistic.mjs +1 -1
  55. package/dist/data-display/statistic.mjs.map +1 -1
  56. package/dist/data-display/user.cjs +1 -1
  57. package/dist/data-display/user.cjs.map +1 -1
  58. package/dist/data-display/user.mjs +1 -1
  59. package/dist/data-display/user.mjs.map +1 -1
  60. package/dist/{date-BUKVV2NZ.cjs → date-DU8xM0hQ.cjs} +2 -2
  61. package/dist/date-DU8xM0hQ.cjs.map +1 -0
  62. package/dist/{date-SmlhDFZs.mjs → date-Vl-tZLuD.mjs} +2 -2
  63. package/dist/date-Vl-tZLuD.mjs.map +1 -0
  64. package/dist/{dialog-CoSwDi4O.d.cts → dialog-CstR_oRr.d.mts} +12 -12
  65. package/dist/{dialog-DU7tobKF.d.mts → dialog-DJ_WrGvX.d.cts} +12 -12
  66. package/dist/{dialog-DEnVUD9A.cjs → dialog-DZ_gg6Ol.cjs} +2 -2
  67. package/dist/{dialog-DEnVUD9A.cjs.map → dialog-DZ_gg6Ol.cjs.map} +1 -1
  68. package/dist/{dialog-4ZJcWPar.mjs → dialog-DeZVOOmh.mjs} +2 -2
  69. package/dist/{dialog-4ZJcWPar.mjs.map → dialog-DeZVOOmh.mjs.map} +1 -1
  70. package/dist/dialogs/confirm-dialog.mjs +1 -1
  71. package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
  72. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
  73. package/dist/dialogs/detail-dialog/component/sidebar.d.mts +28 -28
  74. package/dist/dialogs/detail-dialog/component/sidebar.mjs +1 -1
  75. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  76. package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
  77. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  78. package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
  79. package/dist/dialogs/error-dialog.mjs +1 -1
  80. package/dist/dialogs/loading-dialog.cjs +1 -1
  81. package/dist/dialogs/loading-dialog.mjs +1 -1
  82. package/dist/{dist-D2ydYRc4.mjs → dist-CT2ZB1PF.mjs} +1 -1
  83. package/dist/{dist-D2ydYRc4.mjs.map → dist-CT2ZB1PF.mjs.map} +1 -1
  84. package/dist/{drawer-B2QxYWMi.mjs → drawer-272Fecsq.mjs} +1 -1
  85. package/dist/{drawer-B2QxYWMi.mjs.map → drawer-272Fecsq.mjs.map} +1 -1
  86. package/dist/{drawer-DpT2kOKz.cjs → drawer-y-Yrqskp.cjs} +1 -1
  87. package/dist/{drawer-DpT2kOKz.cjs.map → drawer-y-Yrqskp.cjs.map} +1 -1
  88. package/dist/{dropdown-menu-BuyuU6uF.cjs → dropdown-menu-C_dw8mro.cjs} +1 -1
  89. package/dist/{dropdown-menu-BuyuU6uF.cjs.map → dropdown-menu-C_dw8mro.cjs.map} +1 -1
  90. package/dist/{dropdown-menu-BwcDzb4B.mjs → dropdown-menu-CtU6oBI4.mjs} +1 -1
  91. package/dist/{dropdown-menu-BwcDzb4B.mjs.map → dropdown-menu-CtU6oBI4.mjs.map} +1 -1
  92. package/dist/features/search-modal/index.cjs +1 -1
  93. package/dist/features/search-modal/index.mjs +1 -1
  94. package/dist/features/tables/index.cjs +2 -0
  95. package/dist/features/tables/index.cjs.map +1 -0
  96. package/dist/features/tables/index.d.cts +75 -0
  97. package/dist/features/tables/index.d.mts +75 -0
  98. package/dist/features/tables/index.mjs +2 -0
  99. package/dist/features/tables/index.mjs.map +1 -0
  100. package/dist/features/tanstack-form/index.cjs +1 -1
  101. package/dist/features/tanstack-form/index.mjs +1 -1
  102. package/dist/flex-BGQqaHKh.mjs +2 -0
  103. package/dist/flex-BGQqaHKh.mjs.map +1 -0
  104. package/dist/flex-BYj-xYaw.cjs +2 -0
  105. package/dist/flex-BYj-xYaw.cjs.map +1 -0
  106. package/dist/{image-xsA4ZQ-u.mjs → image-BwbAQRxx.mjs} +2 -2
  107. package/dist/{image-xsA4ZQ-u.mjs.map → image-BwbAQRxx.mjs.map} +1 -1
  108. package/dist/{input-CEwMjaj3.d.cts → input-Bzo2Bgsz.d.cts} +4 -4
  109. package/dist/{input-CYFvmWQU.mjs → input-CC10BdKh.mjs} +1 -1
  110. package/dist/{input-CYFvmWQU.mjs.map → input-CC10BdKh.mjs.map} +1 -1
  111. package/dist/{input-ttkmXaOF.d.mts → input-DJh6tJbB.d.mts} +6 -6
  112. package/dist/{input-CvMqFdEE.cjs → input-DhUevNkc.cjs} +1 -1
  113. package/dist/{input-CvMqFdEE.cjs.map → input-DhUevNkc.cjs.map} +1 -1
  114. package/dist/{label-D6vHFlHX.cjs → label-CaBktIhh.cjs} +1 -1
  115. package/dist/{label-D6vHFlHX.cjs.map → label-CaBktIhh.cjs.map} +1 -1
  116. package/dist/{label-11tIftbr.mjs → label-DVfxfyG5.mjs} +1 -1
  117. package/dist/{label-11tIftbr.mjs.map → label-DVfxfyG5.mjs.map} +1 -1
  118. package/dist/layouts/app-layout/index.cjs +1 -1
  119. package/dist/layouts/app-layout/index.d.cts +28 -28
  120. package/dist/layouts/app-layout/index.d.mts +3 -3
  121. package/dist/layouts/app-layout/index.mjs +1 -1
  122. package/dist/layouts/cms-layout/index.cjs +1 -1
  123. package/dist/layouts/cms-layout/index.mjs +1 -1
  124. package/dist/layouts/flex.cjs +1 -2
  125. package/dist/layouts/flex.d.cts +6 -6
  126. package/dist/layouts/flex.d.mts +4 -4
  127. package/dist/layouts/flex.mjs +1 -2
  128. package/dist/layouts/service-layout/index.cjs +1 -1
  129. package/dist/layouts/service-layout/index.d.cts +13 -13
  130. package/dist/layouts/service-layout/index.d.mts +3 -3
  131. package/dist/layouts/service-layout/index.mjs +1 -1
  132. package/dist/layouts/service-layout/index.mjs.map +1 -1
  133. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  134. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  135. package/dist/pages/FeatureDeveloping.mjs +1 -1
  136. package/dist/pages/FeatureFixing.d.cts +2 -2
  137. package/dist/pages/FeatureFixing.d.mts +2 -2
  138. package/dist/pages/FeatureFixing.mjs +1 -1
  139. package/dist/pages/NotAuthorized.d.cts +2 -2
  140. package/dist/pages/NotAuthorized.d.mts +2 -2
  141. package/dist/pages/NotAuthorized.mjs +1 -1
  142. package/dist/pages/NotFound.d.cts +2 -2
  143. package/dist/pages/NotFound.d.mts +2 -2
  144. package/dist/pages/NotFound.mjs +1 -1
  145. package/dist/paragraph-0_oMnSMM.cjs +2 -0
  146. package/dist/paragraph-0_oMnSMM.cjs.map +1 -0
  147. package/dist/paragraph-BXY43iOX.mjs +2 -0
  148. package/dist/paragraph-BXY43iOX.mjs.map +1 -0
  149. package/dist/resizable-B9HHrfKn.mjs +2 -0
  150. package/dist/resizable-B9HHrfKn.mjs.map +1 -0
  151. package/dist/resizable-D8XbQdj_.cjs +2 -0
  152. package/dist/resizable-D8XbQdj_.cjs.map +1 -0
  153. package/dist/{scroll-area-4UBa5t9-.mjs → scroll-area-CiMS2UY7.mjs} +1 -1
  154. package/dist/{scroll-area-4UBa5t9-.mjs.map → scroll-area-CiMS2UY7.mjs.map} +1 -1
  155. package/dist/{scroll-area-BzXnYZNO.cjs → scroll-area-qE6GqGkn.cjs} +1 -1
  156. package/dist/{scroll-area-BzXnYZNO.cjs.map → scroll-area-qE6GqGkn.cjs.map} +1 -1
  157. package/dist/{separator-Bf0gymN4.mjs → separator-C2yOD6r_.mjs} +1 -1
  158. package/dist/{separator-Bf0gymN4.mjs.map → separator-C2yOD6r_.mjs.map} +1 -1
  159. package/dist/{separator-Be9cbVN8.d.mts → separator-CY141ab_.d.cts} +3 -3
  160. package/dist/{separator-DiP2uw3M.d.cts → separator-CbnkvGgQ.d.mts} +3 -3
  161. package/dist/{separator-jytY1CPq.cjs → separator-D3CGKwyf.cjs} +1 -1
  162. package/dist/{separator-jytY1CPq.cjs.map → separator-D3CGKwyf.cjs.map} +1 -1
  163. package/dist/{sheet-oadGRiie.mjs → sheet-DXLayspn.mjs} +1 -1
  164. package/dist/{sheet-oadGRiie.mjs.map → sheet-DXLayspn.mjs.map} +1 -1
  165. package/dist/{sheet-BTGsz390.cjs → sheet-DtWL6WcJ.cjs} +1 -1
  166. package/dist/{sheet-BTGsz390.cjs.map → sheet-DtWL6WcJ.cjs.map} +1 -1
  167. package/dist/{skeleton-6MpPv0K3.mjs → skeleton-CvZncisJ.mjs} +1 -1
  168. package/dist/{skeleton-6MpPv0K3.mjs.map → skeleton-CvZncisJ.mjs.map} +1 -1
  169. package/dist/{tabs-BIo6ZB9g.mjs → tabs-Cjh2jtUZ.mjs} +1 -1
  170. package/dist/{tabs-BIo6ZB9g.mjs.map → tabs-Cjh2jtUZ.mjs.map} +1 -1
  171. package/dist/{tabs-bXy8hbAR.cjs → tabs-DSofRReg.cjs} +1 -1
  172. package/dist/{tabs-bXy8hbAR.cjs.map → tabs-DSofRReg.cjs.map} +1 -1
  173. package/dist/{title-BaHImoIu.cjs → title-C4XNLXSe.cjs} +1 -1
  174. package/dist/{title-BaHImoIu.cjs.map → title-C4XNLXSe.cjs.map} +1 -1
  175. package/dist/{title-DcNd812E.mjs → title-CMJS7QS7.mjs} +1 -1
  176. package/dist/{title-DcNd812E.mjs.map → title-CMJS7QS7.mjs.map} +1 -1
  177. package/dist/{tooltip-DGiat0Dt.mjs → tooltip-D0XDvxqi.mjs} +1 -1
  178. package/dist/{tooltip-DGiat0Dt.mjs.map → tooltip-D0XDvxqi.mjs.map} +1 -1
  179. package/dist/{tooltip-CwJnif3V.d.mts → tooltip-DbdlL_22.d.mts} +6 -6
  180. package/dist/{tooltip-xl-O4did.d.cts → tooltip-JB8ZVcSM.d.cts} +6 -6
  181. package/dist/{tooltip-CUSQdxdt.cjs → tooltip-zYWazsY5.cjs} +1 -1
  182. package/dist/{tooltip-CUSQdxdt.cjs.map → tooltip-zYWazsY5.cjs.map} +1 -1
  183. package/dist/{types-BQMTFD_z.mjs → types-BZefxrvC.mjs} +1 -1
  184. package/dist/{types-BQMTFD_z.mjs.map → types-BZefxrvC.mjs.map} +1 -1
  185. package/dist/{types-BB_E2uE0.d.mts → types-D2kMOc_b.d.mts} +1 -1
  186. package/dist/{types-CwAGHByL.d.cts → types-D8mZhixM.d.cts} +1 -1
  187. package/dist/typography/paragraph.cjs +1 -2
  188. package/dist/typography/paragraph.d.cts +2 -2
  189. package/dist/typography/paragraph.d.mts +2 -2
  190. package/dist/typography/paragraph.mjs +1 -2
  191. package/dist/typography/title.cjs +1 -1
  192. package/dist/typography/title.d.cts +2 -2
  193. package/dist/typography/title.d.mts +2 -2
  194. package/dist/typography/title.mjs +1 -1
  195. package/dist/ui/alert-dialog.d.cts +12 -12
  196. package/dist/ui/alert-dialog.d.mts +12 -12
  197. package/dist/ui/alert-dialog.mjs +1 -1
  198. package/dist/ui/alert.d.cts +5 -5
  199. package/dist/ui/alert.d.mts +7 -7
  200. package/dist/ui/aspect-ratio.d.cts +2 -2
  201. package/dist/ui/aspect-ratio.d.mts +2 -2
  202. package/dist/ui/avatar.cjs +1 -1
  203. package/dist/ui/avatar.d.cts +4 -4
  204. package/dist/ui/avatar.d.mts +4 -4
  205. package/dist/ui/avatar.mjs +1 -1
  206. package/dist/ui/badge.d.cts +4 -4
  207. package/dist/ui/badge.d.mts +4 -4
  208. package/dist/ui/breadcrumb.d.cts +8 -8
  209. package/dist/ui/breadcrumb.d.mts +8 -8
  210. package/dist/ui/breadcrumb.mjs +1 -1
  211. package/dist/ui/button-group.cjs +1 -1
  212. package/dist/ui/button-group.d.cts +7 -7
  213. package/dist/ui/button-group.d.mts +7 -7
  214. package/dist/ui/button-group.mjs +1 -1
  215. package/dist/ui/button.d.cts +1 -1
  216. package/dist/ui/button.d.mts +1 -1
  217. package/dist/ui/button.mjs +1 -1
  218. package/dist/ui/buttons/add-new.cjs +1 -1
  219. package/dist/ui/buttons/add-new.cjs.map +1 -1
  220. package/dist/ui/buttons/add-new.mjs +1 -1
  221. package/dist/ui/buttons/add-new.mjs.map +1 -1
  222. package/dist/ui/buttons/edit.mjs +1 -1
  223. package/dist/ui/buttons/refresh.cjs +1 -1
  224. package/dist/ui/buttons/refresh.cjs.map +1 -1
  225. package/dist/ui/buttons/refresh.mjs +1 -1
  226. package/dist/ui/buttons/refresh.mjs.map +1 -1
  227. package/dist/ui/buttons/trash.mjs +1 -1
  228. package/dist/ui/buttons/upload-image.mjs +1 -1
  229. package/dist/ui/calendar.d.cts +4 -4
  230. package/dist/ui/calendar.d.mts +4 -4
  231. package/dist/ui/calendar.mjs +1 -1
  232. package/dist/ui/card.d.cts +8 -8
  233. package/dist/ui/card.d.mts +8 -8
  234. package/dist/ui/card.mjs +1 -1
  235. package/dist/ui/carousel.d.cts +7 -7
  236. package/dist/ui/carousel.d.mts +7 -7
  237. package/dist/ui/carousel.mjs +1 -1
  238. package/dist/ui/collapsible.d.cts +4 -4
  239. package/dist/ui/collapsible.d.mts +4 -4
  240. package/dist/ui/command.cjs +1 -1
  241. package/dist/ui/command.d.cts +11 -11
  242. package/dist/ui/command.d.mts +11 -11
  243. package/dist/ui/command.mjs +1 -1
  244. package/dist/ui/context-menu.d.cts +16 -16
  245. package/dist/ui/context-menu.d.mts +16 -16
  246. package/dist/ui/dialog.cjs +1 -1
  247. package/dist/ui/dialog.d.cts +1 -1
  248. package/dist/ui/dialog.d.mts +1 -1
  249. package/dist/ui/dialog.mjs +1 -1
  250. package/dist/ui/drawer.cjs +1 -1
  251. package/dist/ui/drawer.d.cts +11 -11
  252. package/dist/ui/drawer.d.mts +11 -11
  253. package/dist/ui/drawer.mjs +1 -1
  254. package/dist/ui/dropdown-menu.cjs +1 -1
  255. package/dist/ui/dropdown-menu.d.cts +16 -16
  256. package/dist/ui/dropdown-menu.d.mts +16 -16
  257. package/dist/ui/dropdown-menu.mjs +1 -1
  258. package/dist/ui/empty.d.cts +9 -9
  259. package/dist/ui/empty.d.mts +7 -7
  260. package/dist/ui/field.cjs +1 -1
  261. package/dist/ui/field.d.cts +24 -24
  262. package/dist/ui/field.d.mts +11 -11
  263. package/dist/ui/field.mjs +1 -1
  264. package/dist/ui/file-uploader.d.cts +2 -2
  265. package/dist/ui/file-uploader.d.mts +2 -2
  266. package/dist/ui/file-uploader.mjs +1 -1
  267. package/dist/ui/form.cjs +1 -1
  268. package/dist/ui/form.d.cts +11 -11
  269. package/dist/ui/form.d.mts +7 -7
  270. package/dist/ui/form.mjs +1 -1
  271. package/dist/ui/hover-card.d.cts +4 -4
  272. package/dist/ui/hover-card.d.mts +4 -4
  273. package/dist/ui/image.mjs +1 -1
  274. package/dist/ui/input-otp.d.cts +5 -5
  275. package/dist/ui/input-otp.d.mts +5 -5
  276. package/dist/ui/input.cjs +1 -1
  277. package/dist/ui/input.d.cts +1 -1
  278. package/dist/ui/input.d.mts +1 -1
  279. package/dist/ui/input.mjs +1 -1
  280. package/dist/ui/inputs/search-input.cjs +1 -1
  281. package/dist/ui/inputs/search-input.d.cts +3 -3
  282. package/dist/ui/inputs/search-input.d.mts +3 -3
  283. package/dist/ui/inputs/search-input.mjs +1 -1
  284. package/dist/ui/item.cjs +1 -1
  285. package/dist/ui/item.d.cts +17 -17
  286. package/dist/ui/item.d.mts +14 -14
  287. package/dist/ui/item.mjs +1 -1
  288. package/dist/ui/label.cjs +1 -1
  289. package/dist/ui/label.d.cts +2 -2
  290. package/dist/ui/label.d.mts +2 -2
  291. package/dist/ui/label.mjs +1 -1
  292. package/dist/ui/menubar.d.cts +17 -17
  293. package/dist/ui/menubar.d.mts +17 -17
  294. package/dist/ui/multi-select.cjs +1 -1
  295. package/dist/ui/multi-select.d.cts +2 -2
  296. package/dist/ui/multi-select.d.mts +1 -1
  297. package/dist/ui/multi-select.mjs +1 -1
  298. package/dist/ui/navigation-menu.d.cts +11 -11
  299. package/dist/ui/navigation-menu.d.mts +9 -9
  300. package/dist/ui/pagination.d.cts +9 -9
  301. package/dist/ui/pagination.d.mts +9 -9
  302. package/dist/ui/pagination.mjs +1 -1
  303. package/dist/ui/popover.d.cts +5 -5
  304. package/dist/ui/popover.d.mts +5 -5
  305. package/dist/ui/progress.d.cts +2 -2
  306. package/dist/ui/progress.d.mts +2 -2
  307. package/dist/ui/radio-group.d.cts +3 -3
  308. package/dist/ui/radio-group.d.mts +3 -3
  309. package/dist/ui/resizable.cjs +1 -2
  310. package/dist/ui/resizable.d.cts +4 -4
  311. package/dist/ui/resizable.d.mts +4 -4
  312. package/dist/ui/resizable.mjs +1 -2
  313. package/dist/ui/scroll-area.cjs +1 -1
  314. package/dist/ui/scroll-area.d.cts +6 -6
  315. package/dist/ui/scroll-area.d.mts +3 -3
  316. package/dist/ui/scroll-area.mjs +1 -1
  317. package/dist/ui/select.d.cts +11 -11
  318. package/dist/ui/select.d.mts +11 -11
  319. package/dist/ui/separator.cjs +1 -1
  320. package/dist/ui/separator.d.cts +1 -1
  321. package/dist/ui/separator.d.mts +1 -1
  322. package/dist/ui/separator.mjs +1 -1
  323. package/dist/ui/sheet.cjs +1 -1
  324. package/dist/ui/sheet.d.cts +9 -9
  325. package/dist/ui/sheet.d.mts +9 -9
  326. package/dist/ui/sheet.mjs +1 -1
  327. package/dist/ui/sidebar.cjs +1 -1
  328. package/dist/ui/sidebar.d.cts +30 -30
  329. package/dist/ui/sidebar.d.mts +30 -30
  330. package/dist/ui/sidebar.mjs +1 -1
  331. package/dist/ui/skeleton.d.cts +2 -2
  332. package/dist/ui/skeleton.d.mts +2 -2
  333. package/dist/ui/skeleton.mjs +1 -1
  334. package/dist/ui/slider.d.cts +2 -2
  335. package/dist/ui/slider.d.mts +2 -2
  336. package/dist/ui/sonner.d.cts +2 -2
  337. package/dist/ui/sonner.d.mts +2 -2
  338. package/dist/ui/spinner.d.cts +2 -2
  339. package/dist/ui/spinner.d.mts +2 -2
  340. package/dist/ui/switch.d.cts +2 -2
  341. package/dist/ui/switch.d.mts +2 -2
  342. package/dist/ui/table.d.cts +18 -18
  343. package/dist/ui/table.d.mts +9 -9
  344. package/dist/ui/tabs.cjs +1 -1
  345. package/dist/ui/tabs.d.cts +5 -5
  346. package/dist/ui/tabs.d.mts +5 -5
  347. package/dist/ui/tabs.mjs +1 -1
  348. package/dist/ui/textarea.d.cts +2 -2
  349. package/dist/ui/textarea.d.mts +2 -2
  350. package/dist/ui/toggle-group.d.mts +3 -3
  351. package/dist/ui/toggle.d.cts +4 -4
  352. package/dist/ui/toggle.d.mts +4 -4
  353. package/dist/ui/tooltip.cjs +1 -1
  354. package/dist/ui/tooltip.d.cts +1 -1
  355. package/dist/ui/tooltip.d.mts +1 -1
  356. package/dist/ui/tooltip.mjs +1 -1
  357. package/package.json +5 -1
  358. package/dist/date-BUKVV2NZ.cjs.map +0 -1
  359. package/dist/date-SmlhDFZs.mjs.map +0 -1
  360. package/dist/layouts/flex.cjs.map +0 -1
  361. package/dist/layouts/flex.mjs.map +0 -1
  362. package/dist/typography/paragraph.cjs.map +0 -1
  363. package/dist/typography/paragraph.mjs.map +0 -1
  364. package/dist/ui/resizable.cjs.map +0 -1
  365. package/dist/ui/resizable.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime41 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime27 from "react/jsx-runtime";
2
2
  import * as react0 from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import * as class_variance_authority_types0 from "class-variance-authority/types";
@@ -11,8 +11,8 @@ declare const flexVariants: (props?: ({
11
11
  margin?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
12
12
  padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
13
13
  gap?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
14
- justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
15
- align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
14
+ justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
15
+ align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
16
16
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
17
17
  type Props = {
18
18
  className?: string;
@@ -28,7 +28,7 @@ declare const Flex: react0.MemoExoticComponent<({
28
28
  align,
29
29
  className,
30
30
  children
31
- }: React.PropsWithChildren<Props>) => react_jsx_runtime41.JSX.Element>;
31
+ }: React.PropsWithChildren<Props>) => react_jsx_runtime27.JSX.Element>;
32
32
  //#endregion
33
33
  export { Flex };
34
34
  //# sourceMappingURL=flex.d.mts.map
@@ -1,2 +1 @@
1
- "use client";import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t}from"react/jsx-runtime";import{memo as n}from"react";import{cva as r}from"class-variance-authority";const i=r([`relative flex`,`text-sm`],{variants:{vertical:{true:`flex-col`,false:`flex-row`},width:{full:`w-full`,auto:`w-auto`,fit:`w-fit`,screen:`w-screen`,min:`w-min`,max:`w-max`,null:``},wrap:{true:`flex-wrap`,false:`flex-nowrap`},margin:{sm:`m-2`,md:`m-4`,lg:`m-6`,xl:`m-8`,none:`m-0`},padding:{sm:`p-2`,md:`p-4`,lg:`p-6`,xl:`p-8`,none:`p-0`},gap:{xs:`gap-1`,sm:`gap-2`,md:`gap-4`,lg:`gap-6`,xl:`gap-8`,none:`gap-0`},justify:{start:`justify-start`,center:`justify-center`,end:`justify-end`,between:`justify-between`,around:`justify-around`,evenly:`justify-evenly`,stretch:`justify-stretch`},align:{start:`items-start`,center:`items-center`,end:`items-end`,baseline:`items-baseline`,stretch:`items-stretch`}},defaultVariants:{vertical:!1,wrap:!0,width:`fit`,margin:`none`,padding:`sm`,gap:`xs`,justify:`start`,align:`center`}}),a=n(({vertical:n,wrap:r,width:a,margin:o,padding:s,gap:c,justify:l,align:u,className:d,children:f})=>t(`div`,{className:e(i({vertical:n,width:a,wrap:r,margin:o,padding:s,gap:c,justify:l,align:u,className:d})),children:f}));a.displayName=`Flex`;export{a as Flex};
2
- //# sourceMappingURL=flex.mjs.map
1
+ "use client";import{t as e}from"../flex-BGQqaHKh.mjs";export{e as Flex};
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../card-CXsIpa9Y.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const n=require(`../../button-DtFiUaY7.cjs`);require(`../../skeleton-C4suljHP.cjs`);const r=require(`../../image-C-XEJWcw.cjs`),i=require(`../../tooltip-CUSQdxdt.cjs`),a=require(`../../avatar-DzZQenXU.cjs`);require(`../../close-DKsjFTou.cjs`);const o=require(`../../dialog-DEnVUD9A.cjs`),s=require(`../../input-CvMqFdEE.cjs`),c=require(`../../separator-jytY1CPq.cjs`),l=require(`../../sheet-BTGsz390.cjs`),u=require(`../../drawer-DpT2kOKz.cjs`),d=require(`../../dropdown-menu-BuyuU6uF.cjs`),f=require(`../../tabs-bXy8hbAR.cjs`),p=require(`../../scroll-area-BzXnYZNO.cjs`);let m=require(`@customafk/react-toolkit/utils`),h=require(`react/jsx-runtime`),g=require(`lucide-react`),_=require(`react`),v=require(`class-variance-authority`),y=require(`radix-ui`),b=require(`@customafk/react-toolkit/hooks/useMobile`),x=require(`@customafk/react-toolkit/hooks/useMediaQuery`),S=require(`@react-oauth/google`),C=require(`@customafk/react-toolkit/hooks/useDebounceCallback`);const w=(0,_.createContext)(null),T=()=>{let e=(0,_.use)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({id:e,type:i,productName:a,imageUrl:o,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=T(),[p,m]=(0,_.useState)(c),[v,y]=(0,_.useState)(!1),b=(0,C.useDebounceCallback)((0,_.useCallback)(()=>{f?.(e,p,i)},[f,e,p,i]),500),x=(0,_.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),S=(0,_.useCallback)(async()=>{y(!0),await d?.(e),y(!1)},[e,d]);return(0,_.useEffect)(()=>(p!==c&&b(),()=>{b.cancel()}),[p,c,b]),(0,h.jsxs)(t.t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[v&&(0,h.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,h.jsx)(`div`,{className:`loader-dots`})}),(0,h.jsxs)(t.r,{className:`p-0`,children:[(0,h.jsxs)(n.t,{variant:`ghost`,size:`icon`,color:`muted`,disabled:v,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:S,children:[(0,h.jsx)(g.Trash2,{className:`h-4 w-4`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,h.jsxs)(`div`,{className:`flex gap-3`,children:[(0,h.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:o?(0,h.jsx)(r.t,{src:o,alt:a,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,h.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,h.jsx)(`div`,{className:`flex justify-between`,children:(0,h.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:a})}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>(0,h.jsxs)(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),(0,h.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,h.jsx)(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p-1),children:(0,h.jsx)(g.Minus,{size:12})}),(0,h.jsx)(s.t,{value:p,onChange:e=>x(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,h.jsx)(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p+1),children:(0,h.jsx)(g.Plus,{size:12})})]}),(0,h.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,h.jsxs)(`div`,{className:(0,m.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,h.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,h.jsx)(g.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,h.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,h.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,h.jsxs)(`div`,{className:(0,m.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,h.jsx)(p.t,{className:`h-full flex-1`,children:e.map(e=>(0,h.jsx)(E,{...e,type:t},e.id))}),(0,h.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,h.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(c.t,{}),(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,h.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(n.t,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&(0,h.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,_.createContext)(null),k=()=>{let e=(0,_.use)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,b.useIsMobile)(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(e),p=t??d,g=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,_.useCallback)(()=>c?u(e=>!e):g(e=>!e),[c,g]);(0,_.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,x=(0,_.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:g,openMobile:l,setOpenMobile:u}),[y,p,g,c,l,v]);return(0,h.jsx)(O.Provider,{value:x,children:(0,h.jsx)(i.r,{delayDuration:0,children:(0,h.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,m.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:u}=k();return n===`none`?(0,h.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,m.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,h.jsx)(l.t,{open:c,onOpenChange:u,children:(0,h.jsxs)(l.r,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,h.jsxs)(l.o,{className:`sr-only`,children:[(0,h.jsx)(l.s,{children:`Sidebar`}),(0,h.jsx)(l.i,{children:`Displays the mobile sidebar.`})]}),(0,h.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,h.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,h.jsx)(M,{}),(0,h.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,h.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,h.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,m.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,h.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,m.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,h.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,m.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:t,...r}){let{toggleSidebar:i}=k();return(0,h.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,m.cn)(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[(0,h.jsx)(g.MenuIcon,{className:`size-6!`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,h.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,m.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,h.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,h.jsx)(`div`,{className:(0,m.cn)(`inset-shadow-sm flex-1`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,h.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,m.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,h.jsxs)(z,{children:[(0,h.jsx)(B,{children:(0,h.jsxs)(H,{className:`border border-border`,onClick:i,children:[(0,h.jsx)(g.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,h.jsx)(B,{className:`mt-2 border-t border-t-border`,children:(0,h.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,m.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,m.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){return(0,h.jsx)(t?y.Slot.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,m.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,m.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,h.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,m.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,h.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,m.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,h.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,m.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,h.jsxs)(i.t,{children:[(0,h.jsx)(i.i,{asChild:!0,children:d}),(0,h.jsx)(i.n,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,h.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,h.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>(0,h.jsxs)(d.t,{children:[(0,h.jsx)(d.h,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,h.jsxs)(a.t,{className:`size-10`,children:[(0,h.jsx)(a.r,{}),(0,h.jsx)(a.n,{className:`size-full bg-muted-muted`,children:(0,h.jsx)(g.UserIcon,{})})]})})}),(0,h.jsxs)(d.r,{align:`end`,className:`max-w-64`,children:[(0,h.jsxs)(d.o,{className:`flex min-w-0 flex-col`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),(0,h.jsx)(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),(0,h.jsx)(d.u,{}),(0,h.jsxs)(d.a,{onClick:r,children:[(0,h.jsx)(g.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=T(),r=e.length,i=t.length,a=r+i;return(0,h.jsxs)(l.t,{children:[(0,h.jsx)(l.c,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:(0,h.jsx)(g.ShoppingCartIcon,{})})}),(0,h.jsxs)(l.r,{className:`w-[95vw] sm:max-w-md`,children:[(0,h.jsx)(l.o,{className:`flex-0 border-border-weak border-b pb-3`,children:(0,h.jsxs)(l.s,{className:`flex items-center gap-2`,children:[(0,h.jsx)(g.ShoppingBag,{size:20}),(0,h.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,h.jsxs)(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),(0,h.jsxs)(f.t,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,h.jsxs)(f.r,{className:`w-full flex-0`,children:[(0,h.jsxs)(f.i,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,h.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,h.jsxs)(f.i,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,h.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,h.jsx)(f.n,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:t,cartType:`pre_order`})}),(0,h.jsx)(f.n,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),s=(0,x.useMediaQuery)(`(min-width: 640px)`),[l,d]=(0,_.useState)(!1);return(0,h.jsxs)(`header`,{className:(0,m.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&(0,h.jsx)(M,{}),(0,h.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,h.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,h.jsxs)(n.t,{className:`w-8 sm:w-fit`,onClick:()=>d(!0),children:[(0,h.jsx)(g.LogInIcon,{}),(0,h.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G,{userName:t,userEmail:r,onLogout:a}),(0,h.jsx)(c.t,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,h.jsx)(K,{})]})]}),s&&(0,h.jsx)(o.t,{open:l,onOpenChange:d,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!s&&(0,h.jsx)(u.t,{open:l,onOpenChange:d,children:(0,h.jsxs)(u.r,{children:[(0,h.jsx)(u.o,{className:`text-left`,children:(0,h.jsx)(u.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(u.a,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,h.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=T(),i=(0,x.useMediaQuery)(`(min-width: 640px)`),[a,s]=(0,_.useState)(!1);return t?(0,h.jsx)(N,{children:(0,h.jsx)(`section`,{className:`relative size-full`,children:(0,h.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,h.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,h.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[(0,h.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:(0,h.jsx)(g.LockIcon,{className:`size-10 text-primary`})}),(0,h.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,h.jsx)(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,h.jsxs)(n.t,{size:`lg`,className:`gap-2`,onClick:()=>s(!0),children:[(0,h.jsx)(g.LogInIcon,{size:18}),(0,h.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,h.jsx)(o.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!i&&(0,h.jsx)(u.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(u.r,{children:[(0,h.jsx)(u.o,{className:`text-left`,children:(0,h.jsx)(u.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(u.a,{})]})})]})})},X=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-header`,className:(0,m.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-content`,className:(0,m.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-footer`,className:(0,m.cn)(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group`,className:(0,m.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,m.cn)(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../card-CXsIpa9Y.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const n=require(`../../button-DtFiUaY7.cjs`);require(`../../skeleton-C4suljHP.cjs`);const r=require(`../../image-C-XEJWcw.cjs`),i=require(`../../tooltip-zYWazsY5.cjs`),a=require(`../../avatar-dAu1c0bC.cjs`);require(`../../close-CXhpIVAZ.cjs`);const o=require(`../../dialog-DZ_gg6Ol.cjs`),s=require(`../../input-DhUevNkc.cjs`),c=require(`../../separator-D3CGKwyf.cjs`),l=require(`../../sheet-DtWL6WcJ.cjs`),u=require(`../../dropdown-menu-C_dw8mro.cjs`),d=require(`../../drawer-y-Yrqskp.cjs`),f=require(`../../tabs-DSofRReg.cjs`),p=require(`../../scroll-area-qE6GqGkn.cjs`);let m=require(`@customafk/react-toolkit/utils`),h=require(`react/jsx-runtime`),g=require(`lucide-react`),_=require(`react`),v=require(`class-variance-authority`),y=require(`radix-ui`),b=require(`@customafk/react-toolkit/hooks/useMobile`),x=require(`@customafk/react-toolkit/hooks/useMediaQuery`),S=require(`@react-oauth/google`),C=require(`@customafk/react-toolkit/hooks/useDebounceCallback`);const w=(0,_.createContext)(null),T=()=>{let e=(0,_.use)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({id:e,type:i,productName:a,imageUrl:o,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=T(),[p,m]=(0,_.useState)(c),[v,y]=(0,_.useState)(!1),b=(0,C.useDebounceCallback)((0,_.useCallback)(()=>{f?.(e,p,i)},[f,e,p,i]),500),x=(0,_.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),S=(0,_.useCallback)(async()=>{y(!0),await d?.(e),y(!1)},[e,d]);return(0,_.useEffect)(()=>(p!==c&&b(),()=>{b.cancel()}),[p,c,b]),(0,h.jsxs)(t.t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[v&&(0,h.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,h.jsx)(`div`,{className:`loader-dots`})}),(0,h.jsxs)(t.r,{className:`p-0`,children:[(0,h.jsxs)(n.t,{variant:`ghost`,size:`icon`,color:`muted`,disabled:v,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:S,children:[(0,h.jsx)(g.Trash2,{className:`h-4 w-4`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,h.jsxs)(`div`,{className:`flex gap-3`,children:[(0,h.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:o?(0,h.jsx)(r.t,{src:o,alt:a,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,h.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,h.jsx)(`div`,{className:`flex justify-between`,children:(0,h.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:a})}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>(0,h.jsxs)(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),(0,h.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,h.jsx)(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p-1),children:(0,h.jsx)(g.Minus,{size:12})}),(0,h.jsx)(s.t,{value:p,onChange:e=>x(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,h.jsx)(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p+1),children:(0,h.jsx)(g.Plus,{size:12})})]}),(0,h.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,h.jsxs)(`div`,{className:(0,m.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,h.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,h.jsx)(g.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,h.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,h.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,h.jsxs)(`div`,{className:(0,m.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,h.jsx)(p.t,{className:`h-full flex-1`,children:e.map(e=>(0,h.jsx)(E,{...e,type:t},e.id))}),(0,h.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,h.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(c.t,{}),(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,h.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(n.t,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&(0,h.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,_.createContext)(null),k=()=>{let e=(0,_.use)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,b.useIsMobile)(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(e),p=t??d,g=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,_.useCallback)(()=>c?u(e=>!e):g(e=>!e),[c,g]);(0,_.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,x=(0,_.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:g,openMobile:l,setOpenMobile:u}),[y,p,g,c,l,v]);return(0,h.jsx)(O.Provider,{value:x,children:(0,h.jsx)(i.r,{delayDuration:0,children:(0,h.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,m.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:u}=k();return n===`none`?(0,h.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,m.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,h.jsx)(l.t,{open:c,onOpenChange:u,children:(0,h.jsxs)(l.r,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,h.jsxs)(l.o,{className:`sr-only`,children:[(0,h.jsx)(l.s,{children:`Sidebar`}),(0,h.jsx)(l.i,{children:`Displays the mobile sidebar.`})]}),(0,h.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,h.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,h.jsx)(M,{}),(0,h.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,h.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,h.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,m.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,h.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,m.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,h.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,m.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:t,...r}){let{toggleSidebar:i}=k();return(0,h.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,m.cn)(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[(0,h.jsx)(g.MenuIcon,{className:`size-6!`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,h.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,m.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,h.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,h.jsx)(`div`,{className:(0,m.cn)(`inset-shadow-sm flex-1`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,h.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,m.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,h.jsxs)(z,{children:[(0,h.jsx)(B,{children:(0,h.jsxs)(H,{className:`border border-border`,onClick:i,children:[(0,h.jsx)(g.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,h.jsx)(B,{className:`mt-2 border-t border-t-border`,children:(0,h.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,m.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,m.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){return(0,h.jsx)(t?y.Slot.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,m.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,m.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,h.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,m.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,h.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,m.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,h.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,m.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,h.jsxs)(i.t,{children:[(0,h.jsx)(i.i,{asChild:!0,children:d}),(0,h.jsx)(i.n,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,h.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,h.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>(0,h.jsxs)(u.t,{children:[(0,h.jsx)(u.h,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,h.jsxs)(a.t,{className:`size-10`,children:[(0,h.jsx)(a.r,{}),(0,h.jsx)(a.n,{className:`size-full bg-muted-muted`,children:(0,h.jsx)(g.UserIcon,{})})]})})}),(0,h.jsxs)(u.r,{align:`end`,className:`max-w-64`,children:[(0,h.jsxs)(u.o,{className:`flex min-w-0 flex-col`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),(0,h.jsx)(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),(0,h.jsx)(u.u,{}),(0,h.jsxs)(u.a,{onClick:r,children:[(0,h.jsx)(g.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=T(),r=e.length,i=t.length,a=r+i;return(0,h.jsxs)(l.t,{children:[(0,h.jsx)(l.c,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:(0,h.jsx)(g.ShoppingCartIcon,{})})}),(0,h.jsxs)(l.r,{className:`w-[95vw] sm:max-w-md`,children:[(0,h.jsx)(l.o,{className:`flex-0 border-border-weak border-b pb-3`,children:(0,h.jsxs)(l.s,{className:`flex items-center gap-2`,children:[(0,h.jsx)(g.ShoppingBag,{size:20}),(0,h.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,h.jsxs)(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),(0,h.jsxs)(f.t,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,h.jsxs)(f.r,{className:`w-full flex-0`,children:[(0,h.jsxs)(f.i,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,h.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,h.jsxs)(f.i,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,h.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,h.jsx)(f.n,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:t,cartType:`pre_order`})}),(0,h.jsx)(f.n,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),s=(0,x.useMediaQuery)(`(min-width: 640px)`),[l,u]=(0,_.useState)(!1);return(0,h.jsxs)(`header`,{className:(0,m.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&(0,h.jsx)(M,{}),(0,h.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,h.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,h.jsxs)(n.t,{className:`w-8 sm:w-fit`,onClick:()=>u(!0),children:[(0,h.jsx)(g.LogInIcon,{}),(0,h.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G,{userName:t,userEmail:r,onLogout:a}),(0,h.jsx)(c.t,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,h.jsx)(K,{})]})]}),s&&(0,h.jsx)(o.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!s&&(0,h.jsx)(d.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(d.a,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,h.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=T(),i=(0,x.useMediaQuery)(`(min-width: 640px)`),[a,s]=(0,_.useState)(!1);return t?(0,h.jsx)(N,{children:(0,h.jsx)(`section`,{className:`relative size-full`,children:(0,h.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,h.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,h.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[(0,h.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:(0,h.jsx)(g.LockIcon,{className:`size-10 text-primary`})}),(0,h.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,h.jsx)(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,h.jsxs)(n.t,{size:`lg`,className:`gap-2`,onClick:()=>s(!0),children:[(0,h.jsx)(g.LogInIcon,{size:18}),(0,h.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,h.jsx)(o.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!i&&(0,h.jsx)(d.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(d.a,{})]})})]})})},X=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-header`,className:(0,m.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-content`,className:(0,m.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-footer`,className:(0,m.cn)(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group`,className:(0,m.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,m.cn)(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
- import { n as TooltipContent } from "../../tooltip-xl-O4did.cjs";
2
- import * as react_jsx_runtime292 from "react/jsx-runtime";
3
- import * as class_variance_authority_types14 from "class-variance-authority/types";
1
+ import { n as TooltipContent } from "../../tooltip-JB8ZVcSM.cjs";
2
+ import * as react_jsx_runtime315 from "react/jsx-runtime";
3
+ import * as class_variance_authority_types15 from "class-variance-authority/types";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import { CredentialResponse } from "@react-oauth/google";
6
6
 
@@ -43,43 +43,43 @@ declare function ServiceLayoutSidebar$1({
43
43
  side?: 'left' | 'right';
44
44
  variant?: 'sidebar' | 'floating' | 'inset';
45
45
  collapsible?: 'offcanvas' | 'icon' | 'none';
46
- }): react_jsx_runtime292.JSX.Element;
46
+ }): react_jsx_runtime315.JSX.Element;
47
47
  declare function ServiceLayoutSidebarFooter({
48
48
  className,
49
49
  children,
50
50
  ...props
51
- }: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
51
+ }: React.ComponentProps<'div'>): react_jsx_runtime315.JSX.Element;
52
52
  declare function ServiceLayoutSidebarContent({
53
53
  className,
54
54
  ...props
55
- }: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
55
+ }: React.ComponentProps<'div'>): react_jsx_runtime315.JSX.Element;
56
56
  declare function ServiceLayoutSidebarGroup({
57
57
  className,
58
58
  ...props
59
- }: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
59
+ }: React.ComponentProps<'div'>): react_jsx_runtime315.JSX.Element;
60
60
  declare function ServiceLayoutSidebarGroupLabel({
61
61
  className,
62
62
  asChild,
63
63
  ...props
64
64
  }: React.ComponentProps<'div'> & {
65
65
  asChild?: boolean;
66
- }): react_jsx_runtime292.JSX.Element;
66
+ }): react_jsx_runtime315.JSX.Element;
67
67
  declare function ServiceLayoutSidebarGroupContent({
68
68
  className,
69
69
  ...props
70
- }: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
70
+ }: React.ComponentProps<'div'>): react_jsx_runtime315.JSX.Element;
71
71
  declare function ServiceLayoutSidebarMenu({
72
72
  className,
73
73
  ...props
74
- }: React.ComponentProps<'ul'>): react_jsx_runtime292.JSX.Element;
74
+ }: React.ComponentProps<'ul'>): react_jsx_runtime315.JSX.Element;
75
75
  declare function ServiceLayoutSidebarMenuItem({
76
76
  className,
77
77
  ...props
78
- }: React.ComponentProps<'li'>): react_jsx_runtime292.JSX.Element;
78
+ }: React.ComponentProps<'li'>): react_jsx_runtime315.JSX.Element;
79
79
  declare const sidebarMenuButtonVariants: (props?: ({
80
80
  variant?: "default" | "outline" | null | undefined;
81
81
  size?: "sm" | "lg" | "default" | null | undefined;
82
- } & class_variance_authority_types14.ClassProp) | undefined) => string;
82
+ } & class_variance_authority_types15.ClassProp) | undefined) => string;
83
83
  declare function ServiceLayoutSidebarMenuButton({
84
84
  asChild,
85
85
  isActive,
@@ -92,7 +92,7 @@ declare function ServiceLayoutSidebarMenuButton({
92
92
  asChild?: boolean;
93
93
  isActive?: boolean;
94
94
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
95
- } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime292.JSX.Element;
95
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime315.JSX.Element;
96
96
  //#endregion
97
97
  //#region packages/components/layouts/service-layout/service-layout.d.ts
98
98
  declare const ServiceLayoutProvider: React.FC<React.PropsWithChildren<ServiceLayoutContextProps>>;
@@ -1,6 +1,6 @@
1
- import "../../button-vNDXA78a.mjs";
2
- import "../../separator-Be9cbVN8.mjs";
3
- import { n as TooltipContent } from "../../tooltip-CwJnif3V.mjs";
1
+ import "../../button-Dv8PU7Hv.mjs";
2
+ import "../../separator-CbnkvGgQ.mjs";
3
+ import { n as TooltipContent } from "../../tooltip-DbdlL_22.mjs";
4
4
  import * as react_jsx_runtime314 from "react/jsx-runtime";
5
5
  import "react";
6
6
  import { VariantProps } from "class-variance-authority";
@@ -1,2 +1,2 @@
1
- import{r as e,t}from"../../card-C8fcblBB.mjs";import"../../button.variants-CgCCe7qb.mjs";import{t as n}from"../../button-JJaTl28Z.mjs";import"../../skeleton-6MpPv0K3.mjs";import{t as r}from"../../image-xsA4ZQ-u.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-DGiat0Dt.mjs";import{n as c,r as l,t as u}from"../../avatar-BNU7KL48.mjs";import"../../close-B_PnUzNN.mjs";import{a as d,l as f,o as p,r as m,t as h}from"../../dialog-4ZJcWPar.mjs";import{t as g}from"../../input-CYFvmWQU.mjs";import{t as _}from"../../separator-Bf0gymN4.mjs";import{c as v,i as y,o as b,r as x,s as S,t as C}from"../../sheet-oadGRiie.mjs";import{a as w,l as T,o as E,r as D,t as O}from"../../drawer-B2QxYWMi.mjs";import{a as ee,h as te,o as ne,r as re,t as ie,u as ae}from"../../dropdown-menu-BwcDzb4B.mjs";import{i as k,n as A,r as oe,t as se}from"../../tabs-BIo6ZB9g.mjs";import{t as ce}from"../../scroll-area-4UBa5t9-.mjs";import{cn as j}from"@customafk/react-toolkit/utils";import{Fragment as le,jsx as M,jsxs as N}from"react/jsx-runtime";import{LockIcon as ue,LogInIcon as P,LogOutIcon as F,MenuIcon as de,Minus as fe,Plus as pe,ShoppingBag as me,ShoppingBasketIcon as he,ShoppingCartIcon as I,Trash2 as ge,UserIcon as _e}from"lucide-react";import{createContext as L,use as R,useCallback as z,useEffect as B,useMemo as ve,useState as V}from"react";import{cva as ye}from"class-variance-authority";import{Slot as H}from"radix-ui";import{useIsMobile as be}from"@customafk/react-toolkit/hooks/useMobile";import{useMediaQuery as U}from"@customafk/react-toolkit/hooks/useMediaQuery";import{GoogleLogin as W}from"@react-oauth/google";import{useDebounceCallback as xe}from"@customafk/react-toolkit/hooks/useDebounceCallback";const G=L(null),K=()=>{let e=R(G);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},Se=({id:i,type:a,productName:o,imageUrl:s,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=K(),[p,m]=V(c),[h,_]=V(!1),v=xe(z(()=>{f?.(i,p,a)},[f,i,p,a]),500),y=z(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),b=z(async()=>{_(!0),await d?.(i),_(!1)},[i,d]);return B(()=>(p!==c&&v(),()=>{v.cancel()}),[p,c,v]),N(t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[h&&M(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:M(`div`,{className:`loader-dots`})}),N(e,{className:`p-0`,children:[N(n,{variant:`ghost`,size:`icon`,color:`muted`,disabled:h,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:b,children:[M(ge,{className:`h-4 w-4`}),M(`span`,{className:`sr-only`,children:`Remove item`})]}),N(`div`,{className:`flex gap-3`,children:[M(`div`,{className:`relative size-20 flex-shrink-0`,children:s?M(r,{src:s,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):M(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),N(`div`,{className:`flex flex-1 flex-col`,children:[M(`div`,{className:`flex justify-between`,children:M(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),M(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>N(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),N(`div`,{className:`mt-auto flex items-center justify-between`,children:[N(`div`,{className:`flex items-center space-x-1`,children:[M(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p-1),children:M(fe,{size:12})}),M(g,{value:p,onChange:e=>y(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),M(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p+1),children:M(pe,{size:12})})]}),N(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},q=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?N(`div`,{className:j(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[M(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:M(he,{size:42,strokeWidth:1})}),N(`div`,{className:`flex flex-col space-y-1`,children:[M(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),M(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):N(`div`,{className:j(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[M(ce,{className:`h-full flex-1`,children:e.map(e=>M(Se,{...e,type:t},e.id))}),N(`div`,{className:`flex-0 space-y-3`,children:[N(`div`,{className:`flex justify-between`,children:[M(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),N(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),M(_,{}),N(`div`,{className:`flex justify-between`,children:[M(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),N(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),M(n,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&M(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},J=L(null),Y=()=>{let e=R(J);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e};function Ce({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=be(),[l,u]=V(!1),[d,f]=V(e),p=t??d,m=z(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),h=z(()=>c?u(e=>!e):m(e=>!e),[c,m]);B(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=ve(()=>({state:g,isMobile:c,toggleSidebar:h,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[g,p,m,c,l,h]);return M(J.Provider,{value:_,children:M(o,{delayDuration:0,children:M(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...i},className:j(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:a})})})}function we({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=Y();return n===`none`?M(`aside`,{"data-slot":`sidebar`,className:j(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?M(C,{open:c,onOpenChange:l,children:N(x,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[N(b,{className:`sr-only`,children:[M(S,{children:`Sidebar`}),M(y,{children:`Displays the mobile sidebar.`})]}),N(`div`,{className:`flex size-full flex-col`,children:[N(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[M(X,{}),M(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:M(I,{size:20})}),N(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[M(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),M(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),M(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):N(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[M(`div`,{"data-slot":`sidebar-gap`,className:j(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),M(`div`,{"data-slot":`sidebar-container`,className:j(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:M(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:j(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function X({className:e,onClick:t,...r}){let{toggleSidebar:i}=Y();return N(n,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:j(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[M(de,{className:`size-6!`}),M(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Te({className:e,children:t,...n}){return N(`main`,{"data-slot":`sidebar-inset`,className:j(`relative flex w-full flex-1 flex-col`,e),...n,children:[M(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),M(`div`,{className:j(`inset-shadow-sm flex-1`),children:t})]})}function Ee({className:e,children:t,...n}){let{open:r}=Y(),{onLogout:i}=K();return N(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:j(`flex flex-col gap-2`,e),...n,children:[t,N(Z,{children:[M(Q,{children:N(Me,{className:`border border-border`,onClick:i,children:[M(F,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&M(Q,{className:`mt-2 border-t border-t-border`,children:M(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function De({className:e,...t}){return M(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:j(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Oe({className:e,...t}){return M(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:j(`relative flex w-full min-w-0 flex-col`,e),...t})}function ke({className:e,asChild:t=!1,...n}){return M(t?H.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:j(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function Ae({className:e,...t}){return M(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:j(`w-full text-sm`,e),...t})}function Z({className:e,...t}){return M(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:j(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Q({className:e,...t}){return M(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:j(`group/menu-item relative`,e),...t})}const je=ye(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Me({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:o,className:c,...l}){let u=e?H.Slot:`button`,{isMobile:d,state:f}=Y(),p=M(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:j(je({variant:n,size:r}),c),...l});return o?(typeof o==`string`&&(o={children:o}),N(s,{children:[M(i,{asChild:!0,children:p}),M(a,{side:`right`,align:`center`,hidden:f!==`collapsed`||d,...o})]})):p}const Ne=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>M(G.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),Pe=({children:e})=>M(Ce,{children:e}),Fe=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>N(ie,{children:[M(te,{asChild:!0,children:M(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:N(u,{className:`size-10`,children:[M(l,{}),M(c,{className:`size-full bg-muted-muted`,children:M(_e,{})})]})})}),N(re,{align:`end`,className:`max-w-64`,children:[N(ne,{className:`flex min-w-0 flex-col`,children:[M(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),M(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),M(ae,{}),N(ee,{onClick:r,children:[M(F,{size:16,"aria-hidden":`true`}),M(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),$=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=K(),r=e.length,i=t.length,a=r+i;return N(C,{children:[M(v,{asChild:!0,children:M(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:M(I,{})})}),N(x,{className:`w-[95vw] sm:max-w-md`,children:[M(b,{className:`flex-0 border-border-weak border-b pb-3`,children:N(S,{className:`flex items-center gap-2`,children:[M(me,{size:20}),M(`span`,{children:`Giỏ hàng của bạn`}),a>0&&N(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),N(se,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[N(oe,{className:`w-full flex-0`,children:[N(k,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&N(`span`,{children:[`(`,r,`)`]})]}),N(k,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&N(`span`,{children:[`(`,i,`)`]})]})]}),M(A,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:M(q,{items:t,cartType:`pre_order`})}),M(A,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:M(q,{items:e,cartType:`in_stock`})})]})]})]})},Ie=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=K(),o=U(`(min-width: 640px)`),[s,c]=V(!1);return N(`header`,{className:j(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&M(X,{}),N(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[M(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:M(I,{size:20})}),N(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[M(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),M(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),N(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&N(n,{className:`w-8 sm:w-fit`,onClick:()=>c(!0),children:[M(P,{}),M(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&N(le,{children:[M(Fe,{userName:t,userEmail:r,onLogout:a}),M(_,{orientation:`vertical`,className:`min-h-6 w-px`}),M($,{})]})]}),o&&M(h,{open:s,onOpenChange:c,children:N(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[M(p,{className:`flex-0 gap-2 p-6`,children:M(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),M(`div`,{className:`flex flex-1 flex-col`,children:M(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:N(`div`,{className:`flex flex-col items-center gap-y-1`,children:[M(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),M(W,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),M(d,{className:`p-2`})]})}),!o&&M(O,{open:s,onOpenChange:c,children:N(D,{children:[M(E,{className:`text-left`,children:M(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),M(`div`,{className:`flex flex-1 flex-col`,children:M(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:N(`div`,{className:`flex flex-col items-center gap-y-1`,children:[M(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),M(W,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),M(w,{})]})})]})},Le=({children:e,...t})=>{let{isLoggedIn:n}=K();return n?M(we,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Re=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=K(),i=U(`(min-width: 640px)`),[a,o]=V(!1);return t?M(Te,{children:M(`section`,{className:`relative size-full`,children:M(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):M(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:N(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[M(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:M(ue,{className:`size-10 text-primary`})}),N(`div`,{className:`flex max-w-md flex-col gap-2`,children:[M(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),M(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),N(n,{size:`lg`,className:`gap-2`,onClick:()=>o(!0),children:[M(P,{size:18}),M(`span`,{children:`Đăng nhập ngay`})]}),i&&M(h,{open:a,onOpenChange:o,children:N(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[M(p,{className:`flex-0 gap-2 p-6`,children:M(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),M(`div`,{className:`flex flex-1 flex-col`,children:M(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:N(`div`,{className:`flex flex-col items-center gap-y-1`,children:[M(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),M(W,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),M(d,{className:`p-2`})]})}),!i&&M(O,{open:a,onOpenChange:o,children:N(D,{children:[M(E,{className:`text-left`,children:M(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),M(`div`,{className:`flex flex-1 flex-col`,children:M(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:N(`div`,{className:`flex flex-col items-center gap-y-1`,children:[M(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),M(W,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),M(w,{})]})})]})})},ze=({className:e,children:t})=>M(`div`,{"data-slot":`main-header`,className:j(`flex-0 snap-start`,e),children:t}),Be=({className:e,children:t})=>M(`div`,{"data-slot":`main-content`,className:j(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Ve=({className:e,children:t})=>M(`div`,{"data-slot":`main-footer`,className:j(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),He=({children:e,className:t})=>M(`div`,{"data-slot":`main-group`,className:j(`flex size-full flex-col gap-4`,t),children:e}),Ue=({className:e,children:t})=>M(`div`,{"data-slot":`main-group-content`,className:j(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});export{$ as ServiceLayoutCartInfo,Ie as ServiceLayoutHeader,Re as ServiceLayoutMain,Be as ServiceLayoutMainContent,Ve as ServiceLayoutMainFooter,He as ServiceLayoutMainGroup,Ue as ServiceLayoutMainGroupContent,ze as ServiceLayoutMainHeader,Ne as ServiceLayoutProvider,Le as ServiceLayoutSidebar,De as ServiceLayoutSidebarContent,Ee as ServiceLayoutSidebarFooter,Oe as ServiceLayoutSidebarGroup,Ae as ServiceLayoutSidebarGroupContent,ke as ServiceLayoutSidebarGroupLabel,Z as ServiceLayoutSidebarMenu,Me as ServiceLayoutSidebarMenuButton,Q as ServiceLayoutSidebarMenuItem,Fe as ServiceLayoutUserInfo,Pe as ServiceLayoutWrapper};
1
+ import{r as e,t}from"../../card-jwcpmq7e.mjs";import"../../button.variants-DmUzMbB8.mjs";import{t as n}from"../../button-DIEXNBpi.mjs";import"../../skeleton-CvZncisJ.mjs";import{t as r}from"../../image-BwbAQRxx.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-D0XDvxqi.mjs";import{n as c,r as l,t as u}from"../../avatar-BaxX-xI9.mjs";import"../../close-CGei_VQ6.mjs";import{a as d,l as f,o as p,r as m,t as h}from"../../dialog-DeZVOOmh.mjs";import{t as g}from"../../input-CC10BdKh.mjs";import{t as _}from"../../separator-C2yOD6r_.mjs";import{c as v,i as y,o as b,r as x,s as S,t as C}from"../../sheet-DXLayspn.mjs";import{a as ee,h as te,o as ne,r as re,t as ie,u as ae}from"../../dropdown-menu-CtU6oBI4.mjs";import{a as w,l as T,o as oe,r as E,t as D}from"../../drawer-272Fecsq.mjs";import{i as O,n as k,r as se,t as ce}from"../../tabs-Cjh2jtUZ.mjs";import{t as le}from"../../scroll-area-CiMS2UY7.mjs";import{cn as A}from"@customafk/react-toolkit/utils";import{Fragment as ue,jsx as j,jsxs as M}from"react/jsx-runtime";import{LockIcon as de,LogInIcon as N,LogOutIcon as P,MenuIcon as fe,Minus as pe,Plus as me,ShoppingBag as he,ShoppingBasketIcon as ge,ShoppingCartIcon as F,Trash2 as _e,UserIcon as ve}from"lucide-react";import{createContext as I,use as L,useCallback as R,useEffect as z,useMemo as ye,useState as B}from"react";import{cva as be}from"class-variance-authority";import{Slot as V}from"radix-ui";import{useIsMobile as xe}from"@customafk/react-toolkit/hooks/useMobile";import{useMediaQuery as H}from"@customafk/react-toolkit/hooks/useMediaQuery";import{GoogleLogin as U}from"@react-oauth/google";import{useDebounceCallback as Se}from"@customafk/react-toolkit/hooks/useDebounceCallback";const W=I(null),G=()=>{let e=L(W);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},Ce=({id:i,type:a,productName:o,imageUrl:s,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=G(),[p,m]=B(c),[h,_]=B(!1),v=Se(R(()=>{f?.(i,p,a)},[f,i,p,a]),500),y=R(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),b=R(async()=>{_(!0),await d?.(i),_(!1)},[i,d]);return z(()=>(p!==c&&v(),()=>{v.cancel()}),[p,c,v]),M(t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[h&&j(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:j(`div`,{className:`loader-dots`})}),M(e,{className:`p-0`,children:[M(n,{variant:`ghost`,size:`icon`,color:`muted`,disabled:h,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:b,children:[j(_e,{className:`h-4 w-4`}),j(`span`,{className:`sr-only`,children:`Remove item`})]}),M(`div`,{className:`flex gap-3`,children:[j(`div`,{className:`relative size-20 flex-shrink-0`,children:s?j(r,{src:s,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):j(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),M(`div`,{className:`flex flex-1 flex-col`,children:[j(`div`,{className:`flex justify-between`,children:j(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),j(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>M(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),M(`div`,{className:`mt-auto flex items-center justify-between`,children:[M(`div`,{className:`flex items-center space-x-1`,children:[j(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p-1),children:j(pe,{size:12})}),j(g,{value:p,onChange:e=>y(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),j(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p+1),children:j(me,{size:12})})]}),M(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},K=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?M(`div`,{className:A(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[j(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:j(ge,{size:42,strokeWidth:1})}),M(`div`,{className:`flex flex-col space-y-1`,children:[j(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),j(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):M(`div`,{className:A(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[j(le,{className:`h-full flex-1`,children:e.map(e=>j(Ce,{...e,type:t},e.id))}),M(`div`,{className:`flex-0 space-y-3`,children:[M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),M(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),j(_,{}),M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),M(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),j(n,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&j(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},q=I(null),J=()=>{let e=L(q);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e};function we({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=xe(),[l,u]=B(!1),[d,f]=B(e),p=t??d,m=R(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),h=R(()=>c?u(e=>!e):m(e=>!e),[c,m]);z(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=ye(()=>({state:g,isMobile:c,toggleSidebar:h,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[g,p,m,c,l,h]);return j(q.Provider,{value:_,children:j(o,{delayDuration:0,children:j(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...i},className:A(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:a})})})}function Te({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=J();return n===`none`?j(`aside`,{"data-slot":`sidebar`,className:A(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?j(C,{open:c,onOpenChange:l,children:M(x,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[M(b,{className:`sr-only`,children:[j(S,{children:`Sidebar`}),j(y,{children:`Displays the mobile sidebar.`})]}),M(`div`,{className:`flex size-full flex-col`,children:[M(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[j(Y,{}),j(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),j(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):M(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[j(`div`,{"data-slot":`sidebar-gap`,className:A(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),j(`div`,{"data-slot":`sidebar-container`,className:A(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:j(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:A(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function Y({className:e,onClick:t,...r}){let{toggleSidebar:i}=J();return M(n,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:A(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[j(fe,{className:`size-6!`}),j(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ee({className:e,children:t,...n}){return M(`main`,{"data-slot":`sidebar-inset`,className:A(`relative flex w-full flex-1 flex-col`,e),...n,children:[j(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),j(`div`,{className:A(`inset-shadow-sm flex-1`),children:t})]})}function De({className:e,children:t,...n}){let{open:r}=J(),{onLogout:i}=G();return M(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:A(`flex flex-col gap-2`,e),...n,children:[t,M(X,{children:[j(Z,{children:M(Q,{className:`border border-border`,onClick:i,children:[j(P,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&j(Z,{className:`mt-2 border-t border-t-border`,children:j(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function Oe({className:e,...t}){return j(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:A(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function ke({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:A(`relative flex w-full min-w-0 flex-col`,e),...t})}function Ae({className:e,asChild:t=!1,...n}){return j(t?V.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:A(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function je({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:A(`w-full text-sm`,e),...t})}function X({className:e,...t}){return j(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:A(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Z({className:e,...t}){return j(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:A(`group/menu-item relative`,e),...t})}const Me=be(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Q({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:o,className:c,...l}){let u=e?V.Slot:`button`,{isMobile:d,state:f}=J(),p=j(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:A(Me({variant:n,size:r}),c),...l});return o?(typeof o==`string`&&(o={children:o}),M(s,{children:[j(i,{asChild:!0,children:p}),j(a,{side:`right`,align:`center`,hidden:f!==`collapsed`||d,...o})]})):p}const Ne=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>j(W.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),Pe=({children:e})=>j(we,{children:e}),$=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>M(ie,{children:[j(te,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:M(u,{className:`size-10`,children:[j(l,{}),j(c,{className:`size-full bg-muted-muted`,children:j(ve,{})})]})})}),M(re,{align:`end`,className:`max-w-64`,children:[M(ne,{className:`flex min-w-0 flex-col`,children:[j(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),j(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),j(ae,{}),M(ee,{onClick:r,children:[j(P,{size:16,"aria-hidden":`true`}),j(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),Fe=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=G(),r=e.length,i=t.length,a=r+i;return M(C,{children:[j(v,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:j(F,{})})}),M(x,{className:`w-[95vw] sm:max-w-md`,children:[j(b,{className:`flex-0 border-border-weak border-b pb-3`,children:M(S,{className:`flex items-center gap-2`,children:[j(he,{size:20}),j(`span`,{children:`Giỏ hàng của bạn`}),a>0&&M(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),M(ce,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[M(se,{className:`w-full flex-0`,children:[M(O,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&M(`span`,{children:[`(`,r,`)`]})]}),M(O,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&M(`span`,{children:[`(`,i,`)`]})]})]}),j(k,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:j(K,{items:t,cartType:`pre_order`})}),j(k,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:j(K,{items:e,cartType:`in_stock`})})]})]})]})},Ie=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=G(),o=H(`(min-width: 640px)`),[s,c]=B(!1);return M(`header`,{className:A(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&j(Y,{}),M(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[j(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),M(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&M(n,{className:`w-8 sm:w-fit`,onClick:()=>c(!0),children:[j(N,{}),j(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&M(ue,{children:[j($,{userName:t,userEmail:r,onLogout:a}),j(_,{orientation:`vertical`,className:`min-h-6 w-px`}),j(Fe,{})]})]}),o&&j(h,{open:s,onOpenChange:c,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(d,{className:`p-2`})]})}),!o&&j(D,{open:s,onOpenChange:c,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(w,{})]})})]})},Le=({children:e,...t})=>{let{isLoggedIn:n}=G();return n?j(Te,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Re=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=G(),i=H(`(min-width: 640px)`),[a,o]=B(!1);return t?j(Ee,{children:j(`section`,{className:`relative size-full`,children:j(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):j(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:M(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[j(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:j(de,{className:`size-10 text-primary`})}),M(`div`,{className:`flex max-w-md flex-col gap-2`,children:[j(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),j(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),M(n,{size:`lg`,className:`gap-2`,onClick:()=>o(!0),children:[j(N,{size:18}),j(`span`,{children:`Đăng nhập ngay`})]}),i&&j(h,{open:a,onOpenChange:o,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(d,{className:`p-2`})]})}),!i&&j(D,{open:a,onOpenChange:o,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(w,{})]})})]})})},ze=({className:e,children:t})=>j(`div`,{"data-slot":`main-header`,className:A(`flex-0 snap-start`,e),children:t}),Be=({className:e,children:t})=>j(`div`,{"data-slot":`main-content`,className:A(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Ve=({className:e,children:t})=>j(`div`,{"data-slot":`main-footer`,className:A(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),He=({children:e,className:t})=>j(`div`,{"data-slot":`main-group`,className:A(`flex size-full flex-col gap-4`,t),children:e}),Ue=({className:e,children:t})=>j(`div`,{"data-slot":`main-group-content`,className:A(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});export{Fe as ServiceLayoutCartInfo,Ie as ServiceLayoutHeader,Re as ServiceLayoutMain,Be as ServiceLayoutMainContent,Ve as ServiceLayoutMainFooter,He as ServiceLayoutMainGroup,Ue as ServiceLayoutMainGroupContent,ze as ServiceLayoutMainHeader,Ne as ServiceLayoutProvider,Le as ServiceLayoutSidebar,Oe as ServiceLayoutSidebarContent,De as ServiceLayoutSidebarFooter,ke as ServiceLayoutSidebarGroup,je as ServiceLayoutSidebarGroupContent,Ae as ServiceLayoutSidebarGroupLabel,X as ServiceLayoutSidebarMenu,Q as ServiceLayoutSidebarMenuButton,Z as ServiceLayoutSidebarMenuItem,$ as ServiceLayoutUserInfo,Pe as ServiceLayoutWrapper};
2
2
  //# sourceMappingURL=index.mjs.map