analytica-frontend-lib 1.2.25 → 1.2.29

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 (355) hide show
  1. package/dist/Accordation/index.d.ts +4 -5
  2. package/dist/Accordation/index.d.ts.map +1 -0
  3. package/dist/ActivityDetails/index.css +19293 -0
  4. package/dist/ActivityDetails/index.css.map +1 -0
  5. package/dist/ActivityDetails/index.d.ts +31 -0
  6. package/dist/ActivityDetails/index.d.ts.map +1 -0
  7. package/dist/ActivityDetails/index.js +7389 -0
  8. package/dist/ActivityDetails/index.js.map +1 -0
  9. package/dist/ActivityDetails/index.mjs +7438 -0
  10. package/dist/ActivityDetails/index.mjs.map +1 -0
  11. package/dist/ActivityFilters/index.css +112 -0
  12. package/dist/ActivityFilters/index.css.map +1 -1
  13. package/dist/ActivityFilters/index.d.ts +44 -5
  14. package/dist/ActivityFilters/index.d.ts.map +1 -0
  15. package/dist/ActivityFilters/index.js +67 -33
  16. package/dist/ActivityFilters/index.js.map +1 -1
  17. package/dist/ActivityFilters/index.mjs +89 -55
  18. package/dist/ActivityFilters/index.mjs.map +1 -1
  19. package/dist/Alert/index.d.ts +3 -5
  20. package/dist/Alert/index.d.ts.map +1 -0
  21. package/dist/AlertDialog/index.d.ts +2 -4
  22. package/dist/AlertDialog/index.d.ts.map +1 -0
  23. package/dist/AlertManager/index.css +112 -0
  24. package/dist/AlertManager/index.css.map +1 -1
  25. package/dist/AlertManager/index.d.ts +4 -8
  26. package/dist/AlertManager/index.d.ts.map +1 -0
  27. package/dist/AlertManager/index.js +56 -22
  28. package/dist/AlertManager/index.js.map +1 -1
  29. package/dist/AlertManager/index.mjs +78 -44
  30. package/dist/AlertManager/index.mjs.map +1 -1
  31. package/dist/AlertManagerView/index.d.ts +6 -10
  32. package/dist/AlertManagerView/index.d.ts.map +1 -0
  33. package/dist/Alternative/index.d.ts +6 -9
  34. package/dist/Alternative/index.d.ts.map +1 -0
  35. package/dist/Auth/AuthProvider/index.d.ts +324 -3
  36. package/dist/Auth/AuthProvider/index.d.ts.map +1 -0
  37. package/dist/Auth/ProtectedRoute/index.d.ts +324 -3
  38. package/dist/Auth/ProtectedRoute/index.d.ts.map +1 -0
  39. package/dist/Auth/PublicRoute/index.d.ts +324 -3
  40. package/dist/Auth/PublicRoute/index.d.ts.map +1 -0
  41. package/dist/Auth/getRootDomain/index.d.ts +324 -3
  42. package/dist/Auth/getRootDomain/index.d.ts.map +1 -0
  43. package/dist/Auth/index.d.ts +24 -26
  44. package/dist/Auth/index.d.ts.map +1 -0
  45. package/dist/Auth/useApiConfig/index.d.ts +3 -3
  46. package/dist/Auth/useApiConfig/index.d.ts.map +1 -0
  47. package/dist/Auth/useAuth/index.d.ts +324 -3
  48. package/dist/Auth/useAuth/index.d.ts.map +1 -0
  49. package/dist/Auth/useAuthGuard/index.d.ts +324 -3
  50. package/dist/Auth/useAuthGuard/index.d.ts.map +1 -0
  51. package/dist/Auth/useRouteAuth/index.d.ts +324 -3
  52. package/dist/Auth/useRouteAuth/index.d.ts.map +1 -0
  53. package/dist/Auth/useUrlAuthentication/index.d.ts +3 -4
  54. package/dist/Auth/useUrlAuthentication/index.d.ts.map +1 -0
  55. package/dist/Auth/withAuth/index.d.ts +324 -3
  56. package/dist/Auth/withAuth/index.d.ts.map +1 -0
  57. package/dist/Auth/zustandAuthAdapter/index.d.ts +2 -3
  58. package/dist/Auth/zustandAuthAdapter/index.d.ts.map +1 -0
  59. package/dist/Badge/index.d.ts +4 -6
  60. package/dist/Badge/index.d.ts.map +1 -0
  61. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts +5 -7
  62. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts.map +1 -0
  63. package/dist/BreadcrumbMenu/index.d.ts +4 -8
  64. package/dist/BreadcrumbMenu/index.d.ts.map +1 -0
  65. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts +7 -10
  66. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts.map +1 -0
  67. package/dist/BreadcrumbMenu/useUrlParams/index.d.ts +3 -4
  68. package/dist/BreadcrumbMenu/useUrlParams/index.d.ts.map +1 -0
  69. package/dist/Button/index.d.ts +4 -6
  70. package/dist/Button/index.d.ts.map +1 -0
  71. package/dist/Calendar/index.d.ts +9 -11
  72. package/dist/Calendar/index.d.ts.map +1 -0
  73. package/dist/Card/index.d.ts +17 -19
  74. package/dist/Card/index.d.ts.map +1 -0
  75. package/dist/CheckBox/index.d.ts +6 -8
  76. package/dist/CheckBox/index.d.ts.map +1 -0
  77. package/dist/Chips/index.d.ts +4 -6
  78. package/dist/Chips/index.d.ts.map +1 -0
  79. package/dist/CorrectActivityModal/index.d.ts +39 -0
  80. package/dist/CorrectActivityModal/index.d.ts.map +1 -0
  81. package/dist/CorrectActivityModal/index.js +3674 -0
  82. package/dist/CorrectActivityModal/index.js.map +1 -0
  83. package/dist/CorrectActivityModal/index.mjs +3689 -0
  84. package/dist/CorrectActivityModal/index.mjs.map +1 -0
  85. package/dist/Divider/index.d.ts +3 -5
  86. package/dist/Divider/index.d.ts.map +1 -0
  87. package/dist/DownloadButton/index.d.ts +5 -7
  88. package/dist/DownloadButton/index.d.ts.map +1 -0
  89. package/dist/DropdownMenu/index.d.ts +26 -28
  90. package/dist/DropdownMenu/index.d.ts.map +1 -0
  91. package/dist/EmptyState/index.d.ts +5 -7
  92. package/dist/EmptyState/index.d.ts.map +1 -0
  93. package/dist/FileAttachment/index.d.ts +72 -0
  94. package/dist/FileAttachment/index.d.ts.map +1 -0
  95. package/dist/FileAttachment/index.js +239 -0
  96. package/dist/FileAttachment/index.js.map +1 -0
  97. package/dist/FileAttachment/index.mjs +213 -0
  98. package/dist/FileAttachment/index.mjs.map +1 -0
  99. package/dist/IconButton/index.d.ts +6 -8
  100. package/dist/IconButton/index.d.ts.map +1 -0
  101. package/dist/IconRender/index.d.ts +5 -6
  102. package/dist/IconRender/index.d.ts.map +1 -0
  103. package/dist/IconRoundedButton/index.d.ts +4 -6
  104. package/dist/IconRoundedButton/index.d.ts.map +1 -0
  105. package/dist/Input/index.d.ts +5 -7
  106. package/dist/Input/index.d.ts.map +1 -0
  107. package/dist/LatexRenderer/index.d.ts +5 -6
  108. package/dist/LatexRenderer/index.d.ts.map +1 -0
  109. package/dist/LoadingModal/index.d.ts +3 -5
  110. package/dist/LoadingModal/index.d.ts.map +1 -0
  111. package/dist/Menu/index.d.ts +12 -14
  112. package/dist/Menu/index.d.ts.map +1 -0
  113. package/dist/Modal/index.d.ts +3 -5
  114. package/dist/Modal/index.d.ts.map +1 -0
  115. package/dist/Modal/utils/videoUtils/index.d.ts +4 -5
  116. package/dist/Modal/utils/videoUtils/index.d.ts.map +1 -0
  117. package/dist/MultipleChoice/index.d.ts +2 -4
  118. package/dist/MultipleChoice/index.d.ts.map +1 -0
  119. package/dist/NavButton/index.d.ts +5 -7
  120. package/dist/NavButton/index.d.ts.map +1 -0
  121. package/dist/NoSearchResult/index.d.ts +4 -6
  122. package/dist/NoSearchResult/index.d.ts.map +1 -0
  123. package/dist/NotFound/index.d.ts +4 -6
  124. package/dist/NotFound/index.d.ts.map +1 -0
  125. package/dist/NotificationCard/index.d.ts +218 -3
  126. package/dist/NotificationCard/index.d.ts.map +1 -0
  127. package/dist/ProgressBar/index.d.ts +4 -6
  128. package/dist/ProgressBar/index.d.ts.map +1 -0
  129. package/dist/ProgressCircle/index.d.ts +4 -6
  130. package/dist/ProgressCircle/index.d.ts.map +1 -0
  131. package/dist/Quiz/index.d.ts +19 -23
  132. package/dist/Quiz/index.d.ts.map +1 -0
  133. package/dist/Quiz/useQuizStore/index.d.ts +14 -17
  134. package/dist/Quiz/useQuizStore/index.d.ts.map +1 -0
  135. package/dist/Radio/index.d.ts +14 -15
  136. package/dist/Radio/index.d.ts.map +1 -0
  137. package/dist/Search/index.d.ts +4 -6
  138. package/dist/Search/index.d.ts.map +1 -0
  139. package/dist/Select/index.d.ts +12 -14
  140. package/dist/Select/index.d.ts.map +1 -0
  141. package/dist/SelectionButton/index.d.ts +5 -7
  142. package/dist/SelectionButton/index.d.ts.map +1 -0
  143. package/dist/Skeleton/index.d.ts +10 -12
  144. package/dist/Skeleton/index.d.ts.map +1 -0
  145. package/dist/StatisticsCard/index.d.ts +3 -5
  146. package/dist/StatisticsCard/index.d.ts.map +1 -0
  147. package/dist/Stepper/index.d.ts +6 -8
  148. package/dist/Stepper/index.d.ts.map +1 -0
  149. package/dist/SubjectInfo/index.d.ts +17 -2
  150. package/dist/SubjectInfo/index.d.ts.map +1 -0
  151. package/dist/Support/TicketModal/index.d.ts +14 -0
  152. package/dist/Support/TicketModal/index.d.ts.map +1 -0
  153. package/dist/Support/TicketModal/index.js +1279 -0
  154. package/dist/Support/TicketModal/index.js.map +1 -0
  155. package/dist/Support/TicketModal/index.mjs +1248 -0
  156. package/dist/Support/TicketModal/index.mjs.map +1 -0
  157. package/dist/Support/index.d.ts +8 -0
  158. package/dist/Support/index.d.ts.map +1 -0
  159. package/dist/Support/index.js +2686 -0
  160. package/dist/Support/index.js.map +1 -0
  161. package/dist/Support/index.mjs +2676 -0
  162. package/dist/Support/index.mjs.map +1 -0
  163. package/dist/Table/TablePagination/index.d.ts +4 -6
  164. package/dist/Table/TablePagination/index.d.ts.map +1 -0
  165. package/dist/Table/index.d.ts +18 -19
  166. package/dist/Table/index.d.ts.map +1 -0
  167. package/dist/TableProvider/index.css +112 -0
  168. package/dist/TableProvider/index.css.map +1 -1
  169. package/dist/TableProvider/index.d.ts +198 -4
  170. package/dist/TableProvider/index.d.ts.map +1 -0
  171. package/dist/TableProvider/index.js +56 -22
  172. package/dist/TableProvider/index.js.map +1 -1
  173. package/dist/TableProvider/index.mjs +78 -44
  174. package/dist/TableProvider/index.mjs.map +1 -1
  175. package/dist/Text/index.d.ts +4 -6
  176. package/dist/Text/index.d.ts.map +1 -0
  177. package/dist/TextArea/index.d.ts +6 -8
  178. package/dist/TextArea/index.d.ts.map +1 -0
  179. package/dist/ThemeToggle/index.d.ts +4 -8
  180. package/dist/ThemeToggle/index.d.ts.map +1 -0
  181. package/dist/Toast/ToastStore/index.d.ts +3 -5
  182. package/dist/Toast/ToastStore/index.d.ts.map +1 -0
  183. package/dist/Toast/Toaster/index.d.ts +4 -6
  184. package/dist/Toast/Toaster/index.d.ts.map +1 -0
  185. package/dist/Toast/index.d.ts +3 -5
  186. package/dist/Toast/index.d.ts.map +1 -0
  187. package/dist/VideoPlayer/index.d.ts +4 -6
  188. package/dist/VideoPlayer/index.d.ts.map +1 -0
  189. package/dist/Whiteboard/index.d.ts +5 -7
  190. package/dist/Whiteboard/index.d.ts.map +1 -0
  191. package/dist/assets/icons/subjects/BookOpenText.d.ts +5 -0
  192. package/dist/assets/icons/subjects/BookOpenText.d.ts.map +1 -0
  193. package/dist/assets/icons/subjects/ChatEN.d.ts +5 -0
  194. package/dist/assets/icons/subjects/ChatEN.d.ts.map +1 -0
  195. package/dist/assets/icons/subjects/ChatES.d.ts +5 -0
  196. package/dist/assets/icons/subjects/ChatES.d.ts.map +1 -0
  197. package/dist/assets/icons/subjects/ChatPT.d.ts +5 -0
  198. package/dist/assets/icons/subjects/ChatPT.d.ts.map +1 -0
  199. package/dist/assets/icons/subjects/HeadCircuit.d.ts +5 -0
  200. package/dist/assets/icons/subjects/HeadCircuit.d.ts.map +1 -0
  201. package/dist/assets/icons/subjects/Microscope.d.ts +5 -0
  202. package/dist/assets/icons/subjects/Microscope.d.ts.map +1 -0
  203. package/dist/enums/SubjectEnum.d.ts +19 -0
  204. package/dist/enums/SubjectEnum.d.ts.map +1 -0
  205. package/dist/hooks/useAppContent.d.ts +55 -0
  206. package/dist/hooks/useAppContent.d.ts.map +1 -0
  207. package/dist/hooks/useAppInitialization.d.ts +21 -0
  208. package/dist/hooks/useAppInitialization.d.ts.map +1 -0
  209. package/dist/hooks/useInstitution.d.ts +2 -0
  210. package/dist/hooks/useInstitution.d.ts.map +1 -0
  211. package/dist/hooks/useMobile/index.d.ts +4 -5
  212. package/dist/hooks/useMobile/index.d.ts.map +1 -0
  213. package/dist/hooks/useNotificationStore.d.ts +34 -0
  214. package/dist/hooks/useNotificationStore.d.ts.map +1 -0
  215. package/dist/hooks/useNotifications.d.ts +129 -0
  216. package/dist/hooks/useNotifications.d.ts.map +1 -0
  217. package/dist/hooks/useScreen.d.ts +38 -0
  218. package/dist/hooks/useScreen.d.ts.map +1 -0
  219. package/dist/hooks/useTheme/index.d.ts +4 -7
  220. package/dist/hooks/useTheme/index.d.ts.map +1 -0
  221. package/dist/index.css +112 -0
  222. package/dist/index.css.map +1 -1
  223. package/dist/index.d.ts +127 -789
  224. package/dist/index.d.ts.map +1 -0
  225. package/dist/index.js +9031 -7012
  226. package/dist/index.js.map +1 -1
  227. package/dist/index.mjs +9093 -7085
  228. package/dist/index.mjs.map +1 -1
  229. package/dist/store/appStore.d.ts +27 -0
  230. package/dist/store/appStore.d.ts.map +1 -0
  231. package/dist/store/authStore.d.ts +75 -0
  232. package/dist/store/authStore.d.ts.map +1 -0
  233. package/dist/store/notificationStore.d.ts +89 -0
  234. package/dist/store/notificationStore.d.ts.map +1 -0
  235. package/dist/{themeStore-P2X64zC-.d.ts → store/themeStore.d.ts} +8 -12
  236. package/dist/store/themeStore.d.ts.map +1 -0
  237. package/dist/styles.css +112 -0
  238. package/dist/styles.css.map +1 -1
  239. package/dist/suporthistory-W5LBGAUP.png +0 -0
  240. package/dist/types/activityDetails.d.ts +127 -0
  241. package/dist/types/activityDetails.d.ts.map +1 -0
  242. package/dist/types/activityFilters.d.ts +51 -0
  243. package/dist/types/activityFilters.d.ts.map +1 -0
  244. package/dist/types/auth.d.ts +53 -0
  245. package/dist/types/auth.d.ts.map +1 -0
  246. package/dist/types/notifications.d.ts +199 -0
  247. package/dist/types/notifications.d.ts.map +1 -0
  248. package/dist/types/questionTypes.d.ts +6 -0
  249. package/dist/types/questionTypes.d.ts.map +1 -0
  250. package/dist/types/studentActivityCorrection.d.ts +57 -0
  251. package/dist/types/studentActivityCorrection.d.ts.map +1 -0
  252. package/dist/types/support/index.d.ts +111 -0
  253. package/dist/types/support/index.d.ts.map +1 -0
  254. package/dist/types/support/index.js +115 -0
  255. package/dist/types/support/index.js.map +1 -0
  256. package/dist/types/support/index.mjs +84 -0
  257. package/dist/types/support/index.mjs.map +1 -0
  258. package/dist/utils/activityFilters.d.ts +23 -0
  259. package/dist/utils/activityFilters.d.ts.map +1 -0
  260. package/dist/utils/dropdown.d.ts +12 -0
  261. package/dist/utils/dropdown.d.ts.map +1 -0
  262. package/dist/utils/index.d.ts +6 -43
  263. package/dist/utils/index.d.ts.map +1 -0
  264. package/dist/utils/keys.d.ts +24 -0
  265. package/dist/utils/keys.d.ts.map +1 -0
  266. package/package.json +20 -4
  267. package/dist/Accordation/index.d.mts +0 -15
  268. package/dist/ActivityFilters/index.d.mts +0 -5
  269. package/dist/ActivityFilters-Cs3TpGAY.d.ts +0 -97
  270. package/dist/ActivityFilters-CsX8y41f.d.mts +0 -97
  271. package/dist/Alert/index.d.mts +0 -13
  272. package/dist/AlertDialog/index.d.mts +0 -36
  273. package/dist/AlertManager/index.d.mts +0 -17
  274. package/dist/AlertManagerView/index.d.mts +0 -31
  275. package/dist/Alternative/index.d.mts +0 -81
  276. package/dist/Auth/AuthProvider/index.d.mts +0 -3
  277. package/dist/Auth/ProtectedRoute/index.d.mts +0 -3
  278. package/dist/Auth/PublicRoute/index.d.mts +0 -3
  279. package/dist/Auth/getRootDomain/index.d.mts +0 -3
  280. package/dist/Auth/index.d.mts +0 -326
  281. package/dist/Auth/useApiConfig/index.d.mts +0 -43
  282. package/dist/Auth/useAuth/index.d.mts +0 -3
  283. package/dist/Auth/useAuthGuard/index.d.mts +0 -3
  284. package/dist/Auth/useRouteAuth/index.d.mts +0 -3
  285. package/dist/Auth/useUrlAuthentication/index.d.mts +0 -69
  286. package/dist/Auth/withAuth/index.d.mts +0 -3
  287. package/dist/Auth/zustandAuthAdapter/index.d.mts +0 -75
  288. package/dist/Badge/index.d.mts +0 -46
  289. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.mts +0 -77
  290. package/dist/BreadcrumbMenu/index.d.mts +0 -31
  291. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.mts +0 -48
  292. package/dist/BreadcrumbMenu/useUrlParams/index.d.mts +0 -28
  293. package/dist/Button/index.d.mts +0 -45
  294. package/dist/Calendar/index.d.mts +0 -60
  295. package/dist/Card/index.d.mts +0 -150
  296. package/dist/CheckBox/index.d.mts +0 -74
  297. package/dist/CheckBoxGroup-9n5C0OH4.d.mts +0 -24
  298. package/dist/CheckBoxGroup-9n5C0OH4.d.ts +0 -24
  299. package/dist/Chips/index.d.mts +0 -41
  300. package/dist/Divider/index.d.mts +0 -32
  301. package/dist/DownloadButton/index.d.mts +0 -46
  302. package/dist/DropdownMenu/index.d.mts +0 -82
  303. package/dist/EmptyState/index.d.mts +0 -65
  304. package/dist/IconButton/index.d.mts +0 -76
  305. package/dist/IconRender/index.d.mts +0 -36
  306. package/dist/IconRoundedButton/index.d.mts +0 -34
  307. package/dist/Input/index.d.mts +0 -27
  308. package/dist/LatexRenderer/index.d.mts +0 -50
  309. package/dist/LoadingModal/index.d.mts +0 -11
  310. package/dist/Menu/index.d.mts +0 -48
  311. package/dist/Modal/index.d.mts +0 -76
  312. package/dist/Modal/utils/videoUtils/index.d.mts +0 -28
  313. package/dist/MultipleChoice/index.d.mts +0 -20
  314. package/dist/NavButton/index.d.mts +0 -57
  315. package/dist/NoSearchResult/index.d.mts +0 -37
  316. package/dist/NotFound/index.d.mts +0 -58
  317. package/dist/NotificationCard/index.d.mts +0 -3
  318. package/dist/NotificationCard-4GgB0Nsf.d.mts +0 -417
  319. package/dist/NotificationCard-4GgB0Nsf.d.ts +0 -417
  320. package/dist/ProgressBar/index.d.mts +0 -95
  321. package/dist/ProgressCircle/index.d.mts +0 -60
  322. package/dist/Quiz/index.d.mts +0 -55
  323. package/dist/Quiz/useQuizStore/index.d.mts +0 -258
  324. package/dist/Radio/index.d.mts +0 -203
  325. package/dist/Search/index.d.mts +0 -27
  326. package/dist/Select/index.d.mts +0 -59
  327. package/dist/SelectionButton/index.d.mts +0 -57
  328. package/dist/Skeleton/index.d.mts +0 -40
  329. package/dist/StatisticsCard/index.d.mts +0 -79
  330. package/dist/Stepper/index.d.mts +0 -169
  331. package/dist/SubjectInfo/index.d.mts +0 -2
  332. package/dist/SubjectInfo-Dvt0OodP.d.mts +0 -37
  333. package/dist/SubjectInfo-Dvt0OodP.d.ts +0 -37
  334. package/dist/Table/TablePagination/index.d.mts +0 -64
  335. package/dist/Table/index.d.mts +0 -93
  336. package/dist/TableProvider/index.d.mts +0 -4
  337. package/dist/TableProvider-BnAnv3OV.d.mts +0 -239
  338. package/dist/TableProvider-GfPlLqzg.d.ts +0 -239
  339. package/dist/Text/index.d.mts +0 -58
  340. package/dist/TextArea/index.d.mts +0 -74
  341. package/dist/ThemeToggle/index.d.mts +0 -12
  342. package/dist/Toast/ToastStore/index.d.mts +0 -19
  343. package/dist/Toast/Toaster/index.d.mts +0 -16
  344. package/dist/Toast/index.d.mts +0 -17
  345. package/dist/VideoPlayer/index.d.mts +0 -52
  346. package/dist/Whiteboard/index.d.mts +0 -34
  347. package/dist/hooks/useMobile/index.d.mts +0 -29
  348. package/dist/hooks/useTheme/index.d.mts +0 -17
  349. package/dist/index.d.mts +0 -789
  350. package/dist/styles.d.mts +0 -2
  351. package/dist/styles.d.ts +0 -2
  352. package/dist/themeStore-P2X64zC-.d.mts +0 -79
  353. package/dist/types-DqZRjqxh.d.ts +0 -67
  354. package/dist/types-pd3QVhSu.d.mts +0 -67
  355. package/dist/utils/index.d.mts +0 -51
@@ -0,0 +1,1279 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/Support/components/TicketModal.tsx
31
+ var TicketModal_exports = {};
32
+ __export(TicketModal_exports, {
33
+ TicketModal: () => TicketModal
34
+ });
35
+ module.exports = __toCommonJS(TicketModal_exports);
36
+ var import_react5 = require("react");
37
+ var import_dayjs = __toESM(require("dayjs"));
38
+ var import_pt_br = require("dayjs/locale/pt-br");
39
+
40
+ // src/components/Badge/Badge.tsx
41
+ var import_phosphor_react = require("phosphor-react");
42
+
43
+ // src/utils/utils.ts
44
+ var import_clsx = require("clsx");
45
+ var import_tailwind_merge = require("tailwind-merge");
46
+ function cn(...inputs) {
47
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
48
+ }
49
+
50
+ // src/components/Badge/Badge.tsx
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ var VARIANT_ACTION_CLASSES = {
53
+ solid: {
54
+ error: "bg-error-background text-error-700 focus-visible:outline-none",
55
+ warning: "bg-warning text-warning-800 focus-visible:outline-none",
56
+ success: "bg-success text-success-800 focus-visible:outline-none",
57
+ info: "bg-info text-info-800 focus-visible:outline-none",
58
+ muted: "bg-background-muted text-background-800 focus-visible:outline-none"
59
+ },
60
+ outlined: {
61
+ error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
62
+ warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
63
+ success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
64
+ info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
65
+ muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
66
+ },
67
+ exams: {
68
+ exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
69
+ exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
70
+ exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
71
+ exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
72
+ },
73
+ examsOutlined: {
74
+ exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
75
+ exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
76
+ exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
77
+ exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
78
+ },
79
+ resultStatus: {
80
+ negative: "bg-error text-error-800 focus-visible:outline-none",
81
+ positive: "bg-success text-success-800 focus-visible:outline-none"
82
+ },
83
+ notification: "text-primary"
84
+ };
85
+ var SIZE_CLASSES = {
86
+ small: "text-2xs px-2 py-1",
87
+ medium: "text-xs px-2 py-1",
88
+ large: "text-sm px-2 py-1"
89
+ };
90
+ var SIZE_CLASSES_ICON = {
91
+ small: "size-3",
92
+ medium: "size-3.5",
93
+ large: "size-4"
94
+ };
95
+ var Badge = ({
96
+ children,
97
+ iconLeft,
98
+ iconRight,
99
+ size = "medium",
100
+ variant = "solid",
101
+ action = "error",
102
+ className = "",
103
+ notificationActive = false,
104
+ ...props
105
+ }) => {
106
+ const sizeClasses = SIZE_CLASSES[size];
107
+ const sizeClassesIcon = SIZE_CLASSES_ICON[size];
108
+ const variantActionMap = VARIANT_ACTION_CLASSES[variant] || {};
109
+ const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
110
+ const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
111
+ const baseClassesIcon = "flex items-center";
112
+ if (variant === "notification") {
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
114
+ "div",
115
+ {
116
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
117
+ ...props,
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_phosphor_react.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
120
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
121
+ "span",
122
+ {
123
+ "data-testid": "notification-dot",
124
+ className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
125
+ }
126
+ )
127
+ ]
128
+ }
129
+ );
130
+ }
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
132
+ "div",
133
+ {
134
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
135
+ ...props,
136
+ children: [
137
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
138
+ children,
139
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
140
+ ]
141
+ }
142
+ );
143
+ };
144
+ var Badge_default = Badge;
145
+
146
+ // src/components/Button/Button.tsx
147
+ var import_jsx_runtime2 = require("react/jsx-runtime");
148
+ var VARIANT_ACTION_CLASSES2 = {
149
+ solid: {
150
+ primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
151
+ positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
152
+ negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
153
+ },
154
+ outline: {
155
+ primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
156
+ positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
157
+ negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
158
+ },
159
+ link: {
160
+ primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
161
+ positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
162
+ negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
163
+ }
164
+ };
165
+ var SIZE_CLASSES2 = {
166
+ "extra-small": "text-xs px-3.5 py-2",
167
+ small: "text-sm px-4 py-2.5",
168
+ medium: "text-md px-5 py-2.5",
169
+ large: "text-lg px-6 py-3",
170
+ "extra-large": "text-lg px-7 py-3.5"
171
+ };
172
+ var Button = ({
173
+ children,
174
+ iconLeft,
175
+ iconRight,
176
+ size = "medium",
177
+ variant = "solid",
178
+ action = "primary",
179
+ className = "",
180
+ disabled,
181
+ type = "button",
182
+ ...props
183
+ }) => {
184
+ const sizeClasses = SIZE_CLASSES2[size];
185
+ const variantClasses = VARIANT_ACTION_CLASSES2[variant][action];
186
+ const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
187
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
188
+ "button",
189
+ {
190
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
191
+ disabled,
192
+ type,
193
+ ...props,
194
+ children: [
195
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
196
+ children,
197
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
198
+ ]
199
+ }
200
+ );
201
+ };
202
+ var Button_default = Button;
203
+
204
+ // src/components/Divider/Divider.tsx
205
+ var import_jsx_runtime3 = require("react/jsx-runtime");
206
+ var Divider = ({
207
+ orientation = "horizontal",
208
+ className = "",
209
+ ...props
210
+ }) => {
211
+ const baseClasses = "bg-border-200 border-0";
212
+ const orientationClasses = {
213
+ horizontal: "w-full h-px",
214
+ vertical: "h-full w-px"
215
+ };
216
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
217
+ "hr",
218
+ {
219
+ className: cn(baseClasses, orientationClasses[orientation], className),
220
+ "aria-orientation": orientation,
221
+ ...props
222
+ }
223
+ );
224
+ };
225
+ var Divider_default = Divider;
226
+
227
+ // src/components/Modal/Modal.tsx
228
+ var import_react = require("react");
229
+ var import_phosphor_react2 = require("phosphor-react");
230
+
231
+ // src/components/Modal/utils/videoUtils.ts
232
+ var isYouTubeUrl = (url) => {
233
+ const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
234
+ return youtubeRegex.test(url);
235
+ };
236
+ var isValidYouTubeHost = (host) => {
237
+ if (host === "youtu.be") return "youtu.be";
238
+ const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
239
+ if (isValidYouTubeCom) return "youtube";
240
+ const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
241
+ if (isValidNoCookie) return "nocookie";
242
+ return null;
243
+ };
244
+ var extractYoutuBeId = (pathname) => {
245
+ const firstSeg = pathname.split("/").filter(Boolean)[0];
246
+ return firstSeg || null;
247
+ };
248
+ var extractYouTubeId = (pathname, searchParams) => {
249
+ const parts = pathname.split("/").filter(Boolean);
250
+ const [first, second] = parts;
251
+ if (first === "embed" && second) return second;
252
+ if (first === "shorts" && second) return second;
253
+ if (first === "live" && second) return second;
254
+ const v = searchParams.get("v");
255
+ if (v) return v;
256
+ return null;
257
+ };
258
+ var getYouTubeVideoId = (url) => {
259
+ try {
260
+ const u = new URL(url);
261
+ const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
262
+ if (!hostType) return null;
263
+ if (hostType === "youtu.be") {
264
+ return extractYoutuBeId(u.pathname);
265
+ }
266
+ return extractYouTubeId(u.pathname, u.searchParams);
267
+ } catch {
268
+ return null;
269
+ }
270
+ };
271
+ var getYouTubeEmbedUrl = (videoId) => {
272
+ return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
273
+ };
274
+
275
+ // src/components/Modal/Modal.tsx
276
+ var import_jsx_runtime4 = require("react/jsx-runtime");
277
+ var SIZE_CLASSES3 = {
278
+ xs: "max-w-[360px]",
279
+ sm: "max-w-[420px]",
280
+ md: "max-w-[510px]",
281
+ lg: "max-w-[640px]",
282
+ xl: "max-w-[970px]"
283
+ };
284
+ var Modal = ({
285
+ isOpen,
286
+ onClose,
287
+ title,
288
+ children,
289
+ size = "md",
290
+ className = "",
291
+ closeOnEscape = true,
292
+ footer,
293
+ hideCloseButton = false,
294
+ variant = "default",
295
+ description,
296
+ image,
297
+ imageAlt,
298
+ actionLink,
299
+ actionLabel,
300
+ contentClassName = ""
301
+ }) => {
302
+ const titleId = (0, import_react.useId)();
303
+ (0, import_react.useEffect)(() => {
304
+ if (!isOpen || !closeOnEscape) return;
305
+ const handleEscape = (event) => {
306
+ if (event.key === "Escape") {
307
+ onClose();
308
+ }
309
+ };
310
+ document.addEventListener("keydown", handleEscape);
311
+ return () => document.removeEventListener("keydown", handleEscape);
312
+ }, [isOpen, closeOnEscape, onClose]);
313
+ (0, import_react.useEffect)(() => {
314
+ if (!isOpen) return;
315
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
316
+ const originalOverflow = document.body.style.overflow;
317
+ const originalPaddingRight = document.body.style.paddingRight;
318
+ document.body.style.overflow = "hidden";
319
+ if (scrollbarWidth > 0) {
320
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
321
+ const overlay = document.createElement("div");
322
+ overlay.id = "modal-scrollbar-overlay";
323
+ overlay.style.cssText = `
324
+ position: fixed;
325
+ top: 0;
326
+ right: 0;
327
+ width: ${scrollbarWidth}px;
328
+ height: 100vh;
329
+ background-color: rgb(0 0 0 / 0.6);
330
+ z-index: 40;
331
+ pointer-events: none;
332
+ `;
333
+ document.body.appendChild(overlay);
334
+ }
335
+ return () => {
336
+ document.body.style.overflow = originalOverflow;
337
+ document.body.style.paddingRight = originalPaddingRight;
338
+ const overlay = document.getElementById("modal-scrollbar-overlay");
339
+ if (overlay) {
340
+ overlay.remove();
341
+ }
342
+ };
343
+ }, [isOpen]);
344
+ if (!isOpen) return null;
345
+ const sizeClasses = SIZE_CLASSES3[size];
346
+ const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
347
+ const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
348
+ const modalClasses = cn(
349
+ baseClasses,
350
+ sizeClasses,
351
+ dialogResetClasses,
352
+ className
353
+ );
354
+ const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
355
+ const handleActionClick = () => {
356
+ if (actionLink) {
357
+ window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
358
+ }
359
+ };
360
+ if (variant === "activity") {
361
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
362
+ "dialog",
363
+ {
364
+ className: modalClasses,
365
+ "aria-labelledby": titleId,
366
+ "aria-modal": "true",
367
+ open: true,
368
+ children: [
369
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
370
+ "button",
371
+ {
372
+ onClick: onClose,
373
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
374
+ "aria-label": "Fechar modal",
375
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.X, { size: 18 })
376
+ }
377
+ ) }),
378
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
379
+ image && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
380
+ "img",
381
+ {
382
+ src: image,
383
+ alt: imageAlt ?? "",
384
+ className: "w-[122px] h-[122px] object-contain"
385
+ }
386
+ ) }),
387
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
388
+ "h2",
389
+ {
390
+ id: titleId,
391
+ className: "text-lg font-semibold text-text-950 text-center",
392
+ children: title
393
+ }
394
+ ),
395
+ description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
396
+ actionLink && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "w-full", children: [
397
+ (() => {
398
+ const normalized = normalizeUrl(actionLink);
399
+ const isYT = isYouTubeUrl(normalized);
400
+ if (!isYT) return null;
401
+ const id = getYouTubeVideoId(normalized);
402
+ if (!id) {
403
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
404
+ Button_default,
405
+ {
406
+ variant: "solid",
407
+ action: "primary",
408
+ size: "large",
409
+ className: "w-full",
410
+ onClick: handleActionClick,
411
+ children: actionLabel || "Iniciar Atividade"
412
+ }
413
+ );
414
+ }
415
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
416
+ "iframe",
417
+ {
418
+ src: getYouTubeEmbedUrl(id),
419
+ className: "w-full aspect-video rounded-lg",
420
+ allowFullScreen: true,
421
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
422
+ title: "V\xEDdeo YouTube"
423
+ }
424
+ );
425
+ })(),
426
+ !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
427
+ Button_default,
428
+ {
429
+ variant: "solid",
430
+ action: "primary",
431
+ size: "large",
432
+ className: "w-full",
433
+ onClick: handleActionClick,
434
+ children: actionLabel || "Iniciar Atividade"
435
+ }
436
+ )
437
+ ] })
438
+ ] })
439
+ ]
440
+ }
441
+ ) });
442
+ }
443
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
444
+ "dialog",
445
+ {
446
+ className: modalClasses,
447
+ "aria-labelledby": titleId,
448
+ "aria-modal": "true",
449
+ open: true,
450
+ children: [
451
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
452
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
453
+ !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
454
+ "button",
455
+ {
456
+ onClick: onClose,
457
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
458
+ "aria-label": "Fechar modal",
459
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.X, { size: 18 })
460
+ }
461
+ )
462
+ ] }),
463
+ children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
464
+ footer && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
465
+ ]
466
+ }
467
+ ) });
468
+ };
469
+ var Modal_default = Modal;
470
+
471
+ // src/components/Text/Text.tsx
472
+ var import_jsx_runtime5 = require("react/jsx-runtime");
473
+ var Text = ({
474
+ children,
475
+ size = "md",
476
+ weight = "normal",
477
+ color = "text-text-950",
478
+ as,
479
+ className = "",
480
+ ...props
481
+ }) => {
482
+ let sizeClasses = "";
483
+ let weightClasses = "";
484
+ const sizeClassMap = {
485
+ "2xs": "text-2xs",
486
+ xs: "text-xs",
487
+ sm: "text-sm",
488
+ md: "text-md",
489
+ lg: "text-lg",
490
+ xl: "text-xl",
491
+ "2xl": "text-2xl",
492
+ "3xl": "text-3xl",
493
+ "4xl": "text-4xl",
494
+ "5xl": "text-5xl",
495
+ "6xl": "text-6xl"
496
+ };
497
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
498
+ const weightClassMap = {
499
+ hairline: "font-hairline",
500
+ light: "font-light",
501
+ normal: "font-normal",
502
+ medium: "font-medium",
503
+ semibold: "font-semibold",
504
+ bold: "font-bold",
505
+ extrabold: "font-extrabold",
506
+ black: "font-black"
507
+ };
508
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
509
+ const baseClasses = "font-primary";
510
+ const Component = as ?? "p";
511
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
512
+ Component,
513
+ {
514
+ className: cn(baseClasses, sizeClasses, weightClasses, color, className),
515
+ ...props,
516
+ children
517
+ }
518
+ );
519
+ };
520
+ var Text_default = Text;
521
+
522
+ // src/components/TextArea/TextArea.tsx
523
+ var import_react2 = require("react");
524
+ var import_phosphor_react3 = require("phosphor-react");
525
+ var import_jsx_runtime6 = require("react/jsx-runtime");
526
+ var SIZE_CLASSES4 = {
527
+ small: {
528
+ textarea: "h-24 text-sm",
529
+ // 96px height, 14px font
530
+ textSize: "sm"
531
+ },
532
+ medium: {
533
+ textarea: "h-24 text-base",
534
+ // 96px height, 16px font
535
+ textSize: "md"
536
+ },
537
+ large: {
538
+ textarea: "h-24 text-lg",
539
+ // 96px height, 18px font
540
+ textSize: "lg"
541
+ },
542
+ extraLarge: {
543
+ textarea: "h-24 text-xl",
544
+ // 96px height, 20px font
545
+ textSize: "xl"
546
+ }
547
+ };
548
+ var BASE_TEXTAREA_CLASSES = "w-full box-border p-3 bg-background border border-solid rounded-[4px] resize-none focus:outline-none font-roboto font-normal leading-[150%] placeholder:text-text-600 transition-all duration-200";
549
+ var STATE_CLASSES = {
550
+ default: {
551
+ base: "border-border-300 bg-background text-text-600",
552
+ hover: "hover:border-border-400",
553
+ focus: "focus:border-border-500"
554
+ },
555
+ hovered: {
556
+ base: "border-border-400 bg-background text-text-600",
557
+ hover: "",
558
+ focus: "focus:border-border-500"
559
+ },
560
+ focused: {
561
+ base: "border-2 border-primary-950 bg-background text-text-900",
562
+ hover: "",
563
+ focus: ""
564
+ },
565
+ invalid: {
566
+ base: "border-2 border-red-700 bg-white text-gray-800",
567
+ hover: "hover:border-red-700",
568
+ focus: "focus:border-red-700"
569
+ },
570
+ disabled: {
571
+ base: "border-border-300 bg-background text-text-600 cursor-not-allowed opacity-40",
572
+ hover: "",
573
+ focus: ""
574
+ }
575
+ };
576
+ var TextArea = (0, import_react2.forwardRef)(
577
+ ({
578
+ label,
579
+ size = "medium",
580
+ state = "default",
581
+ errorMessage,
582
+ helperMessage,
583
+ className = "",
584
+ labelClassName = "",
585
+ disabled,
586
+ id,
587
+ onChange,
588
+ placeholder,
589
+ required,
590
+ showCharacterCount = false,
591
+ maxLength,
592
+ value,
593
+ ...props
594
+ }, ref) => {
595
+ const generatedId = (0, import_react2.useId)();
596
+ const inputId = id ?? `textarea-${generatedId}`;
597
+ const [isFocused, setIsFocused] = (0, import_react2.useState)(false);
598
+ const currentLength = typeof value === "string" ? value.length : 0;
599
+ const isNearLimit = maxLength && currentLength >= maxLength * 0.8;
600
+ const handleChange = (event) => {
601
+ onChange?.(event);
602
+ };
603
+ const handleFocus = (event) => {
604
+ setIsFocused(true);
605
+ props.onFocus?.(event);
606
+ };
607
+ const handleBlur = (event) => {
608
+ setIsFocused(false);
609
+ props.onBlur?.(event);
610
+ };
611
+ let currentState = disabled ? "disabled" : state;
612
+ if (isFocused && currentState !== "invalid" && currentState !== "disabled") {
613
+ currentState = "focused";
614
+ }
615
+ const sizeClasses = SIZE_CLASSES4[size];
616
+ const stateClasses = STATE_CLASSES[currentState];
617
+ const textareaClasses = cn(
618
+ BASE_TEXTAREA_CLASSES,
619
+ sizeClasses.textarea,
620
+ stateClasses.base,
621
+ stateClasses.hover,
622
+ stateClasses.focus,
623
+ className
624
+ );
625
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: `flex flex-col`, children: [
626
+ label && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
627
+ Text_default,
628
+ {
629
+ as: "label",
630
+ htmlFor: inputId,
631
+ size: sizeClasses.textSize,
632
+ weight: "medium",
633
+ color: "text-text-950",
634
+ className: cn("mb-1.5", labelClassName),
635
+ children: [
636
+ label,
637
+ " ",
638
+ required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-indicator-error", children: "*" })
639
+ ]
640
+ }
641
+ ),
642
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
643
+ "textarea",
644
+ {
645
+ ref,
646
+ id: inputId,
647
+ disabled,
648
+ onChange: handleChange,
649
+ onFocus: handleFocus,
650
+ onBlur: handleBlur,
651
+ className: textareaClasses,
652
+ placeholder,
653
+ required,
654
+ maxLength,
655
+ value,
656
+ ...props
657
+ }
658
+ ),
659
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error mt-1.5", children: [
660
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.WarningCircle, { size: 16 }),
661
+ " ",
662
+ errorMessage
663
+ ] }),
664
+ !errorMessage && showCharacterCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
665
+ Text_default,
666
+ {
667
+ size: "sm",
668
+ weight: "normal",
669
+ className: `mt-1.5 ${isNearLimit ? "text-indicator-warning" : "text-text-500"}`,
670
+ children: [
671
+ currentLength,
672
+ "/",
673
+ maxLength,
674
+ " caracteres"
675
+ ]
676
+ }
677
+ ),
678
+ !errorMessage && helperMessage && !(showCharacterCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
679
+ ] });
680
+ }
681
+ );
682
+ TextArea.displayName = "TextArea";
683
+ var TextArea_default = TextArea;
684
+
685
+ // src/components/Skeleton/Skeleton.tsx
686
+ var import_react3 = require("react");
687
+ var import_jsx_runtime7 = require("react/jsx-runtime");
688
+ var SKELETON_ANIMATION_CLASSES = {
689
+ pulse: "animate-pulse",
690
+ none: ""
691
+ };
692
+ var SKELETON_VARIANT_CLASSES = {
693
+ text: "h-4 bg-background-200 rounded",
694
+ circular: "bg-background-200 rounded-full",
695
+ rectangular: "bg-background-200",
696
+ rounded: "bg-background-200 rounded-lg"
697
+ };
698
+ var SPACING_CLASSES = {
699
+ none: "",
700
+ small: "space-y-1",
701
+ medium: "space-y-2",
702
+ large: "space-y-3"
703
+ };
704
+ var Skeleton = (0, import_react3.forwardRef)(
705
+ ({
706
+ variant = "text",
707
+ width,
708
+ height,
709
+ animation = "pulse",
710
+ lines = 1,
711
+ spacing = "none",
712
+ className = "",
713
+ children,
714
+ ...props
715
+ }, ref) => {
716
+ const animationClass = SKELETON_ANIMATION_CLASSES[animation];
717
+ const variantClass = SKELETON_VARIANT_CLASSES[variant];
718
+ const spacingClass = SPACING_CLASSES[spacing];
719
+ const style = {
720
+ width: typeof width === "number" ? `${width}px` : width,
721
+ height: typeof height === "number" ? `${height}px` : height
722
+ };
723
+ if (variant === "text" && lines > 1) {
724
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
725
+ "div",
726
+ {
727
+ ref,
728
+ className: cn("flex flex-col", spacingClass, className),
729
+ ...props,
730
+ children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
731
+ "div",
732
+ {
733
+ className: cn(variantClass, animationClass),
734
+ style: index === lines - 1 ? { width: "60%" } : void 0
735
+ },
736
+ index
737
+ ))
738
+ }
739
+ );
740
+ }
741
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
742
+ "div",
743
+ {
744
+ ref,
745
+ className: cn(variantClass, animationClass, className),
746
+ style,
747
+ ...props,
748
+ children
749
+ }
750
+ );
751
+ }
752
+ );
753
+ var SkeletonText = (0, import_react3.forwardRef)(
754
+ (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "text", ...props })
755
+ );
756
+ var SkeletonCircle = (0, import_react3.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "circular", ...props }));
757
+ var SkeletonRectangle = (0, import_react3.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
758
+ var SkeletonRounded = (0, import_react3.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
759
+ var SkeletonCard = (0, import_react3.forwardRef)(
760
+ ({
761
+ showAvatar = true,
762
+ showTitle = true,
763
+ showDescription = true,
764
+ showActions = true,
765
+ lines = 2,
766
+ className = "",
767
+ ...props
768
+ }, ref) => {
769
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
770
+ "div",
771
+ {
772
+ ref,
773
+ className: cn(
774
+ "w-full p-4 bg-background border border-border-200 rounded-lg",
775
+ className
776
+ ),
777
+ ...props,
778
+ children: [
779
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3", children: [
780
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 40, height: 40 }),
781
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
782
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "60%", height: 20 }),
783
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
784
+ ] })
785
+ ] }),
786
+ showActions && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
787
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
788
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 })
789
+ ] })
790
+ ]
791
+ }
792
+ );
793
+ }
794
+ );
795
+ var SkeletonList = (0, import_react3.forwardRef)(
796
+ ({
797
+ items = 3,
798
+ showAvatar = true,
799
+ showTitle = true,
800
+ showDescription = true,
801
+ lines = 1,
802
+ className = "",
803
+ ...props
804
+ }, ref) => {
805
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
806
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 32, height: 32 }),
807
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
808
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "40%", height: 16 }),
809
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
810
+ ] })
811
+ ] }, index)) });
812
+ }
813
+ );
814
+ var SkeletonTable = (0, import_react3.forwardRef)(
815
+ ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
816
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
817
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
818
+ SkeletonText,
819
+ {
820
+ width: `${100 / columns}%`,
821
+ height: 20
822
+ },
823
+ index
824
+ )) }),
825
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
826
+ SkeletonText,
827
+ {
828
+ width: `${100 / columns}%`,
829
+ height: 16
830
+ },
831
+ colIndex
832
+ )) }, rowIndex)) })
833
+ ] });
834
+ }
835
+ );
836
+
837
+ // src/types/support.ts
838
+ var getStatusBadgeAction = (status) => {
839
+ switch (status) {
840
+ case "aberto" /* ABERTO */:
841
+ return "success";
842
+ case "respondido" /* RESPONDIDO */:
843
+ return "warning";
844
+ case "encerrado" /* ENCERRADO */:
845
+ return "info";
846
+ default:
847
+ return "info";
848
+ }
849
+ };
850
+ var getStatusText = (status) => {
851
+ switch (status) {
852
+ case "aberto" /* ABERTO */:
853
+ return "Aberto";
854
+ case "respondido" /* RESPONDIDO */:
855
+ return "Respondido";
856
+ case "encerrado" /* ENCERRADO */:
857
+ return "Encerrado";
858
+ default:
859
+ return status;
860
+ }
861
+ };
862
+ var getCategoryText = (category) => {
863
+ if (!category) return "";
864
+ switch (category) {
865
+ case "acesso" /* ACESSO */:
866
+ return "Acesso";
867
+ case "tecnico" /* TECNICO */:
868
+ return "T\xE9cnico";
869
+ case "outros" /* OUTROS */:
870
+ return "Outros";
871
+ default:
872
+ return category;
873
+ }
874
+ };
875
+
876
+ // src/components/Support/utils/supportUtils.tsx
877
+ var import_react4 = require("@phosphor-icons/react");
878
+ var import_jsx_runtime8 = require("react/jsx-runtime");
879
+ var getCategoryIcon = (category, size = 16) => {
880
+ if (!category) return null;
881
+ switch (category) {
882
+ case "acesso" /* ACESSO */:
883
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react4.KeyIcon, { size });
884
+ case "tecnico" /* TECNICO */:
885
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react4.BugIcon, { size });
886
+ case "outros" /* OUTROS */:
887
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react4.InfoIcon, { size });
888
+ default:
889
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react4.InfoIcon, { size });
890
+ }
891
+ };
892
+
893
+ // src/components/Support/components/TicketModal.tsx
894
+ var import_jsx_runtime9 = require("react/jsx-runtime");
895
+ import_dayjs.default.locale("pt-br");
896
+ var AnswerSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
897
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
898
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "80px", height: 16 }),
899
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "200px", height: 16 })
900
+ ] }),
901
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default, {}),
902
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start space-x-6", children: [
903
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "80px", height: 16 }),
904
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 space-y-2", children: [
905
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "100%", height: 16 }),
906
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "80%", height: 16 }),
907
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonText, { width: "60%", height: 16 })
908
+ ] })
909
+ ] })
910
+ ] });
911
+ var TicketModal = ({
912
+ ticket,
913
+ isOpen,
914
+ onClose,
915
+ onTicketClose,
916
+ apiClient,
917
+ userId
918
+ }) => {
919
+ const [showCloseConfirmation, setShowCloseConfirmation] = (0, import_react5.useState)(false);
920
+ const [responseText, setResponseText] = (0, import_react5.useState)("");
921
+ const [answers, setAnswers] = (0, import_react5.useState)([]);
922
+ const [isSubmittingAnswer, setIsSubmittingAnswer] = (0, import_react5.useState)(false);
923
+ const [isLoadingAnswers, setIsLoadingAnswers] = (0, import_react5.useState)(false);
924
+ const handleCloseTicket = () => {
925
+ onTicketClose?.(ticket.id);
926
+ setShowCloseConfirmation(false);
927
+ onClose();
928
+ };
929
+ const fetchAnswers = (0, import_react5.useCallback)(async () => {
930
+ if (!ticket.id || ticket.status !== "respondido" /* RESPONDIDO */) return;
931
+ setIsLoadingAnswers(true);
932
+ try {
933
+ const response = await apiClient.get(
934
+ `/support/answer/${ticket.id}`
935
+ );
936
+ setAnswers(response.data.data || []);
937
+ } catch (error) {
938
+ console.error("Erro ao buscar respostas:", error);
939
+ setAnswers([]);
940
+ } finally {
941
+ setIsLoadingAnswers(false);
942
+ }
943
+ }, [ticket.id, ticket.status, apiClient]);
944
+ const handleSubmitAnswer = async () => {
945
+ if (!responseText.trim() || !userId || !ticket.id) {
946
+ return;
947
+ }
948
+ setIsSubmittingAnswer(true);
949
+ try {
950
+ const requestData = {
951
+ userId,
952
+ supportId: ticket.id,
953
+ answer: responseText.trim()
954
+ };
955
+ await apiClient.post(
956
+ "/support/answer",
957
+ requestData
958
+ );
959
+ setResponseText("");
960
+ await fetchAnswers();
961
+ } catch (error) {
962
+ console.error("Erro ao enviar resposta:", error);
963
+ } finally {
964
+ setIsSubmittingAnswer(false);
965
+ }
966
+ };
967
+ const canCloseTicket = ticket.status !== "encerrado" /* ENCERRADO */;
968
+ (0, import_react5.useEffect)(() => {
969
+ if (isOpen) {
970
+ setResponseText("");
971
+ (async () => {
972
+ await fetchAnswers();
973
+ })().catch((error) => {
974
+ console.error("Erro ao carregar respostas:", error);
975
+ });
976
+ } else {
977
+ setAnswers([]);
978
+ }
979
+ }, [isOpen, fetchAnswers]);
980
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
981
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
982
+ Modal_default,
983
+ {
984
+ isOpen,
985
+ onClose,
986
+ title: `Pedido: ${ticket.title}`,
987
+ size: "lg",
988
+ hideCloseButton: false,
989
+ closeOnEscape: true,
990
+ "data-testid": "ticket-modal",
991
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
992
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
993
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950", children: "Detalhes" }),
994
+ canCloseTicket && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
995
+ Button_default,
996
+ {
997
+ variant: "outline",
998
+ size: "small",
999
+ action: "negative",
1000
+ onClick: () => setShowCloseConfirmation(true),
1001
+ children: "Encerrar Pedido"
1002
+ }
1003
+ )
1004
+ ] }),
1005
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 overflow-y-auto pr-2 space-y-6", children: [
1006
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
1007
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1008
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1009
+ Text_default,
1010
+ {
1011
+ size: "md",
1012
+ weight: "semibold",
1013
+ className: "text-text-700 w-20",
1014
+ children: "ID"
1015
+ }
1016
+ ),
1017
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.id })
1018
+ ] }),
1019
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1020
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1021
+ Text_default,
1022
+ {
1023
+ size: "md",
1024
+ weight: "semibold",
1025
+ className: "text-text-700 w-20",
1026
+ children: "Aberto em"
1027
+ }
1028
+ ),
1029
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: (0, import_dayjs.default)(ticket.createdAt).format("DD MMMM YYYY, [\xE0s] HH[h]") })
1030
+ ] }),
1031
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1032
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1033
+ Text_default,
1034
+ {
1035
+ size: "md",
1036
+ weight: "semibold",
1037
+ className: "text-text-700 w-20",
1038
+ children: "Status"
1039
+ }
1040
+ ),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1042
+ Badge_default,
1043
+ {
1044
+ variant: "solid",
1045
+ size: "small",
1046
+ action: getStatusBadgeAction(ticket.status),
1047
+ className: "w-fit",
1048
+ children: getStatusText(ticket.status)
1049
+ }
1050
+ )
1051
+ ] }),
1052
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1053
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1054
+ Text_default,
1055
+ {
1056
+ size: "md",
1057
+ weight: "semibold",
1058
+ className: "text-text-700 w-20",
1059
+ children: "Tipo"
1060
+ }
1061
+ ),
1062
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1063
+ Badge_default,
1064
+ {
1065
+ variant: "solid",
1066
+ size: "small",
1067
+ action: "muted",
1068
+ className: "w-fit",
1069
+ children: [
1070
+ getCategoryIcon(ticket.category),
1071
+ getCategoryText(ticket.category)
1072
+ ]
1073
+ }
1074
+ )
1075
+ ] }),
1076
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default, {}),
1077
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start space-x-6", children: [
1078
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1079
+ Text_default,
1080
+ {
1081
+ size: "md",
1082
+ weight: "semibold",
1083
+ className: "text-text-700 w-20",
1084
+ children: "Descri\xE7\xE3o"
1085
+ }
1086
+ ),
1087
+ ticket.description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.description })
1088
+ ] })
1089
+ ] }),
1090
+ ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1091
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
1092
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AnswerSkeleton, {})
1093
+ ] }),
1094
+ !isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1095
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
1096
+ answers.filter((answer) => answer.userId !== userId).sort(
1097
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
1098
+ ).slice(0, 1).map((answer) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1099
+ "div",
1100
+ {
1101
+ className: "bg-background p-4 space-y-6 rounded-xl",
1102
+ children: [
1103
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1104
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1105
+ Text_default,
1106
+ {
1107
+ size: "md",
1108
+ weight: "semibold",
1109
+ className: "text-text-700 w-20",
1110
+ children: "Recebido"
1111
+ }
1112
+ ),
1113
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1114
+ Text_default,
1115
+ {
1116
+ size: "md",
1117
+ weight: "normal",
1118
+ className: "text-text-600",
1119
+ children: (0, import_dayjs.default)(answer.createdAt).format(
1120
+ "DD MMMM YYYY, [\xE0s] HH[h]"
1121
+ )
1122
+ }
1123
+ )
1124
+ ] }),
1125
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default, {}),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start space-x-6", children: [
1127
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1128
+ Text_default,
1129
+ {
1130
+ size: "md",
1131
+ weight: "semibold",
1132
+ className: "text-text-700 w-20",
1133
+ children: "Resposta"
1134
+ }
1135
+ ),
1136
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1137
+ Text_default,
1138
+ {
1139
+ size: "md",
1140
+ weight: "normal",
1141
+ className: "text-text-600",
1142
+ children: answer.answer
1143
+ }
1144
+ )
1145
+ ] })
1146
+ ]
1147
+ },
1148
+ answer.id
1149
+ ))
1150
+ ] }),
1151
+ !isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1152
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta enviada" }),
1153
+ answers.filter((answer) => answer.userId === userId).sort(
1154
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
1155
+ ).slice(0, 1).map((answer) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1156
+ "div",
1157
+ {
1158
+ className: "bg-background p-4 space-y-6 rounded-xl",
1159
+ children: [
1160
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center space-x-6", children: [
1161
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1162
+ Text_default,
1163
+ {
1164
+ size: "md",
1165
+ weight: "semibold",
1166
+ className: "text-text-700 w-20",
1167
+ children: "Enviada"
1168
+ }
1169
+ ),
1170
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1171
+ Text_default,
1172
+ {
1173
+ size: "md",
1174
+ weight: "normal",
1175
+ className: "text-text-600",
1176
+ children: (0, import_dayjs.default)(answer.createdAt).format(
1177
+ "DD MMMM YYYY, [\xE0s] HH[h]"
1178
+ )
1179
+ }
1180
+ )
1181
+ ] }),
1182
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default, {}),
1183
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start space-x-6", children: [
1184
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1185
+ Text_default,
1186
+ {
1187
+ size: "md",
1188
+ weight: "semibold",
1189
+ className: "text-text-700 w-20",
1190
+ children: "Resposta"
1191
+ }
1192
+ ),
1193
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1194
+ Text_default,
1195
+ {
1196
+ size: "md",
1197
+ weight: "normal",
1198
+ className: "text-text-600",
1199
+ children: answer.answer
1200
+ }
1201
+ )
1202
+ ] })
1203
+ ]
1204
+ },
1205
+ answer.id
1206
+ ))
1207
+ ] }),
1208
+ !isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1209
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 my-6", children: "Responder" }),
1210
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-4", children: [
1211
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1212
+ TextArea_default,
1213
+ {
1214
+ placeholder: "Detalhe o problema aqui.",
1215
+ rows: 4,
1216
+ className: "w-full",
1217
+ value: responseText,
1218
+ onChange: (e) => setResponseText(e.target.value)
1219
+ }
1220
+ ),
1221
+ responseText.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1222
+ Button_default,
1223
+ {
1224
+ variant: "solid",
1225
+ size: "medium",
1226
+ onClick: handleSubmitAnswer,
1227
+ disabled: isSubmittingAnswer,
1228
+ children: isSubmittingAnswer ? "Enviando..." : "Enviar"
1229
+ }
1230
+ ) })
1231
+ ] })
1232
+ ] })
1233
+ ] })
1234
+ ] })
1235
+ }
1236
+ ),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1238
+ Modal_default,
1239
+ {
1240
+ isOpen: showCloseConfirmation,
1241
+ onClose: () => setShowCloseConfirmation(false),
1242
+ title: "Encerrar pedido?",
1243
+ size: "md",
1244
+ hideCloseButton: false,
1245
+ closeOnEscape: true,
1246
+ "data-testid": "close-ticket-modal",
1247
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-6", children: [
1248
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-700", children: "Ao encerrar este pedido, ele ser\xE1 fechado e n\xE3o poder\xE1 mais ser atualizado." }),
1249
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-3 justify-end", children: [
1250
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1251
+ Button_default,
1252
+ {
1253
+ variant: "outline",
1254
+ size: "medium",
1255
+ onClick: () => setShowCloseConfirmation(false),
1256
+ children: "Cancelar"
1257
+ }
1258
+ ),
1259
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1260
+ Button_default,
1261
+ {
1262
+ variant: "solid",
1263
+ size: "medium",
1264
+ action: "negative",
1265
+ onClick: handleCloseTicket,
1266
+ children: "Encerrar"
1267
+ }
1268
+ )
1269
+ ] })
1270
+ ] })
1271
+ }
1272
+ )
1273
+ ] });
1274
+ };
1275
+ // Annotate the CommonJS export names for ESM import in node:
1276
+ 0 && (module.exports = {
1277
+ TicketModal
1278
+ });
1279
+ //# sourceMappingURL=index.js.map