xertica-ui 2.2.1 → 2.4.0

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 (708) hide show
  1. package/CHANGELOG.md +564 -525
  2. package/README.md +417 -382
  3. package/bin/cli.ts +1244 -748
  4. package/bin/generate-tokens.ts +262 -262
  5. package/bin/language-config.ts +5 -8
  6. package/components/assets/xertica-orbe-animation.ts +1162 -1162
  7. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  8. package/components/assistant/code-block/code-block.stories.tsx +57 -57
  9. package/components/assistant/code-block/code-block.test.tsx +44 -44
  10. package/components/assistant/code-block/index.ts +1 -1
  11. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  12. package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -51
  13. package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
  14. package/components/assistant/formatted-document/index.ts +1 -1
  15. package/components/assistant/index.ts +6 -6
  16. package/components/assistant/markdown-message/MarkdownMessage.tsx +152 -152
  17. package/components/assistant/markdown-message/index.ts +1 -1
  18. package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -50
  19. package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
  20. package/components/assistant/modern-chat-input/ModernChatInput.tsx +17 -7
  21. package/components/assistant/modern-chat-input/index.ts +1 -1
  22. package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +131 -131
  23. package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +79 -79
  24. package/components/assistant/xertica-assistant/index.ts +3 -3
  25. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  26. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -106
  27. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  28. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -78
  29. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  30. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -560
  31. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  32. package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -41
  33. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  34. package/components/assistant/xertica-assistant/parts/index.ts +16 -16
  35. package/components/assistant/xertica-assistant/types.ts +134 -134
  36. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  37. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +407 -407
  38. package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
  39. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -613
  40. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  41. package/components/blocks/card-patterns/FeatureCard.tsx +109 -109
  42. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +1 -6
  43. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  44. package/components/blocks/card-patterns/ProfileCard.tsx +112 -114
  45. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  46. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +1 -6
  47. package/components/blocks/card-patterns/QuickActionCard.tsx +68 -68
  48. package/components/blocks/card-patterns/card-patterns.mdx +123 -123
  49. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  50. package/components/blocks/card-patterns/index.ts +29 -29
  51. package/components/blocks/index.ts +1 -1
  52. package/components/brand/branding/branding.stories.tsx +57 -57
  53. package/components/brand/index.ts +6 -6
  54. package/components/brand/language-selector/index.ts +1 -1
  55. package/components/brand/language-selector/language-selector.mdx +126 -126
  56. package/components/brand/language-selector/language-selector.stories.tsx +1 -4
  57. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -70
  58. package/components/brand/theme-toggle/index.ts +1 -1
  59. package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -34
  60. package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
  61. package/components/brand/xertica-logo/XerticaLogo.stories.tsx +82 -82
  62. package/components/brand/xertica-logo/XerticaLogo.tsx +104 -104
  63. package/components/brand/xertica-logo/index.ts +1 -1
  64. package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
  65. package/components/brand/xertica-orbe/XerticaOrbe.tsx +1927 -1927
  66. package/components/brand/xertica-orbe/index.ts +1 -1
  67. package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -40
  68. package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
  69. package/components/brand/xertica-provider/XerticaProvider.tsx +1 -4
  70. package/components/brand/xertica-provider/index.ts +1 -1
  71. package/components/brand/xertica-provider/xertica-provider.test.tsx +74 -74
  72. package/components/brand/xertica-xlogo/XerticaXLogo.stories.tsx +79 -79
  73. package/components/brand/xertica-xlogo/XerticaXLogo.tsx +65 -65
  74. package/components/brand/xertica-xlogo/index.ts +1 -1
  75. package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
  76. package/components/examples/ApiKeyMapExample.tsx +71 -71
  77. package/components/examples/DrawingMapExample.tsx +565 -565
  78. package/components/examples/FilterableMapExample.tsx +393 -393
  79. package/components/examples/LocationPickerExample.tsx +348 -348
  80. package/components/examples/MapExamples.tsx +268 -268
  81. package/components/examples/MapGmpExample.tsx +169 -169
  82. package/components/examples/MapShowcase.tsx +471 -471
  83. package/components/examples/RouteMapExamples.tsx +329 -329
  84. package/components/examples/SidebarLogoExample.tsx +65 -65
  85. package/components/examples/SimpleFilterableMap.tsx +219 -219
  86. package/components/examples/index.ts +45 -45
  87. package/components/figma/ImageWithFallback.tsx +27 -27
  88. package/components/hooks/index.ts +13 -13
  89. package/components/hooks/use-layout-shortcuts.ts +43 -43
  90. package/components/index.ts +86 -90
  91. package/components/layout/header/header.stories.tsx +204 -204
  92. package/components/layout/header/header.test.tsx +75 -75
  93. package/components/layout/header/header.tsx +349 -349
  94. package/components/layout/header/index.ts +1 -1
  95. package/components/layout/index.ts +2 -2
  96. package/components/layout/sidebar/index.ts +3 -3
  97. package/components/layout/sidebar/sidebar.stories.tsx +586 -586
  98. package/components/layout/sidebar/sidebar.test.tsx +76 -76
  99. package/components/layout/sidebar/sidebar.tsx +1079 -1073
  100. package/components/layout/sidebar/use-sidebar.ts +104 -104
  101. package/components/media/FloatingMediaWrapper.tsx +371 -371
  102. package/components/media/audio-player/AudioPlayer.stories.tsx +124 -124
  103. package/components/media/audio-player/AudioPlayer.test.tsx +106 -106
  104. package/components/media/audio-player/AudioPlayer.tsx +767 -765
  105. package/components/media/audio-player/index.ts +1 -1
  106. package/components/media/audio-player/use-audio-player.ts +312 -312
  107. package/components/media/index.ts +3 -3
  108. package/components/media/video-player/VideoPlayer.stories.tsx +98 -98
  109. package/components/media/video-player/VideoPlayer.test.tsx +73 -73
  110. package/components/media/video-player/VideoPlayer.tsx +310 -310
  111. package/components/media/video-player/index.ts +1 -1
  112. package/components/pages/forgot-password-page/ForgotPasswordPage.stories.tsx +24 -24
  113. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  114. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +45 -45
  115. package/components/pages/forgot-password-page/index.ts +1 -1
  116. package/components/pages/home-content/HomeContent.stories.tsx +43 -43
  117. package/components/pages/home-content/HomeContent.tsx +120 -120
  118. package/components/pages/home-content/index.ts +1 -1
  119. package/components/pages/home-page/HomePage.stories.tsx +39 -39
  120. package/components/pages/home-page/HomePage.tsx +78 -74
  121. package/components/pages/home-page/home-page.test.tsx +53 -53
  122. package/components/pages/home-page/index.ts +1 -1
  123. package/components/pages/index.ts +8 -8
  124. package/components/pages/login-page/LoginPage.stories.tsx +39 -39
  125. package/components/pages/login-page/LoginPage.tsx +218 -216
  126. package/components/pages/login-page/index.ts +1 -1
  127. package/components/pages/login-page/login-page.test.tsx +63 -63
  128. package/components/pages/reset-password-page/ResetPasswordPage.stories.tsx +24 -24
  129. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -239
  130. package/components/pages/reset-password-page/index.ts +1 -1
  131. package/components/pages/template-content/TemplateContent.stories.tsx +43 -43
  132. package/components/pages/template-content/TemplateContent.tsx +1354 -1235
  133. package/components/pages/template-content/index.ts +1 -1
  134. package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
  135. package/components/pages/template-page/TemplatePage.tsx +62 -62
  136. package/components/pages/template-page/index.ts +1 -1
  137. package/components/pages/template-page/template-page.test.tsx +52 -52
  138. package/components/pages/verify-email-page/VerifyEmailPage.stories.tsx +41 -41
  139. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  140. package/components/pages/verify-email-page/index.ts +1 -1
  141. package/components/public-api-smoke.test.tsx +52 -52
  142. package/components/shared/CustomTooltipContent.tsx +48 -48
  143. package/components/shared/assistant-utils.test.ts +16 -16
  144. package/components/shared/assistant-utils.ts +225 -225
  145. package/components/shared/error-boundary.stories.tsx +114 -132
  146. package/components/shared/error-boundary.tsx +150 -154
  147. package/components/shared/error-fallbacks.tsx +222 -226
  148. package/components/shared/layout-constants.ts +8 -8
  149. package/components/shared/navigation.ts +35 -35
  150. package/components/shared/use-mobile.test.ts +16 -16
  151. package/components/shared/use-mobile.ts +36 -36
  152. package/components/shared/utils.test.ts +14 -14
  153. package/components/shared/utils.ts +6 -6
  154. package/components/ui/accordion/accordion.stories.tsx +105 -105
  155. package/components/ui/accordion/accordion.test.tsx +59 -59
  156. package/components/ui/accordion/accordion.tsx +77 -77
  157. package/components/ui/accordion/index.ts +1 -1
  158. package/components/ui/alert/alert.stories.tsx +86 -86
  159. package/components/ui/alert/alert.test.tsx +53 -53
  160. package/components/ui/alert/alert.tsx +93 -93
  161. package/components/ui/alert/index.ts +1 -1
  162. package/components/ui/alert-dialog/alert-dialog.stories.tsx +84 -84
  163. package/components/ui/alert-dialog/alert-dialog.test.tsx +70 -70
  164. package/components/ui/alert-dialog/alert-dialog.tsx +149 -149
  165. package/components/ui/alert-dialog/index.ts +1 -1
  166. package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +46 -46
  167. package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
  168. package/components/ui/aspect-ratio/aspect-ratio.tsx +20 -20
  169. package/components/ui/aspect-ratio/index.ts +1 -1
  170. package/components/ui/assistant-chart/AssistantChart.tsx +64 -64
  171. package/components/ui/assistant-chart/assistant-chart.stories.tsx +44 -44
  172. package/components/ui/assistant-chart/assistant-chart.test.tsx +46 -46
  173. package/components/ui/assistant-chart/index.ts +1 -1
  174. package/components/ui/avatar/avatar.stories.tsx +86 -86
  175. package/components/ui/avatar/avatar.test.tsx +55 -55
  176. package/components/ui/avatar/avatar.tsx +71 -71
  177. package/components/ui/avatar/index.ts +1 -1
  178. package/components/ui/badge/badge.stories.tsx +72 -72
  179. package/components/ui/badge/badge.test.tsx +40 -40
  180. package/components/ui/badge/badge.tsx +58 -58
  181. package/components/ui/badge/index.ts +1 -1
  182. package/components/ui/breadcrumb/breadcrumb.stories.tsx +123 -123
  183. package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
  184. package/components/ui/breadcrumb/breadcrumb.tsx +114 -114
  185. package/components/ui/breadcrumb/index.ts +1 -1
  186. package/components/ui/button/button.stories.tsx +183 -183
  187. package/components/ui/button/button.test.tsx +64 -64
  188. package/components/ui/button/button.tsx +98 -98
  189. package/components/ui/button/index.ts +1 -1
  190. package/components/ui/calendar/calendar.stories.tsx +108 -108
  191. package/components/ui/calendar/calendar.test.tsx +53 -53
  192. package/components/ui/calendar/calendar.tsx +230 -230
  193. package/components/ui/calendar/index.ts +1 -1
  194. package/components/ui/card/card.stories.tsx +301 -301
  195. package/components/ui/card/card.test.tsx +55 -55
  196. package/components/ui/card/card.tsx +83 -83
  197. package/components/ui/card/index.ts +1 -1
  198. package/components/ui/carousel/carousel.stories.tsx +80 -80
  199. package/components/ui/carousel/carousel.test.tsx +75 -75
  200. package/components/ui/carousel/carousel.tsx +242 -242
  201. package/components/ui/carousel/index.ts +1 -1
  202. package/components/ui/chart/chart.stories.tsx +1328 -1328
  203. package/components/ui/chart/chart.test.tsx +178 -178
  204. package/components/ui/chart/chart.tsx +2232 -2232
  205. package/components/ui/chart/index.ts +1 -1
  206. package/components/ui/checkbox/checkbox.stories.tsx +109 -109
  207. package/components/ui/checkbox/checkbox.test.tsx +49 -49
  208. package/components/ui/checkbox/checkbox.tsx +68 -68
  209. package/components/ui/checkbox/index.ts +1 -1
  210. package/components/ui/collapsible/collapsible.stories.tsx +45 -45
  211. package/components/ui/collapsible/collapsible.test.tsx +51 -51
  212. package/components/ui/collapsible/collapsible.tsx +32 -32
  213. package/components/ui/collapsible/index.ts +1 -1
  214. package/components/ui/command/command.stories.tsx +134 -134
  215. package/components/ui/command/command.test.tsx +48 -48
  216. package/components/ui/command/command.tsx +163 -163
  217. package/components/ui/command/index.ts +1 -1
  218. package/components/ui/context-menu/context-menu.stories.tsx +76 -76
  219. package/components/ui/context-menu/context-menu.test.tsx +61 -61
  220. package/components/ui/context-menu/context-menu.tsx +236 -236
  221. package/components/ui/context-menu/index.ts +1 -1
  222. package/components/ui/dialog/dialog.stories.tsx +174 -174
  223. package/components/ui/dialog/dialog.test.tsx +78 -78
  224. package/components/ui/dialog/dialog.tsx +189 -189
  225. package/components/ui/dialog/index.ts +1 -1
  226. package/components/ui/drawer/drawer.stories.tsx +71 -71
  227. package/components/ui/drawer/drawer.test.tsx +67 -67
  228. package/components/ui/drawer/drawer.tsx +146 -146
  229. package/components/ui/drawer/index.ts +1 -1
  230. package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +156 -156
  231. package/components/ui/dropdown-menu/dropdown-menu.test.tsx +62 -62
  232. package/components/ui/dropdown-menu/dropdown-menu.tsx +240 -240
  233. package/components/ui/dropdown-menu/index.ts +1 -1
  234. package/components/ui/empty/empty.stories.tsx +85 -85
  235. package/components/ui/empty/empty.test.tsx +31 -31
  236. package/components/ui/empty/empty.tsx +88 -88
  237. package/components/ui/empty/index.ts +1 -1
  238. package/components/ui/file-upload/file-upload.stories.tsx +144 -144
  239. package/components/ui/file-upload/file-upload.test.tsx +65 -65
  240. package/components/ui/file-upload/file-upload.tsx +142 -142
  241. package/components/ui/file-upload/index.ts +2 -2
  242. package/components/ui/file-upload/use-file-upload.ts +177 -177
  243. package/components/ui/form/form.stories.tsx +85 -85
  244. package/components/ui/form/form.test.tsx +75 -75
  245. package/components/ui/form/form.tsx +163 -163
  246. package/components/ui/form/index.ts +1 -1
  247. package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
  248. package/components/ui/google-maps-loader/google-maps-loader.tsx +465 -465
  249. package/components/ui/google-maps-loader/index.ts +1 -1
  250. package/components/ui/hover-card/hover-card.stories.tsx +61 -61
  251. package/components/ui/hover-card/hover-card.test.tsx +48 -48
  252. package/components/ui/hover-card/hover-card.tsx +50 -50
  253. package/components/ui/hover-card/index.ts +1 -1
  254. package/components/ui/index.ts +400 -400
  255. package/components/ui/input/index.ts +1 -1
  256. package/components/ui/input/input.stories.tsx +153 -153
  257. package/components/ui/input/input.test.tsx +47 -47
  258. package/components/ui/input/input.tsx +57 -57
  259. package/components/ui/input-otp/index.ts +1 -1
  260. package/components/ui/input-otp/input-otp.stories.tsx +120 -120
  261. package/components/ui/input-otp/input-otp.test.tsx +74 -74
  262. package/components/ui/input-otp/input-otp.tsx +101 -101
  263. package/components/ui/label/index.ts +1 -1
  264. package/components/ui/label/label.stories.tsx +74 -74
  265. package/components/ui/label/label.test.tsx +45 -45
  266. package/components/ui/label/label.tsx +53 -53
  267. package/components/ui/map/index.ts +1 -1
  268. package/components/ui/map/map.stories.tsx +86 -86
  269. package/components/ui/map/map.test.tsx +82 -82
  270. package/components/ui/map/map.tsx +506 -506
  271. package/components/ui/map/mock.test.tsx +13 -13
  272. package/components/ui/map-config/index.ts +1 -1
  273. package/components/ui/map-config/map-config.ts +18 -18
  274. package/components/ui/map-layers/index.ts +1 -1
  275. package/components/ui/map-layers/map-layers.test.tsx +48 -48
  276. package/components/ui/map-layers/map-layers.tsx +126 -126
  277. package/components/ui/map.exports/index.ts +1 -1
  278. package/components/ui/map.exports/map.exports.ts +31 -31
  279. package/components/ui/menubar/index.ts +1 -1
  280. package/components/ui/menubar/menubar.stories.tsx +130 -130
  281. package/components/ui/menubar/menubar.test.tsx +53 -53
  282. package/components/ui/menubar/menubar.tsx +265 -265
  283. package/components/ui/navigation-menu/index.ts +1 -1
  284. package/components/ui/navigation-menu/navigation-menu.stories.tsx +126 -126
  285. package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
  286. package/components/ui/navigation-menu/navigation-menu.tsx +165 -165
  287. package/components/ui/notification-badge/index.ts +1 -1
  288. package/components/ui/notification-badge/notification-badge.stories.tsx +66 -66
  289. package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
  290. package/components/ui/notification-badge/notification-badge.tsx +91 -91
  291. package/components/ui/page-header/index.ts +1 -1
  292. package/components/ui/page-header/page-header.stories.tsx +69 -69
  293. package/components/ui/page-header/page-header.test.tsx +37 -37
  294. package/components/ui/page-header/page-header.tsx +124 -124
  295. package/components/ui/pagination/index.ts +3 -3
  296. package/components/ui/pagination/pagination.stories.tsx +210 -210
  297. package/components/ui/pagination/pagination.test.tsx +63 -63
  298. package/components/ui/pagination/pagination.tsx +140 -140
  299. package/components/ui/pagination/use-pagination.ts +173 -173
  300. package/components/ui/popover/index.ts +1 -1
  301. package/components/ui/popover/popover.stories.tsx +73 -73
  302. package/components/ui/popover/popover.test.tsx +48 -48
  303. package/components/ui/popover/popover.tsx +54 -54
  304. package/components/ui/progress/index.ts +1 -1
  305. package/components/ui/progress/progress.stories.tsx +55 -55
  306. package/components/ui/progress/progress.test.tsx +23 -23
  307. package/components/ui/progress/progress.tsx +68 -68
  308. package/components/ui/radio-group/index.ts +1 -1
  309. package/components/ui/radio-group/radio-group.stories.tsx +114 -114
  310. package/components/ui/radio-group/radio-group.test.tsx +78 -78
  311. package/components/ui/radio-group/radio-group.tsx +93 -93
  312. package/components/ui/rating/index.ts +1 -1
  313. package/components/ui/rating/rating.stories.tsx +50 -50
  314. package/components/ui/rating/rating.test.tsx +48 -48
  315. package/components/ui/rating/rating.tsx +145 -145
  316. package/components/ui/resizable/index.ts +1 -1
  317. package/components/ui/resizable/resizable.stories.tsx +88 -88
  318. package/components/ui/resizable/resizable.test.tsx +61 -61
  319. package/components/ui/resizable/resizable.tsx +452 -452
  320. package/components/ui/rich-text-editor/index.ts +7 -7
  321. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +290 -290
  322. package/components/ui/rich-text-editor/rich-text-editor.test.tsx +86 -86
  323. package/components/ui/rich-text-editor/rich-text-editor.tsx +634 -634
  324. package/components/ui/rich-text-editor/use-rich-text-editor.ts +453 -453
  325. package/components/ui/route-map/index.ts +1 -1
  326. package/components/ui/route-map/route-map.stories.tsx +48 -48
  327. package/components/ui/route-map/route-map.test.tsx +108 -108
  328. package/components/ui/route-map/route-map.tsx +349 -349
  329. package/components/ui/scroll-area/index.ts +1 -1
  330. package/components/ui/scroll-area/scroll-area.stories.tsx +31 -31
  331. package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
  332. package/components/ui/scroll-area/scroll-area.tsx +70 -70
  333. package/components/ui/search/index.ts +1 -1
  334. package/components/ui/search/search.stories.tsx +107 -107
  335. package/components/ui/search/search.test.tsx +67 -67
  336. package/components/ui/search/search.tsx +141 -141
  337. package/components/ui/select/index.ts +1 -1
  338. package/components/ui/select/select.stories.tsx +163 -163
  339. package/components/ui/select/select.test.tsx +99 -99
  340. package/components/ui/select/select.tsx +195 -195
  341. package/components/ui/separator/index.ts +1 -1
  342. package/components/ui/separator/separator.stories.tsx +55 -55
  343. package/components/ui/separator/separator.test.tsx +23 -23
  344. package/components/ui/separator/separator.tsx +39 -39
  345. package/components/ui/sheet/index.ts +1 -1
  346. package/components/ui/sheet/sheet.stories.tsx +93 -93
  347. package/components/ui/sheet/sheet.test.tsx +62 -62
  348. package/components/ui/sheet/sheet.tsx +149 -149
  349. package/components/ui/simple-map/index.ts +1 -1
  350. package/components/ui/simple-map/simple-map.stories.tsx +44 -44
  351. package/components/ui/simple-map/simple-map.test.tsx +36 -36
  352. package/components/ui/simple-map/simple-map.tsx +92 -92
  353. package/components/ui/skeleton/index.ts +1 -1
  354. package/components/ui/skeleton/skeleton.stories.tsx +36 -36
  355. package/components/ui/skeleton/skeleton.test.tsx +19 -19
  356. package/components/ui/skeleton/skeleton.tsx +25 -25
  357. package/components/ui/slider/index.ts +1 -1
  358. package/components/ui/slider/slider.stories.tsx +44 -44
  359. package/components/ui/slider/slider.test.tsx +25 -25
  360. package/components/ui/slider/slider.tsx +66 -66
  361. package/components/ui/sonner/index.ts +1 -1
  362. package/components/ui/sonner/sonner.stories.tsx +41 -41
  363. package/components/ui/sonner/sonner.test.tsx +24 -24
  364. package/components/ui/sonner/sonner.tsx +74 -74
  365. package/components/ui/stats-card/index.ts +2 -2
  366. package/components/ui/stats-card/stats-card-skeleton.tsx +1 -3
  367. package/components/ui/stats-card/stats-card.stories.tsx +99 -99
  368. package/components/ui/stats-card/stats-card.test.tsx +34 -34
  369. package/components/ui/stats-card/stats-card.tsx +93 -93
  370. package/components/ui/stepper/index.ts +3 -3
  371. package/components/ui/stepper/stepper.stories.tsx +171 -171
  372. package/components/ui/stepper/stepper.test.tsx +47 -47
  373. package/components/ui/stepper/stepper.tsx +190 -190
  374. package/components/ui/stepper/use-stepper.ts +139 -139
  375. package/components/ui/switch/index.ts +1 -1
  376. package/components/ui/switch/switch.stories.tsx +93 -93
  377. package/components/ui/switch/switch.test.tsx +44 -44
  378. package/components/ui/switch/switch.tsx +70 -70
  379. package/components/ui/table/index.ts +1 -1
  380. package/components/ui/table/table.stories.tsx +114 -114
  381. package/components/ui/table/table.test.tsx +43 -43
  382. package/components/ui/table/table.tsx +104 -104
  383. package/components/ui/tabs/index.ts +1 -1
  384. package/components/ui/tabs/tabs.stories.tsx +140 -140
  385. package/components/ui/tabs/tabs.test.tsx +50 -50
  386. package/components/ui/tabs/tabs.tsx +66 -66
  387. package/components/ui/textarea/index.ts +1 -1
  388. package/components/ui/textarea/textarea.stories.tsx +69 -69
  389. package/components/ui/textarea/textarea.test.tsx +41 -41
  390. package/components/ui/textarea/textarea.tsx +61 -61
  391. package/components/ui/timeline/index.ts +1 -1
  392. package/components/ui/timeline/timeline.stories.tsx +97 -97
  393. package/components/ui/timeline/timeline.test.tsx +53 -53
  394. package/components/ui/timeline/timeline.tsx +124 -124
  395. package/components/ui/toggle/index.ts +1 -1
  396. package/components/ui/toggle/toggle.stories.tsx +56 -56
  397. package/components/ui/toggle/toggle.test.tsx +32 -32
  398. package/components/ui/toggle/toggle.tsx +55 -55
  399. package/components/ui/toggle-group/index.ts +1 -1
  400. package/components/ui/toggle-group/toggle-group.stories.tsx +66 -66
  401. package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
  402. package/components/ui/toggle-group/toggle-group.tsx +79 -79
  403. package/components/ui/tooltip/index.ts +1 -1
  404. package/components/ui/tooltip/tooltip.stories.tsx +83 -83
  405. package/components/ui/tooltip/tooltip.test.tsx +39 -39
  406. package/components/ui/tooltip/tooltip.tsx +69 -69
  407. package/components/ui/tree-view/index.ts +4 -4
  408. package/components/ui/tree-view/tree-view.stories.tsx +154 -154
  409. package/components/ui/tree-view/tree-view.test.tsx +58 -58
  410. package/components/ui/tree-view/tree-view.tsx +171 -171
  411. package/components/ui/tree-view/use-tree-view.ts +237 -237
  412. package/components.json +892 -892
  413. package/contexts/ApiKeyContext.test.tsx +26 -26
  414. package/contexts/ApiKeyContext.tsx +196 -196
  415. package/contexts/AssistenteContext.test.tsx +17 -17
  416. package/contexts/AssistenteContext.tsx +113 -113
  417. package/contexts/AuthContext.tsx +121 -118
  418. package/contexts/BrandColorsContext.test.tsx +21 -21
  419. package/contexts/BrandColorsContext.tsx +251 -251
  420. package/contexts/LanguageContext.tsx +1 -2
  421. package/contexts/LayoutContext.test.tsx +29 -29
  422. package/contexts/LayoutContext.tsx +140 -140
  423. package/contexts/ThemeContext.test.tsx +38 -38
  424. package/contexts/ThemeContext.tsx +111 -111
  425. package/contexts/index.ts +8 -8
  426. package/contexts/theme-data.ts +340 -340
  427. package/dist/AssistantChart-COGiOV-g.cjs +3541 -0
  428. package/dist/AssistantChart-CWX1OWNM.js +3373 -0
  429. package/dist/AudioPlayer-9psiEucT.cjs +1282 -0
  430. package/dist/AudioPlayer-Dp2bD1Gk.js +1278 -0
  431. package/dist/BrandColorsContext-DZT7JjeD.js +659 -0
  432. package/dist/BrandColorsContext-awnBCmC4.cjs +666 -0
  433. package/dist/CodeBlock-DYkTfR0f.js +221 -0
  434. package/dist/CodeBlock-EOvp9cVu.cjs +223 -0
  435. package/dist/CustomTooltipContent-BhdIeBEg.cjs +54 -0
  436. package/dist/CustomTooltipContent-CNbVB2NS.js +33 -0
  437. package/dist/FeatureCard-BZ4CYxFf.cjs +497 -0
  438. package/dist/FeatureCard-DNycVGwT.js +485 -0
  439. package/dist/FeatureCardSkeleton-DZqc96mt.js +27 -0
  440. package/dist/FeatureCardSkeleton-pTa0YNKP.cjs +29 -0
  441. package/dist/LayoutContext-BEq_-n98.cjs +96 -0
  442. package/dist/LayoutContext-DNl1xSoX.js +92 -0
  443. package/dist/ThemeContext-CMD3z2Dz.cjs +1930 -0
  444. package/dist/ThemeContext-x_F2zsnv.js +1923 -0
  445. package/dist/VerifyEmailPage-BJjAMUTW.js +3223 -0
  446. package/dist/VerifyEmailPage-Bv8Ah_TK.cjs +3235 -0
  447. package/dist/VerifyEmailPage-CkBYfsNy.cjs +3232 -0
  448. package/dist/VerifyEmailPage-Cyl55sJb.js +3226 -0
  449. package/dist/VerifyEmailPage-X14vhdyl.js +3296 -0
  450. package/dist/VerifyEmailPage-u_Dn7t1U.cjs +3305 -0
  451. package/dist/XerticaOrbe-Uk2JML1-.cjs +1927 -0
  452. package/dist/XerticaOrbe-jA5T2iOk.js +1925 -0
  453. package/dist/XerticaProvider-BErr83Bg.js +42 -0
  454. package/dist/XerticaProvider-CwOkHxiT.cjs +44 -0
  455. package/dist/XerticaProvider-DUOJg9iX.js +49 -0
  456. package/dist/XerticaProvider-Dl_b72_l.cjs +51 -0
  457. package/dist/XerticaXLogo-BX3ueACh.js +255 -0
  458. package/dist/XerticaXLogo-mqjoBiLI.js +252 -0
  459. package/dist/XerticaXLogo-qBPhwK3g.cjs +260 -0
  460. package/dist/XerticaXLogo-uQgwns_E.cjs +257 -0
  461. package/dist/alert-dialog-DhwPioBa.cjs +885 -0
  462. package/dist/alert-dialog-DqlRW_An.js +831 -0
  463. package/dist/assistant.cjs.js +8 -4
  464. package/dist/assistant.es.js +5 -11
  465. package/dist/avatar-3kO2Anrp.js +54 -0
  466. package/dist/avatar-BCM7YQRC.cjs +77 -0
  467. package/dist/blocks.cjs.js +9 -4
  468. package/dist/blocks.es.js +2 -16
  469. package/dist/brand.cjs.js +10 -5
  470. package/dist/brand.es.js +3 -11
  471. package/dist/breadcrumb-BKtHF4gk.cjs +98 -0
  472. package/dist/breadcrumb-ifNsA7Zl.js +90 -0
  473. package/dist/button-0BlA47It.cjs +85 -0
  474. package/dist/button-DZHzN1Gd.js +62 -0
  475. package/dist/cli.js +471 -93
  476. package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +1 -1
  477. package/dist/components/index.d.ts +1 -1
  478. package/dist/dropdown-menu-BMcykFDf.cjs +225 -0
  479. package/dist/dropdown-menu-Dn_eV2Xb.js +190 -0
  480. package/dist/google-maps-loader-BCe58h9D.js +308 -0
  481. package/dist/google-maps-loader-casMyxlo.cjs +316 -0
  482. package/dist/hooks.cjs.js +12 -8
  483. package/dist/hooks.es.js +10 -27
  484. package/dist/index-9GWd0qxq.cjs +12 -0
  485. package/dist/index-BabBx2pa.js +6 -0
  486. package/dist/index.cjs.js +37 -32
  487. package/dist/index.es.js +30 -363
  488. package/dist/input-C_UiS2Py.cjs +152 -0
  489. package/dist/input-cc-PTD4R.js +123 -0
  490. package/dist/layout.cjs.js +10 -6
  491. package/dist/layout.es.js +7 -9
  492. package/dist/media.cjs.js +8 -3
  493. package/dist/media.es.js +1 -6
  494. package/dist/pages.cjs.js +8 -3
  495. package/dist/pages.es.js +1 -11
  496. package/dist/progress-C7Lti5wo.js +80 -0
  497. package/dist/progress-Cqwxbqs1.cjs +103 -0
  498. package/dist/rich-text-editor-DqLICivI.js +2832 -0
  499. package/dist/rich-text-editor-DxO1Hz3a.cjs +2903 -0
  500. package/dist/select-CH6v_KcQ.cjs +161 -0
  501. package/dist/select-D-xvCZK2.js +130 -0
  502. package/dist/sidebar-3XyzjVBw.js +792 -0
  503. package/dist/sidebar-B4ZWaMrE.js +792 -0
  504. package/dist/sidebar-BS1p2V7t.cjs +795 -0
  505. package/dist/sidebar-DyYvgyBj.cjs +795 -0
  506. package/dist/skeleton-DjiHerJn.cjs +87 -0
  507. package/dist/skeleton-DtR5tkYe.js +78 -0
  508. package/dist/slider-B00b9SVK.cjs +78 -0
  509. package/dist/slider-DQCNUUMj.js +56 -0
  510. package/dist/sonner-B-jWlik1.cjs +68 -0
  511. package/dist/sonner-C9tiqj4f.js +47 -0
  512. package/dist/tooltip-D8n9UYoU.cjs +72 -0
  513. package/dist/tooltip-RtbSmPYJ.js +48 -0
  514. package/dist/ui.cjs.js +23 -18
  515. package/dist/ui.es.js +16 -303
  516. package/dist/use-audio-player-B78fd2ct.js +188 -0
  517. package/dist/use-audio-player-DGvhPrgR.cjs +190 -0
  518. package/dist/use-mobile-BdXTRb0Z.cjs +51 -0
  519. package/dist/use-mobile-Ce2cBAQe.js +29 -0
  520. package/dist/xertica-assistant-B1NaSFFj.js +2173 -0
  521. package/dist/xertica-assistant-B687qEPU.js +2165 -0
  522. package/dist/xertica-assistant-CIaUlbIt.cjs +2180 -0
  523. package/dist/xertica-assistant-sOHwTgIP.cjs +2172 -0
  524. package/dist/xertica-ui.css +1 -1
  525. package/docs/ai-usage.md +195 -195
  526. package/docs/architecture-improvements.md +456 -456
  527. package/docs/architecture.md +312 -306
  528. package/docs/components/accordion.md +109 -109
  529. package/docs/components/alert-dialog.md +127 -127
  530. package/docs/components/alert.md +106 -106
  531. package/docs/components/aspect-ratio.md +58 -58
  532. package/docs/components/assistant-chart.md +47 -47
  533. package/docs/components/assistant.md +428 -426
  534. package/docs/components/audio-player.md +167 -167
  535. package/docs/components/avatar.md +101 -101
  536. package/docs/components/badge.md +84 -84
  537. package/docs/components/branding.md +252 -252
  538. package/docs/components/breadcrumb.md +104 -104
  539. package/docs/components/button.md +156 -156
  540. package/docs/components/calendar.md +141 -141
  541. package/docs/components/card-patterns.md +447 -445
  542. package/docs/components/card.md +245 -245
  543. package/docs/components/carousel.md +100 -100
  544. package/docs/components/chart.md +638 -638
  545. package/docs/components/checkbox.md +88 -88
  546. package/docs/components/code-block.md +105 -105
  547. package/docs/components/collapsible.md +86 -86
  548. package/docs/components/command.md +113 -113
  549. package/docs/components/context-menu.md +81 -81
  550. package/docs/components/dialog.md +198 -198
  551. package/docs/components/drawer.md +105 -105
  552. package/docs/components/dropdown-menu.md +127 -127
  553. package/docs/components/empty.md +127 -127
  554. package/docs/components/error-boundary.md +201 -191
  555. package/docs/components/file-upload.md +189 -189
  556. package/docs/components/floating-media-wrapper.md +63 -63
  557. package/docs/components/form.md +177 -177
  558. package/docs/components/formatted-document.md +105 -105
  559. package/docs/components/google-maps-loader.md +44 -44
  560. package/docs/components/header.md +177 -177
  561. package/docs/components/hooks.md +432 -430
  562. package/docs/components/hover-card.md +86 -86
  563. package/docs/components/image-with-fallback.md +107 -107
  564. package/docs/components/input-otp.md +95 -95
  565. package/docs/components/input.md +130 -130
  566. package/docs/components/label.md +69 -69
  567. package/docs/components/language-selector.md +20 -16
  568. package/docs/components/map-layers.md +138 -138
  569. package/docs/components/map.md +84 -84
  570. package/docs/components/markdown-message.md +47 -47
  571. package/docs/components/menubar.md +89 -89
  572. package/docs/components/modern-chat-input.md +164 -164
  573. package/docs/components/navigation-menu.md +83 -83
  574. package/docs/components/notification-badge.md +78 -78
  575. package/docs/components/page-header.md +93 -93
  576. package/docs/components/pages.md +323 -309
  577. package/docs/components/pagination.md +334 -334
  578. package/docs/components/popover.md +116 -116
  579. package/docs/components/progress.md +103 -103
  580. package/docs/components/radio-group.md +133 -133
  581. package/docs/components/rating.md +77 -77
  582. package/docs/components/resizable.md +84 -84
  583. package/docs/components/rich-text-editor.md +255 -255
  584. package/docs/components/route-map.md +124 -124
  585. package/docs/components/scroll-area.md +58 -58
  586. package/docs/components/search.md +87 -87
  587. package/docs/components/select.md +144 -144
  588. package/docs/components/separator.md +58 -58
  589. package/docs/components/sheet.md +122 -122
  590. package/docs/components/sidebar.md +314 -314
  591. package/docs/components/simple-map.md +51 -51
  592. package/docs/components/skeleton.md +99 -99
  593. package/docs/components/slider.md +84 -84
  594. package/docs/components/sonner.md +115 -115
  595. package/docs/components/stats-card.md +120 -120
  596. package/docs/components/stepper.md +268 -268
  597. package/docs/components/switch.md +106 -106
  598. package/docs/components/table.md +138 -138
  599. package/docs/components/tabs.md +117 -117
  600. package/docs/components/textarea.md +86 -86
  601. package/docs/components/theme-toggle.md +73 -73
  602. package/docs/components/timeline.md +121 -121
  603. package/docs/components/toggle-group.md +68 -68
  604. package/docs/components/toggle.md +62 -62
  605. package/docs/components/tooltip.md +116 -116
  606. package/docs/components/tree-view.md +238 -238
  607. package/docs/components/use-mobile.md +96 -96
  608. package/docs/components/video-player.md +68 -68
  609. package/docs/components/xertica-logo.md +36 -36
  610. package/docs/components/xertica-orbe.md +35 -35
  611. package/docs/components/xertica-provider.md +65 -65
  612. package/docs/components/xertica-xlogo.md +35 -35
  613. package/docs/decision-tree.md +293 -293
  614. package/docs/doc-audit.md +244 -243
  615. package/docs/form-sizing.md +162 -162
  616. package/docs/getting-started.md +616 -591
  617. package/docs/guidelines.md +330 -328
  618. package/docs/i18n.md +61 -57
  619. package/docs/installation.md +268 -267
  620. package/docs/layout.md +143 -143
  621. package/docs/llms.md +295 -295
  622. package/docs/patterns/analytics.md +194 -194
  623. package/docs/patterns/crud.md +149 -149
  624. package/docs/patterns/dashboard.md +138 -138
  625. package/docs/patterns/detail-page.md +296 -296
  626. package/docs/patterns/form.md +241 -241
  627. package/docs/patterns/login.md +156 -156
  628. package/docs/patterns/settings.md +368 -368
  629. package/docs/patterns/wizard.md +213 -213
  630. package/docs/state-management.md +289 -289
  631. package/guidelines/Guidelines.md +409 -406
  632. package/hooks/useTheme.test.tsx +16 -16
  633. package/hooks/useTheme.ts +4 -4
  634. package/imports/Podcast.tsx +540 -540
  635. package/imports/XerticaAi.tsx +46 -46
  636. package/imports/XerticaX.tsx +15 -15
  637. package/imports/svg-aueiaqngck.ts +20 -20
  638. package/imports/svg-v9krss1ozd.ts +23 -23
  639. package/imports/svg-vhrdofe3qe.ts +6 -6
  640. package/llms-compact.txt +2 -1
  641. package/llms.txt +2 -1
  642. package/mcp/resources.json +22 -22
  643. package/mcp/tools.json +35 -35
  644. package/package.json +219 -213
  645. package/scripts/ai-validator.ts +91 -91
  646. package/scripts/cleanup-case-dupes.ts +62 -62
  647. package/scripts/generate-ai-manifests.ts +107 -107
  648. package/styles/globals.css +13 -13
  649. package/styles/xertica/app-overrides/chat.css +61 -61
  650. package/styles/xertica/app-overrides/scrollbar.css +33 -33
  651. package/styles/xertica/base.css +90 -71
  652. package/styles/xertica/integrations/google-maps.css +76 -76
  653. package/styles/xertica/integrations/sonner.css +73 -73
  654. package/styles/xertica/theme-map.css +102 -99
  655. package/styles/xertica/tokens.css +240 -236
  656. package/templates/CLAUDE.md +16 -1
  657. package/templates/eslint.config.js +26 -26
  658. package/templates/guidelines/Guidelines.md +577 -553
  659. package/templates/package.json +69 -69
  660. package/templates/postcss.config.js +6 -6
  661. package/templates/src/app/App.tsx +46 -46
  662. package/templates/src/app/components/AppLayout.tsx +55 -55
  663. package/templates/src/app/components/AuthGuard.tsx +131 -82
  664. package/templates/src/app/context/AuthContext.tsx +108 -108
  665. package/templates/src/features/assistant/index.ts +5 -5
  666. package/templates/src/features/auth/index.ts +4 -4
  667. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  668. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -72
  669. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  670. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +6 -2
  671. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  672. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +2 -6
  673. package/templates/src/features/home/data/mock.ts +41 -35
  674. package/templates/src/features/home/index.ts +11 -11
  675. package/templates/src/features/home/store/dashboardStore.ts +25 -25
  676. package/templates/src/features/home/ui/HomeContent.tsx +117 -119
  677. package/templates/src/features/template/index.ts +5 -5
  678. package/templates/src/features/template/ui/CrudTemplate.tsx +1 -4
  679. package/templates/src/features/template/ui/LoginTemplate.tsx +1 -1
  680. package/templates/src/features/template/ui/TemplateContent.tsx +29 -21
  681. package/templates/src/locales/en/pages/templates.json +17 -17
  682. package/templates/src/locales/es/pages/templates.json +17 -17
  683. package/templates/src/locales/pt-BR/pages/templates.json +17 -17
  684. package/templates/src/main.tsx +11 -11
  685. package/templates/src/pages/AssistantPage.tsx +26 -20
  686. package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
  687. package/templates/src/pages/HomePage.tsx +53 -49
  688. package/templates/src/pages/LoginPage.tsx +10 -10
  689. package/templates/src/pages/ResetPasswordPage.tsx +6 -6
  690. package/templates/src/pages/TemplatePage.tsx +28 -28
  691. package/templates/src/pages/VerifyEmailPage.tsx +6 -6
  692. package/templates/src/shared/config/navigation.ts +19 -19
  693. package/templates/src/shared/error-boundary.tsx +150 -154
  694. package/templates/src/shared/error-fallbacks.tsx +222 -226
  695. package/templates/src/shared/lib/auth.ts +20 -20
  696. package/templates/src/shared/types/auth.ts +3 -3
  697. package/templates/src/styles/index.css +95 -95
  698. package/templates/src/styles/xertica/tokens.css +240 -236
  699. package/templates/tsconfig.json +25 -25
  700. package/templates/tsconfig.node.json +12 -12
  701. package/templates/vite-env.d.ts +1 -1
  702. package/templates/vite.config.js +20 -20
  703. package/templates/vite.config.ts +54 -51
  704. package/utils/color-utils.ts +72 -72
  705. package/utils/demo-responses.test.ts +10 -10
  706. package/utils/demo-responses.ts +151 -151
  707. package/utils/gemini.test.ts +25 -25
  708. package/utils/gemini.ts +155 -155
@@ -0,0 +1,3223 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import React__default, { useState, createContext, useContext, useMemo, useRef, useCallback, useEffect } from 'react';
3
+ import { B as Button, c as cn } from './button-DZHzN1Gd.js';
4
+ import { I as Input, S as ScrollArea } from './input-cc-PTD4R.js';
5
+ import { I as ImageWithFallback, L as Label, P as PageHeader, M as Map, C as Checkbox, S as Separator, T as Tabs, p as TabsList, q as TabsTrigger, o as TabsContent, n as Switch, R as RadioGroup, m as RadioGroupItem, A as AlertDialog, j as AlertDialogTrigger, c as AlertDialogContent, f as AlertDialogHeader, i as AlertDialogTitle, d as AlertDialogDescription, e as AlertDialogFooter, b as AlertDialogCancel, a as AlertDialogAction } from './alert-dialog-DqlRW_An.js';
6
+ import { L as LanguageSelector, X as XerticaLogo } from './XerticaXLogo-mqjoBiLI.js';
7
+ import { ArrowLeft, Lock, FileText, Home, CheckCircle2, AlertCircle, Coffee, ShoppingBag, Landmark, Hotel, Utensils, MapPin, Filter, X, MousePointer2, Circle, Square, Hexagon, Undo, Trash2, Save, Check, Pencil, Layers, Settings, Users, Mail, Phone, Search, User, Calendar, Bell, FileEdit, ArrowRightLeft, Clock, Plus, Archive, Map as Map$1 } from 'lucide-react';
8
+ import { useNavigate, Link, useLocation } from 'react-router-dom';
9
+ import { H as Header, S as Sidebar } from './sidebar-3XyzjVBw.js';
10
+ import { C as Card, e as CardHeader, f as CardTitle, b as CardContent, d as CardFooter, c as CardDescription, S as Skeleton } from './skeleton-DtR5tkYe.js';
11
+ import { B as Badge, P as Progress } from './progress-C7Lti5wo.js';
12
+ import { a as useOptionalLayout } from './LayoutContext-DNl1xSoX.js';
13
+ import { u as useLanguage } from './ThemeContext-x_F2zsnv.js';
14
+ import { useQuery } from '@tanstack/react-query';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { F as FeatureCardSkeleton } from './FeatureCardSkeleton-DZqc96mt.js';
17
+ import { X as XerticaAssistant, g as gerarResposta } from './xertica-assistant-B687qEPU.js';
18
+ import i18n from 'i18next';
19
+ import { k as Dialog, n as DialogContent, q as DialogHeader, t as DialogTitle, o as DialogDescription, A as Alert, b as AlertTitle, a as AlertDescription, V as Textarea, T as Table, Q as TableHeader, U as TableRow, O as TableHead, K as TableBody, M as TableCell, u as DialogTrigger, p as DialogFooter } from './rich-text-editor-DqLICivI.js';
20
+ import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from './select-D-xvCZK2.js';
21
+ import { S as Slider } from './slider-DQCNUUMj.js';
22
+ import { toast } from 'sonner';
23
+ import { create } from 'zustand';
24
+
25
+ function ForgotPasswordPage() {
26
+ const navigate = useNavigate();
27
+ const [email, setEmail] = useState("");
28
+ const [isLoading, setIsLoading] = useState(false);
29
+ const handleSubmit = async (e) => {
30
+ e.preventDefault();
31
+ setIsLoading(true);
32
+ await new Promise((resolve) => setTimeout(resolve, 1500));
33
+ navigate("/verify-email", { state: { email } });
34
+ setIsLoading(false);
35
+ };
36
+ const handleSocialLogin = (_provider) => {
37
+ };
38
+ return /* @__PURE__ */ jsxs("div", { className: "h-full flex overflow-y-auto", children: [
39
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
40
+ /* @__PURE__ */ jsx(
41
+ ImageWithFallback,
42
+ {
43
+ src: "https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1200&h=800&fit=crop&auto=format",
44
+ alt: "Segurança e tecnologia",
45
+ className: "absolute inset-0 w-full h-full object-cover"
46
+ }
47
+ ),
48
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
49
+ ] }),
50
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
51
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
52
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
53
+ /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
54
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
55
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
56
+ XerticaLogo,
57
+ {
58
+ className: "h-12 w-auto text-primary dark:text-foreground",
59
+ variant: "theme"
60
+ }
61
+ ) }),
62
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: "Recuperar senha" }),
63
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: "Digite seu e-mail e enviaremos as instruções para redefinir sua senha" })
64
+ ] }),
65
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
66
+ /* @__PURE__ */ jsxs("div", { className: "form-group space-y-2", children: [
67
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "form-label", children: "E-mail" }),
68
+ /* @__PURE__ */ jsx(
69
+ Input,
70
+ {
71
+ id: "email",
72
+ name: "email",
73
+ type: "email",
74
+ required: true,
75
+ className: "w-full",
76
+ placeholder: "seu@email.com",
77
+ value: email,
78
+ onChange: (e) => setEmail(e.target.value)
79
+ }
80
+ )
81
+ ] }),
82
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
83
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? "Enviando..." : "Enviar instruções" }),
84
+ /* @__PURE__ */ jsxs(
85
+ Button,
86
+ {
87
+ type: "button",
88
+ onClick: () => navigate("/login"),
89
+ variant: "outline",
90
+ className: "w-full text-muted-foreground hover:text-foreground",
91
+ children: [
92
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
93
+ "Voltar para o login"
94
+ ]
95
+ }
96
+ )
97
+ ] })
98
+ ] }),
99
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
100
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
101
+ /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: "ou continue com" }) })
102
+ ] }),
103
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
104
+ /* @__PURE__ */ jsxs(
105
+ Button,
106
+ {
107
+ type: "button",
108
+ variant: "outline",
109
+ className: "w-full justify-center",
110
+ onClick: () => handleSocialLogin(),
111
+ children: [
112
+ /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
113
+ /* @__PURE__ */ jsx(
114
+ "path",
115
+ {
116
+ fill: "#EA4335",
117
+ d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
118
+ }
119
+ ),
120
+ /* @__PURE__ */ jsx(
121
+ "path",
122
+ {
123
+ fill: "#4285F4",
124
+ d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx(
128
+ "path",
129
+ {
130
+ fill: "#FBBC05",
131
+ d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ "path",
136
+ {
137
+ fill: "#34A853",
138
+ d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
139
+ }
140
+ ),
141
+ /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
142
+ ] }),
143
+ /* @__PURE__ */ jsx("span", { children: "Entrar com Google" })
144
+ ]
145
+ }
146
+ ),
147
+ /* @__PURE__ */ jsxs(
148
+ Button,
149
+ {
150
+ type: "button",
151
+ variant: "outline",
152
+ className: "w-full justify-center",
153
+ onClick: () => handleSocialLogin(),
154
+ children: [
155
+ /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
156
+ /* @__PURE__ */ jsx("span", { children: "Entrar com MT Login" })
157
+ ]
158
+ }
159
+ ),
160
+ /* @__PURE__ */ jsx(
161
+ Button,
162
+ {
163
+ type: "button",
164
+ variant: "outline",
165
+ className: "w-full justify-center font-normal",
166
+ onClick: () => handleSocialLogin(),
167
+ children: /* @__PURE__ */ jsxs("span", { children: [
168
+ "Entrar com ",
169
+ /* @__PURE__ */ jsx("strong", { className: "font-semibold", children: "gov.br" })
170
+ ] })
171
+ }
172
+ )
173
+ ] })
174
+ ] })
175
+ ] })
176
+ ] });
177
+ }
178
+
179
+ const SIDEBAR_COLLAPSED_WIDTH = 80;
180
+
181
+ const t = (key, options) => i18n.t(key, options);
182
+ const MOCK_TEAM_MEMBERS = [
183
+ { id: "1", name: "Ana Silva", email: "ana.silva@example.com", role: "Developer", status: "active" },
184
+ { id: "2", name: "Bruno Costa", email: "bruno.costa@example.com", role: "Designer", status: "active" },
185
+ { id: "3", name: "Carla Oliveira", email: "carla.oliveira@example.com", role: "Manager", status: "away" },
186
+ { id: "4", name: "Diego Santos", email: "diego.santos@example.com", role: "Analyst", status: "inactive" }
187
+ ];
188
+ async function fetchTeamMembers() {
189
+ await new Promise((resolve) => setTimeout(resolve, 250));
190
+ return MOCK_TEAM_MEMBERS;
191
+ }
192
+ async function fetchFeatureCards() {
193
+ await new Promise((resolve) => setTimeout(resolve, 100));
194
+ return [
195
+ {
196
+ id: "template-cli",
197
+ title: t("home.templateCliTitle"),
198
+ description: t("home.templateCliDescription"),
199
+ badge: t("home.templateClibadge"),
200
+ href: "/template"
201
+ }
202
+ ];
203
+ }
204
+
205
+ function useTeamMembers() {
206
+ const { language } = useLanguage();
207
+ return useQuery({
208
+ // Language is part of the key so each locale has its own cache slot.
209
+ queryKey: ["home", "team-members", language],
210
+ queryFn: fetchTeamMembers,
211
+ staleTime: 2 * 60 * 1e3
212
+ // 2 min
213
+ });
214
+ }
215
+
216
+ function useFeatureCards() {
217
+ const { language } = useLanguage();
218
+ return useQuery({
219
+ // Language is part of the key so each locale has its own cache slot.
220
+ queryKey: ["home", "feature-cards", language],
221
+ queryFn: fetchFeatureCards,
222
+ staleTime: 10 * 60 * 1e3
223
+ // 10 min — feature list is fairly static
224
+ });
225
+ }
226
+
227
+ const useDashboardStore = create((set) => ({
228
+ // Filters
229
+ activeTab: "overview",
230
+ setActiveTab: (tab) => set({ activeTab: tab }),
231
+ // UI toggles
232
+ statsExpanded: true,
233
+ toggleStats: () => set((state) => ({ statsExpanded: !state.statsExpanded })),
234
+ // Showcase controls
235
+ progress: 45,
236
+ setProgress: (value) => set({ progress: value }),
237
+ sliderValue: [50],
238
+ setSliderValue: (value) => set({ sliderValue: value }),
239
+ switchEnabled: false,
240
+ toggleSwitch: () => set((state) => ({ switchEnabled: !state.switchEnabled }))
241
+ }));
242
+
243
+ function isDev() {
244
+ return false;
245
+ }
246
+ function SectionErrorFallback({ error, reset }) {
247
+ return /* @__PURE__ */ jsxs(
248
+ "div",
249
+ {
250
+ role: "alert",
251
+ className: "flex flex-col items-center justify-center gap-3 p-6 rounded-[var(--radius-lg)] border border-destructive/30 bg-destructive/5 text-center",
252
+ children: [
253
+ /* @__PURE__ */ jsxs(
254
+ "svg",
255
+ {
256
+ width: "24",
257
+ height: "24",
258
+ viewBox: "0 0 24 24",
259
+ fill: "none",
260
+ stroke: "currentColor",
261
+ strokeWidth: "2",
262
+ strokeLinecap: "round",
263
+ strokeLinejoin: "round",
264
+ className: "text-destructive shrink-0",
265
+ "aria-hidden": "true",
266
+ children: [
267
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
268
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
269
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
270
+ ]
271
+ }
272
+ ),
273
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
274
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Não foi possível carregar este conteúdo" }),
275
+ isDev()
276
+ ] }),
277
+ /* @__PURE__ */ jsx(
278
+ "button",
279
+ {
280
+ onClick: reset,
281
+ className: "inline-flex items-center px-3 py-1.5 text-xs rounded-[var(--radius-button)] border border-border bg-background hover:bg-accent hover:text-accent-foreground transition-colors",
282
+ children: "Tentar novamente"
283
+ }
284
+ )
285
+ ]
286
+ }
287
+ );
288
+ }
289
+
290
+ class ErrorBoundary extends React__default.Component {
291
+ constructor(props) {
292
+ super(props);
293
+ this.state = { hasError: false, error: null };
294
+ this.reset = this.reset.bind(this);
295
+ }
296
+ static getDerivedStateFromError(error) {
297
+ return { hasError: true, error };
298
+ }
299
+ componentDidCatch(error, info) {
300
+ this.props.onError?.(error, info);
301
+ }
302
+ componentDidUpdate(prevProps) {
303
+ if (!this.state.hasError) return;
304
+ const { resetKeys } = this.props;
305
+ if (!resetKeys?.length) return;
306
+ const prevKeys = prevProps.resetKeys ?? [];
307
+ const changed = resetKeys.some((key, i) => key !== prevKeys[i]);
308
+ if (changed) this.reset();
309
+ }
310
+ reset() {
311
+ this.setState({ hasError: false, error: null });
312
+ }
313
+ render() {
314
+ const { hasError, error } = this.state;
315
+ const { children, fallback: Fallback } = this.props;
316
+ if (hasError && error) {
317
+ return /* @__PURE__ */ jsx(Fallback, { error, reset: this.reset });
318
+ }
319
+ return children;
320
+ }
321
+ }
322
+ function SectionErrorBoundary({ children, onError, resetKeys }) {
323
+ return /* @__PURE__ */ jsx(ErrorBoundary, { fallback: SectionErrorFallback, onError, resetKeys, children });
324
+ }
325
+
326
+ function HomeContent() {
327
+ const { t } = useTranslation();
328
+ const layout = useOptionalLayout();
329
+ const sidebarExpanded = layout?.sidebarExpanded ?? false;
330
+ const sidebarWidth = layout?.sidebarWidth ?? 256;
331
+ const navigate = useNavigate();
332
+ const { data: featureCards = [], isLoading } = useFeatureCards();
333
+ return /* @__PURE__ */ jsxs(
334
+ "div",
335
+ {
336
+ style: {
337
+ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : SIDEBAR_COLLAPSED_WIDTH
338
+ },
339
+ className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
340
+ children: [
341
+ /* @__PURE__ */ jsx(
342
+ Header,
343
+ {
344
+ showThemeToggle: true,
345
+ showLanguageSelector: true,
346
+ breadcrumbs: [
347
+ { label: t("nav.designSystem"), href: "/home" },
348
+ { label: t("nav.home") }
349
+ ],
350
+ renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
351
+ }
352
+ ),
353
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "p-5 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
354
+ /* @__PURE__ */ jsx(
355
+ PageHeader,
356
+ {
357
+ title: t("home.welcome"),
358
+ subtitle: t("home.subtitle")
359
+ }
360
+ ),
361
+ /* @__PURE__ */ jsx(SectionErrorBoundary, { children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
362
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
363
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
364
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true })
365
+ ] }) : featureCards.map((card) => /* @__PURE__ */ jsxs(
366
+ Card,
367
+ {
368
+ className: "hover:shadow-xl transition-shadow duration-200 flex flex-col h-full",
369
+ children: [
370
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
371
+ /* @__PURE__ */ jsx("div", { className: "p-2 bg-[var(--chart-2)]/20 rounded-[var(--radius)]", children: /* @__PURE__ */ jsx(FileText, { className: "w-6 h-6 text-[var(--chart-2)]" }) }),
372
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
373
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: t(`home.${card.id.replace(/-/g, "")}Title`, { defaultValue: card.title }) }),
374
+ card.badge && /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-xs", children: t(`home.${card.id.replace(/-/g, "")}badge`, { defaultValue: card.badge }) })
375
+ ] })
376
+ ] }) }),
377
+ /* @__PURE__ */ jsx(CardContent, { className: "flex-1", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t(`home.${card.id.replace(/-/g, "")}Description`, { defaultValue: card.description }) }) }),
378
+ /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(
379
+ Button,
380
+ {
381
+ variant: "outline",
382
+ className: "w-full",
383
+ onClick: () => navigate(card.href),
384
+ children: t("common.view")
385
+ }
386
+ ) })
387
+ ]
388
+ },
389
+ card.id
390
+ )) }) })
391
+ ] }) }) }) })
392
+ ]
393
+ }
394
+ );
395
+ }
396
+
397
+ const routes = [
398
+ { path: "/home", label: "Home", icon: Home },
399
+ { path: "/template", label: "Template", icon: FileText }
400
+ ];
401
+
402
+ const AuthContext = createContext(null);
403
+ function useAuth() {
404
+ const ctx = useContext(AuthContext);
405
+ if (!ctx) throw new Error("useAuth must be used within <AuthProvider>");
406
+ return ctx;
407
+ }
408
+
409
+ async function fetchAssistantConfig() {
410
+ await new Promise((resolve) => setTimeout(resolve, 150));
411
+ const t = (key) => i18n.t(key);
412
+ return {
413
+ suggestions: [
414
+ { id: "1", text: t("assistant.suggestions.whatCanIAsk") },
415
+ { id: "2", text: t("assistant.suggestions.whatDoYouDo") },
416
+ { id: "3", text: t("assistant.suggestions.whichProjects") },
417
+ { id: "4", text: t("assistant.suggestions.nextProject") }
418
+ ],
419
+ richSuggestions: [
420
+ { id: "rich-1", text: t("assistant.richSuggestions.viewPerformance") },
421
+ { id: "rich-2", text: t("assistant.richSuggestions.generateReport") },
422
+ { id: "rich-3", text: t("assistant.richSuggestions.createDocument") },
423
+ { id: "rich-4", text: t("assistant.richSuggestions.generatePodcast") }
424
+ ],
425
+ feedbackOptions: [
426
+ t("assistant.feedback.notWhatIWanted"),
427
+ t("assistant.feedback.incorrectInfo"),
428
+ t("assistant.feedback.incompleteAnswer")
429
+ ]
430
+ };
431
+ }
432
+ function getMockRichSuggestions() {
433
+ return [
434
+ { id: "rich-1", text: i18n.t("assistant.richSuggestions.viewPerformance") },
435
+ { id: "rich-2", text: i18n.t("assistant.richSuggestions.generateReport") },
436
+ { id: "rich-3", text: i18n.t("assistant.richSuggestions.createDocument") },
437
+ { id: "rich-4", text: i18n.t("assistant.richSuggestions.generatePodcast") }
438
+ ];
439
+ }
440
+ function getMockFeedbackOptions() {
441
+ return [
442
+ i18n.t("assistant.feedback.notWhatIWanted"),
443
+ i18n.t("assistant.feedback.incorrectInfo"),
444
+ i18n.t("assistant.feedback.incompleteAnswer")
445
+ ];
446
+ }
447
+
448
+ function useAssistantConfig() {
449
+ const { language } = useLanguage();
450
+ return useQuery({
451
+ // Language is part of the key so each locale has its own cache slot.
452
+ queryKey: ["assistant", "config", language],
453
+ queryFn: fetchAssistantConfig,
454
+ staleTime: 30 * 60 * 1e3
455
+ // 30 min — config rarely changes
456
+ });
457
+ }
458
+
459
+ function HomePage() {
460
+ const { user, logout } = useAuth();
461
+ const layout = useOptionalLayout();
462
+ const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
463
+ const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
464
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
465
+ const sidebarWidth = layout?.sidebarWidth ?? 280;
466
+ const assistenteExpanded = layout?.assistenteExpanded ?? localAssistantExpanded;
467
+ const toggleSidebar = layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
468
+ const toggleAssistente = layout?.toggleAssistente ?? (() => setLocalAssistantExpanded((value) => !value));
469
+ const location = useLocation();
470
+ const navigate = useNavigate();
471
+ const { data: assistantConfig } = useAssistantConfig();
472
+ return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
473
+ /* @__PURE__ */ jsx(
474
+ Sidebar,
475
+ {
476
+ expanded: sidebarExpanded,
477
+ width: sidebarWidth,
478
+ onToggle: toggleSidebar,
479
+ user: {
480
+ ...user,
481
+ name: "Ariel Santos",
482
+ avatar: "https://github.com/shadcn.png"
483
+ },
484
+ onLogout: logout,
485
+ onSettingsClick: () => navigate("/settings"),
486
+ location,
487
+ navigate,
488
+ routes
489
+ }
490
+ ),
491
+ /* @__PURE__ */ jsx(HomeContent, {}),
492
+ /* @__PURE__ */ jsx(
493
+ XerticaAssistant,
494
+ {
495
+ isExpanded: assistenteExpanded,
496
+ onToggle: toggleAssistente,
497
+ defaultTab: "chat",
498
+ demoMode: true,
499
+ responseGenerator: gerarResposta,
500
+ suggestions: assistantConfig?.suggestions,
501
+ richSuggestions: assistantConfig?.richSuggestions ?? getMockRichSuggestions(),
502
+ feedbackOptions: assistantConfig?.feedbackOptions ?? getMockFeedbackOptions(),
503
+ onEvaluation: () => {
504
+ }
505
+ }
506
+ )
507
+ ] });
508
+ }
509
+
510
+ function LoginPage({ onLogin }) {
511
+ const navigate = useNavigate();
512
+ const { t } = useTranslation();
513
+ const [email, setEmail] = useState("");
514
+ const [password, setPassword] = useState("");
515
+ const [isLoading, setIsLoading] = useState(false);
516
+ const [error, setError] = useState("");
517
+ const handleSubmit = async (e) => {
518
+ e.preventDefault();
519
+ setError("");
520
+ setIsLoading(true);
521
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
522
+ const success = onLogin(email, password);
523
+ if (!success) {
524
+ setError(t("login.errorFillFields"));
525
+ }
526
+ setIsLoading(false);
527
+ };
528
+ const handleSocialLogin = (_provider) => {
529
+ onLogin("social@user.com", "social-auth");
530
+ };
531
+ return /* @__PURE__ */ jsxs("div", { className: "h-full flex overflow-y-auto", children: [
532
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
533
+ /* @__PURE__ */ jsx(
534
+ ImageWithFallback,
535
+ {
536
+ src: "https://images.unsplash.com/photo-1551434678-e076c223a692?w=1200&h=800&fit=crop&auto=format",
537
+ alt: t("login.heroImageAlt"),
538
+ className: "absolute inset-0 w-full h-full object-cover"
539
+ }
540
+ ),
541
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
542
+ ] }),
543
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
544
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
545
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
546
+ /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
547
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
548
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
549
+ XerticaLogo,
550
+ {
551
+ className: "h-12 w-auto text-primary dark:text-foreground",
552
+ variant: "theme"
553
+ }
554
+ ) }),
555
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("login.heading") })
556
+ ] }),
557
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
558
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
559
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("login.emailLabel") }),
560
+ /* @__PURE__ */ jsx(
561
+ Input,
562
+ {
563
+ id: "email",
564
+ name: "email",
565
+ type: "email",
566
+ required: true,
567
+ className: "w-full",
568
+ placeholder: t("login.emailPlaceholder"),
569
+ value: email,
570
+ onChange: (e) => setEmail(e.target.value)
571
+ }
572
+ )
573
+ ] }),
574
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
575
+ /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t("login.passwordLabel") }),
576
+ /* @__PURE__ */ jsx(
577
+ Input,
578
+ {
579
+ id: "password",
580
+ name: "password",
581
+ type: "password",
582
+ required: true,
583
+ className: "w-full",
584
+ placeholder: "••••••••",
585
+ value: password,
586
+ onChange: (e) => setPassword(e.target.value)
587
+ }
588
+ )
589
+ ] }),
590
+ error && /* @__PURE__ */ jsx("div", { className: "text-destructive text-sm text-center", children: error }),
591
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("login.submitting") : t("login.submit") }),
592
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(
593
+ "button",
594
+ {
595
+ type: "button",
596
+ onClick: () => navigate("/forgot-password"),
597
+ className: "text-sm text-primary hover:opacity-80 transition-colors",
598
+ children: t("login.forgotPassword")
599
+ }
600
+ ) })
601
+ ] }),
602
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
603
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
604
+ /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t("login.orContinueWith") }) })
605
+ ] }),
606
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
607
+ /* @__PURE__ */ jsxs(
608
+ Button,
609
+ {
610
+ type: "button",
611
+ variant: "outline",
612
+ className: "w-full justify-center",
613
+ onClick: () => handleSocialLogin(),
614
+ children: [
615
+ /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
616
+ /* @__PURE__ */ jsx(
617
+ "path",
618
+ {
619
+ fill: "#EA4335",
620
+ d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
621
+ }
622
+ ),
623
+ /* @__PURE__ */ jsx(
624
+ "path",
625
+ {
626
+ fill: "#4285F4",
627
+ d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
628
+ }
629
+ ),
630
+ /* @__PURE__ */ jsx(
631
+ "path",
632
+ {
633
+ fill: "#FBBC05",
634
+ d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
635
+ }
636
+ ),
637
+ /* @__PURE__ */ jsx(
638
+ "path",
639
+ {
640
+ fill: "#34A853",
641
+ d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
642
+ }
643
+ ),
644
+ /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
645
+ ] }),
646
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithGoogle") })
647
+ ]
648
+ }
649
+ ),
650
+ /* @__PURE__ */ jsxs(
651
+ Button,
652
+ {
653
+ type: "button",
654
+ variant: "outline",
655
+ className: "w-full justify-center",
656
+ onClick: () => handleSocialLogin(),
657
+ children: [
658
+ /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
659
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithMTLogin") })
660
+ ]
661
+ }
662
+ ),
663
+ /* @__PURE__ */ jsx(
664
+ Button,
665
+ {
666
+ type: "button",
667
+ variant: "outline",
668
+ className: "w-full justify-center font-normal",
669
+ onClick: () => handleSocialLogin(),
670
+ children: /* @__PURE__ */ jsx("span", { children: t("login.signInWithGovBr") })
671
+ }
672
+ )
673
+ ] })
674
+ ] })
675
+ ] })
676
+ ] });
677
+ }
678
+
679
+ function ResetPasswordPage() {
680
+ const navigate = useNavigate();
681
+ const { t } = useTranslation();
682
+ const [password, setPassword] = useState("");
683
+ const [confirmPassword, setConfirmPassword] = useState("");
684
+ const [isLoading, setIsLoading] = useState(false);
685
+ const [error, setError] = useState("");
686
+ const [passwordStrength, setPasswordStrength] = useState(
687
+ null
688
+ );
689
+ const checkPasswordStrength = (pwd) => {
690
+ if (pwd.length === 0) {
691
+ setPasswordStrength(null);
692
+ return;
693
+ }
694
+ if (pwd.length < 6) {
695
+ setPasswordStrength("weak");
696
+ } else if (pwd.length < 10) {
697
+ setPasswordStrength("medium");
698
+ } else {
699
+ setPasswordStrength("strong");
700
+ }
701
+ };
702
+ const handlePasswordChange = (value) => {
703
+ setPassword(value);
704
+ checkPasswordStrength(value);
705
+ setError("");
706
+ };
707
+ const handleSubmit = async (e) => {
708
+ e.preventDefault();
709
+ setError("");
710
+ if (password.length < 6) {
711
+ setError(t("resetPassword.errorMinLength"));
712
+ return;
713
+ }
714
+ if (password !== confirmPassword) {
715
+ setError(t("resetPassword.errorMismatch"));
716
+ return;
717
+ }
718
+ setIsLoading(true);
719
+ await new Promise((resolve) => setTimeout(resolve, 1500));
720
+ navigate("/login", { state: { resetSuccess: true } });
721
+ setIsLoading(false);
722
+ };
723
+ const getStrengthColor = () => {
724
+ switch (passwordStrength) {
725
+ case "weak":
726
+ return "text-destructive";
727
+ case "medium":
728
+ return "text-[var(--chart-3)]";
729
+ case "strong":
730
+ return "text-[var(--chart-2)]";
731
+ default:
732
+ return "text-muted-foreground";
733
+ }
734
+ };
735
+ const getStrengthText = () => {
736
+ switch (passwordStrength) {
737
+ case "weak":
738
+ return t("resetPassword.strengthWeak");
739
+ case "medium":
740
+ return t("resetPassword.strengthMedium");
741
+ case "strong":
742
+ return t("resetPassword.strengthStrong");
743
+ default:
744
+ return "";
745
+ }
746
+ };
747
+ return /* @__PURE__ */ jsxs("div", { className: "h-full flex overflow-y-auto", children: [
748
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
749
+ /* @__PURE__ */ jsx(
750
+ ImageWithFallback,
751
+ {
752
+ src: "https://images.unsplash.com/photo-1555949963-aa79dcee981c?w=1200&h=800&fit=crop&auto=format",
753
+ alt: t("resetPassword.heroImageAlt"),
754
+ className: "absolute inset-0 w-full h-full object-cover"
755
+ }
756
+ ),
757
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
758
+ ] }),
759
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
760
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
761
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
762
+ /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
763
+ /* @__PURE__ */ jsxs(
764
+ "button",
765
+ {
766
+ onClick: () => navigate("/login"),
767
+ className: "flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",
768
+ children: [
769
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4" }),
770
+ /* @__PURE__ */ jsx("span", { className: "text-small", children: t("resetPassword.backToLogin") })
771
+ ]
772
+ }
773
+ ),
774
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
775
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
776
+ XerticaLogo,
777
+ {
778
+ className: "h-12 w-auto text-primary dark:text-foreground",
779
+ variant: "theme"
780
+ }
781
+ ) }),
782
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("resetPassword.heading") }),
783
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t("resetPassword.subheading") })
784
+ ] }),
785
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
786
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
787
+ /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t("resetPassword.newPasswordLabel") }),
788
+ /* @__PURE__ */ jsx(
789
+ Input,
790
+ {
791
+ id: "password",
792
+ name: "password",
793
+ type: "password",
794
+ required: true,
795
+ className: "w-full",
796
+ placeholder: "••••••••",
797
+ value: password,
798
+ onChange: (e) => handlePasswordChange(e.target.value)
799
+ }
800
+ ),
801
+ passwordStrength && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
802
+ /* @__PURE__ */ jsx("div", { className: "flex-1 h-1 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
803
+ "div",
804
+ {
805
+ className: `h-full transition-all duration-300 ${passwordStrength === "weak" ? "w-1/3 bg-destructive" : passwordStrength === "medium" ? "w-2/3 bg-[var(--chart-3)]" : "w-full bg-[var(--chart-2)]"}`
806
+ }
807
+ ) }),
808
+ /* @__PURE__ */ jsx("span", { className: `text-small ${getStrengthColor()}`, children: getStrengthText() })
809
+ ] })
810
+ ] }),
811
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
812
+ /* @__PURE__ */ jsx(Label, { htmlFor: "confirmPassword", children: t("resetPassword.confirmPasswordLabel") }),
813
+ /* @__PURE__ */ jsx(
814
+ Input,
815
+ {
816
+ id: "confirmPassword",
817
+ name: "confirmPassword",
818
+ type: "password",
819
+ required: true,
820
+ className: "w-full",
821
+ placeholder: "••••••••",
822
+ value: confirmPassword,
823
+ onChange: (e) => {
824
+ setConfirmPassword(e.target.value);
825
+ setError("");
826
+ }
827
+ }
828
+ )
829
+ ] }),
830
+ /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-2", children: [
831
+ /* @__PURE__ */ jsx("p", { className: "text-sm", children: t("resetPassword.requirements") }),
832
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
833
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
834
+ /* @__PURE__ */ jsx(
835
+ CheckCircle2,
836
+ {
837
+ className: `w-4 h-4 ${password.length >= 6 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
838
+ }
839
+ ),
840
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t("resetPassword.requirementMinChars") })
841
+ ] }),
842
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
843
+ /* @__PURE__ */ jsx(
844
+ CheckCircle2,
845
+ {
846
+ className: `w-4 h-4 ${password === confirmPassword && password.length > 0 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
847
+ }
848
+ ),
849
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t("resetPassword.requirementMatch") })
850
+ ] })
851
+ ] })
852
+ ] }),
853
+ error && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-destructive bg-destructive/10 rounded-[var(--radius)] p-3", children: [
854
+ /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 flex-shrink-0" }),
855
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: error })
856
+ ] }),
857
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("resetPassword.submitting") : t("resetPassword.submit") })
858
+ ] })
859
+ ] })
860
+ ] })
861
+ ] });
862
+ }
863
+
864
+ function createLucideIconSvg(iconName) {
865
+ const iconPaths = {
866
+ utensils: '<path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"></path><path d="M7 2v20"></path><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"></path>',
867
+ hotel: '<path d="M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z"></path><path d="M8 6h8"></path><path d="M8 10h8"></path><path d="M8 14h8"></path><path d="M8 18h8"></path>',
868
+ landmark: '<path d="m3 21 18-18"></path><path d="M9 15V6h6v9"></path><path d="M12 3v3"></path><path d="M3 15h18"></path><path d="M6 21v-6"></path><path d="M18 21v-6"></path>',
869
+ shopping: '<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"></path><path d="M3 6h18"></path><path d="M16 10a4 4 0 0 1-8 0"></path>',
870
+ coffee: '<path d="M17 8h1a4 4 0 1 1 0 8h-1"></path><path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"></path><line x1="6" x2="6" y1="2" y2="4"></line><line x1="10" x2="10" y1="2" y2="4"></line><line x1="14" x2="14" y1="2" y2="4"></line>'
871
+ };
872
+ const path = iconPaths[iconName] || "";
873
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">${path}</svg>`;
874
+ }
875
+ const markerGroups = {
876
+ restaurant: {
877
+ id: "restaurant",
878
+ name: "Restaurantes",
879
+ color: "var(--destructive)",
880
+ // red
881
+ iconColor: "#FFFFFF",
882
+ // white para contraste
883
+ iconName: "utensils",
884
+ icon: Utensils
885
+ },
886
+ hotel: {
887
+ id: "hotel",
888
+ name: "Hotéis",
889
+ color: "var(--info)",
890
+ // blue
891
+ iconColor: "#FFFFFF",
892
+ iconName: "hotel",
893
+ icon: Hotel
894
+ },
895
+ landmark: {
896
+ id: "landmark",
897
+ name: "Pontos Turísticos",
898
+ color: "var(--success)",
899
+ // green
900
+ iconColor: "#FFFFFF",
901
+ iconName: "landmark",
902
+ icon: Landmark
903
+ },
904
+ shopping: {
905
+ id: "shopping",
906
+ name: "Compras",
907
+ color: "var(--warning)",
908
+ // orange
909
+ iconColor: "#FFFFFF",
910
+ iconName: "shopping",
911
+ icon: ShoppingBag
912
+ },
913
+ cafe: {
914
+ id: "cafe",
915
+ name: "Cafeterias",
916
+ color: "var(--primary)",
917
+ // purple
918
+ iconColor: "#FFFFFF",
919
+ iconName: "coffee",
920
+ icon: Coffee
921
+ }
922
+ };
923
+ const sampleLocations = [
924
+ // Restaurantes
925
+ {
926
+ position: { lat: -23.5505, lng: -46.6333 },
927
+ title: "Restaurante Italiano",
928
+ info: "Melhor pizza da cidade",
929
+ group: "restaurant"
930
+ },
931
+ {
932
+ position: { lat: -23.5485, lng: -46.635 },
933
+ title: "Sushi Bar",
934
+ info: "Comida japonesa autêntica",
935
+ group: "restaurant"
936
+ },
937
+ {
938
+ position: { lat: -23.552, lng: -46.631 },
939
+ title: "Churrascaria Premium",
940
+ info: "Rodízio tradicional brasileiro",
941
+ group: "restaurant"
942
+ },
943
+ // Hotéis
944
+ {
945
+ position: { lat: -23.5475, lng: -46.6361 },
946
+ title: "Hotel Luxo",
947
+ info: "5 estrelas - Vista panorâmica",
948
+ group: "hotel"
949
+ },
950
+ {
951
+ position: { lat: -23.553, lng: -46.634 },
952
+ title: "Hotel Boutique",
953
+ info: "Design moderno e aconchegante",
954
+ group: "hotel"
955
+ },
956
+ // Pontos Turísticos
957
+ {
958
+ position: { lat: -23.5613, lng: -46.6563 },
959
+ title: "Parque Ibirapuera",
960
+ info: "Maior parque urbano da cidade",
961
+ group: "landmark"
962
+ },
963
+ {
964
+ position: { lat: -23.5558, lng: -46.6396 },
965
+ title: "MASP",
966
+ info: "Museu de Arte de São Paulo",
967
+ group: "landmark"
968
+ },
969
+ {
970
+ position: { lat: -23.5489, lng: -46.6388 },
971
+ title: "Avenida Paulista",
972
+ info: "Centro financeiro e cultural",
973
+ group: "landmark"
974
+ },
975
+ // Shopping
976
+ {
977
+ position: { lat: -23.5465, lng: -46.64 },
978
+ title: "Shopping Center",
979
+ info: "Mais de 300 lojas",
980
+ group: "shopping"
981
+ },
982
+ {
983
+ position: { lat: -23.554, lng: -46.638 },
984
+ title: "Galeria de Arte",
985
+ info: "Arte contemporânea e design",
986
+ group: "shopping"
987
+ },
988
+ // Cafeterias
989
+ {
990
+ position: { lat: -23.5495, lng: -46.6345 },
991
+ title: "Café Artesanal",
992
+ info: "Café especial e brunch",
993
+ group: "cafe"
994
+ },
995
+ {
996
+ position: { lat: -23.551, lng: -46.637 },
997
+ title: "Coffee House",
998
+ info: "Café gourmet e wi-fi",
999
+ group: "cafe"
1000
+ },
1001
+ {
1002
+ position: { lat: -23.5525, lng: -46.6355 },
1003
+ title: "Café Cultural",
1004
+ info: "Livros e café",
1005
+ group: "cafe"
1006
+ }
1007
+ ];
1008
+ function FilterableMapExample({ apiKey }) {
1009
+ const [activeFilters, setActiveFilters] = useState(
1010
+ new Set(Object.keys(markerGroups))
1011
+ );
1012
+ const [showFilters, setShowFilters] = useState(true);
1013
+ const filteredLocations = useMemo(() => {
1014
+ return sampleLocations.filter((location) => activeFilters.has(location.group));
1015
+ }, [activeFilters]);
1016
+ const toggleFilter = (groupId) => {
1017
+ setActiveFilters((prev) => {
1018
+ const newFilters = new Set(prev);
1019
+ if (newFilters.has(groupId)) {
1020
+ newFilters.delete(groupId);
1021
+ } else {
1022
+ newFilters.add(groupId);
1023
+ }
1024
+ return newFilters;
1025
+ });
1026
+ };
1027
+ const toggleAll = () => {
1028
+ if (activeFilters.size === Object.keys(markerGroups).length) {
1029
+ setActiveFilters(/* @__PURE__ */ new Set());
1030
+ } else {
1031
+ setActiveFilters(new Set(Object.keys(markerGroups)));
1032
+ }
1033
+ };
1034
+ const markersWithCustomization = filteredLocations.map((location) => ({
1035
+ ...location,
1036
+ customColor: markerGroups[location.group].color,
1037
+ iconSvg: createLucideIconSvg(markerGroups[location.group].iconName),
1038
+ iconColor: markerGroups[location.group].iconColor
1039
+ }));
1040
+ const getGroupCount = (groupId) => {
1041
+ return sampleLocations.filter((loc) => loc.group === groupId).length;
1042
+ };
1043
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1044
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1045
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1046
+ /* @__PURE__ */ jsx(MapPin, { className: "w-5 h-5 text-primary" }),
1047
+ /* @__PURE__ */ jsx("h3", { children: "Filtro por Categorias" })
1048
+ ] }),
1049
+ /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
1050
+ filteredLocations.length,
1051
+ " de ",
1052
+ sampleLocations.length,
1053
+ " locais"
1054
+ ] })
1055
+ ] }),
1056
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Use os filtros compactos no canto superior esquerdo do mapa para visualizar marcadores por categoria" }),
1057
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1058
+ /* @__PURE__ */ jsx(
1059
+ Map,
1060
+ {
1061
+ center: { lat: -23.5505, lng: -46.6333 },
1062
+ zoom: 14,
1063
+ markers: markersWithCustomization,
1064
+ height: "500px",
1065
+ zoomControl: true,
1066
+ fullscreenControl: true,
1067
+ apiKey
1068
+ }
1069
+ ),
1070
+ /* @__PURE__ */ jsx(
1071
+ "div",
1072
+ {
1073
+ className: cn(
1074
+ "absolute top-4 left-4 z-10 transition-all duration-300",
1075
+ showFilters ? "translate-x-0" : "-translate-x-full"
1076
+ ),
1077
+ children: /* @__PURE__ */ jsxs("div", { className: "p-2.5 rounded-lg shadow-[var(--shadow-elevation-sm)] bg-card border border-border max-w-[220px]", children: [
1078
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
1079
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1080
+ /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 text-foreground" }),
1081
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Filtros" })
1082
+ ] }),
1083
+ /* @__PURE__ */ jsx(
1084
+ Button,
1085
+ {
1086
+ size: "sm",
1087
+ variant: "ghost",
1088
+ onClick: () => setShowFilters(false),
1089
+ className: "h-5 w-5 p-0",
1090
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
1091
+ }
1092
+ )
1093
+ ] }),
1094
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1095
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1096
+ /* @__PURE__ */ jsx(
1097
+ Checkbox,
1098
+ {
1099
+ id: "filter-all",
1100
+ checked: activeFilters.size === Object.keys(markerGroups).length,
1101
+ onCheckedChange: toggleAll
1102
+ }
1103
+ ),
1104
+ /* @__PURE__ */ jsxs(
1105
+ Label,
1106
+ {
1107
+ htmlFor: "filter-all",
1108
+ className: "flex items-center gap-1.5 cursor-pointer text-sm",
1109
+ children: [
1110
+ /* @__PURE__ */ jsx(MapPin, { className: "w-3.5 h-3.5" }),
1111
+ "Todos",
1112
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-4 px-1", children: sampleLocations.length })
1113
+ ]
1114
+ }
1115
+ )
1116
+ ] }),
1117
+ Object.entries(markerGroups).map(([id, group]) => {
1118
+ const groupId = id;
1119
+ const Icon = group.icon;
1120
+ const isActive = activeFilters.has(groupId);
1121
+ const count = getGroupCount(groupId);
1122
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1123
+ /* @__PURE__ */ jsx(
1124
+ Checkbox,
1125
+ {
1126
+ id: `filter-${id}`,
1127
+ checked: isActive,
1128
+ onCheckedChange: () => toggleFilter(groupId)
1129
+ }
1130
+ ),
1131
+ /* @__PURE__ */ jsxs(
1132
+ Label,
1133
+ {
1134
+ htmlFor: `filter-${id}`,
1135
+ className: "flex items-center gap-1.5 cursor-pointer text-sm",
1136
+ children: [
1137
+ /* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5", style: { color: group.color } }),
1138
+ /* @__PURE__ */ jsx("span", { className: isActive ? "text-foreground" : "text-muted-foreground", children: group.name }),
1139
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs h-4 px-1", children: count })
1140
+ ]
1141
+ }
1142
+ )
1143
+ ] }, id);
1144
+ })
1145
+ ] })
1146
+ ] })
1147
+ }
1148
+ ),
1149
+ !showFilters && /* @__PURE__ */ jsxs(
1150
+ Button,
1151
+ {
1152
+ size: "sm",
1153
+ onClick: () => setShowFilters(true),
1154
+ className: "absolute top-4 left-4 z-10 h-8 bg-primary text-primary-foreground",
1155
+ children: [
1156
+ /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 mr-1.5" }),
1157
+ "Filtros"
1158
+ ]
1159
+ }
1160
+ )
1161
+ ] }),
1162
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 justify-center pt-2 border-t border-border", children: Object.entries(markerGroups).map(([id, group]) => {
1163
+ const Icon = group.icon;
1164
+ const count = getGroupCount(id);
1165
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-1 rounded-lg bg-muted", children: [
1166
+ /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: group.color } }),
1167
+ /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4", style: { color: group.color } }),
1168
+ /* @__PURE__ */ jsx("span", { className: "text-sm", style: { color: "var(--foreground)" }, children: group.name }),
1169
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-5", children: count })
1170
+ ] }, id);
1171
+ }) }),
1172
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3", children: [
1173
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1174
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Total de Locais" }),
1175
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: sampleLocations.length })
1176
+ ] }),
1177
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1178
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Visíveis" }),
1179
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-primary", children: filteredLocations.length })
1180
+ ] }),
1181
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1182
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Categorias" }),
1183
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: Object.keys(markerGroups).length })
1184
+ ] }),
1185
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1186
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Filtros Ativos" }),
1187
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-chart-2", children: activeFilters.size })
1188
+ ] })
1189
+ ] })
1190
+ ] });
1191
+ }
1192
+
1193
+ function DrawingMapExample({ apiKey }) {
1194
+ const [mapInstance, setMapInstance] = useState(null);
1195
+ const [selectedMode, setSelectedMode] = useState(null);
1196
+ const [shapes, setShapes] = useState([]);
1197
+ const [showSaveDialog, setShowSaveDialog] = useState(false);
1198
+ const [savedData, setSavedData] = useState("");
1199
+ const [isDrawingPolygon, setIsDrawingPolygon] = useState(false);
1200
+ const tempPolylineRef = useRef(null);
1201
+ const polygonPathRef = useRef([]);
1202
+ const mapListenersRef = useRef([]);
1203
+ const colors = {
1204
+ fill: "#2C275B",
1205
+ // Primary do CSS
1206
+ stroke: "#2C275B",
1207
+ fillOpacity: 0.2,
1208
+ strokeWeight: 2,
1209
+ editable: true,
1210
+ draggable: true
1211
+ };
1212
+ const addMarker = useCallback(
1213
+ (position) => {
1214
+ if (!mapInstance) return;
1215
+ const marker = new google.maps.marker.AdvancedMarkerElement({
1216
+ position,
1217
+ map: mapInstance,
1218
+ gmpDraggable: true,
1219
+ // Propriedade correta para AdvancedMarkerElement
1220
+ title: "Marcador"
1221
+ });
1222
+ marker.addListener("dragend", () => {
1223
+ toast.info("Posição do marcador atualizada");
1224
+ });
1225
+ const newShape = { type: "marker", overlay: marker };
1226
+ setShapes((prev) => [...prev, newShape]);
1227
+ toast.success("Marcador adicionado");
1228
+ },
1229
+ [mapInstance]
1230
+ );
1231
+ const addCircle = useCallback(
1232
+ (center) => {
1233
+ if (!mapInstance) return;
1234
+ const circle = new google.maps.Circle({
1235
+ map: mapInstance,
1236
+ center,
1237
+ radius: 500,
1238
+ fillColor: colors.fill,
1239
+ fillOpacity: colors.fillOpacity,
1240
+ strokeColor: colors.stroke,
1241
+ strokeWeight: colors.strokeWeight,
1242
+ editable: true,
1243
+ draggable: true
1244
+ });
1245
+ const newShape = { type: "circle", overlay: circle };
1246
+ setShapes((prev) => [...prev, newShape]);
1247
+ toast.success("Círculo adicionado");
1248
+ },
1249
+ [mapInstance, colors]
1250
+ );
1251
+ const addRectangle = useCallback(
1252
+ (center) => {
1253
+ if (!mapInstance) return;
1254
+ const offset = 5e-3;
1255
+ const bounds = {
1256
+ north: center.lat() + offset,
1257
+ south: center.lat() - offset,
1258
+ east: center.lng() + offset,
1259
+ west: center.lng() - offset
1260
+ };
1261
+ const rectangle = new google.maps.Rectangle({
1262
+ map: mapInstance,
1263
+ bounds,
1264
+ fillColor: colors.fill,
1265
+ fillOpacity: colors.fillOpacity,
1266
+ strokeColor: colors.stroke,
1267
+ strokeWeight: colors.strokeWeight,
1268
+ editable: true,
1269
+ draggable: true
1270
+ });
1271
+ const newShape = { type: "rectangle", overlay: rectangle };
1272
+ setShapes((prev) => [...prev, newShape]);
1273
+ toast.success("Retângulo adicionado");
1274
+ },
1275
+ [mapInstance, colors]
1276
+ );
1277
+ const cancelPolygonDrawing = useCallback(() => {
1278
+ if (tempPolylineRef.current) {
1279
+ tempPolylineRef.current.setMap(null);
1280
+ tempPolylineRef.current = null;
1281
+ }
1282
+ polygonPathRef.current = [];
1283
+ setIsDrawingPolygon(false);
1284
+ }, []);
1285
+ const finishPolygon = useCallback(() => {
1286
+ if (!mapInstance || polygonPathRef.current.length < 3) {
1287
+ if (polygonPathRef.current.length < 3 && polygonPathRef.current.length > 0) {
1288
+ toast.error("Polígono precisa de pelo menos 3 pontos.");
1289
+ }
1290
+ return;
1291
+ }
1292
+ const polygon = new google.maps.Polygon({
1293
+ map: mapInstance,
1294
+ paths: polygonPathRef.current,
1295
+ fillColor: colors.fill,
1296
+ fillOpacity: colors.fillOpacity,
1297
+ strokeColor: colors.stroke,
1298
+ strokeWeight: colors.strokeWeight,
1299
+ editable: true,
1300
+ draggable: true
1301
+ });
1302
+ const newShape = { type: "polygon", overlay: polygon };
1303
+ setShapes((prev) => [...prev, newShape]);
1304
+ cancelPolygonDrawing();
1305
+ toast.success("Polígono criado com sucesso!");
1306
+ }, [mapInstance, colors, cancelPolygonDrawing]);
1307
+ const addPolygonPoint = useCallback(
1308
+ (point) => {
1309
+ if (!mapInstance) return;
1310
+ if (!isDrawingPolygon) {
1311
+ setIsDrawingPolygon(true);
1312
+ polygonPathRef.current = [point];
1313
+ tempPolylineRef.current = new google.maps.Polyline({
1314
+ map: mapInstance,
1315
+ path: polygonPathRef.current,
1316
+ strokeColor: colors.stroke,
1317
+ strokeOpacity: 0.8,
1318
+ strokeWeight: 2,
1319
+ geodesic: true,
1320
+ clickable: false
1321
+ // Importante: não capturar cliques para não atrapalhar o mapa
1322
+ });
1323
+ toast.info("Clique para adicionar pontos. Duplo clique ou botão check para fechar.", {
1324
+ duration: 4e3
1325
+ });
1326
+ } else {
1327
+ polygonPathRef.current.push(point);
1328
+ tempPolylineRef.current?.setPath(polygonPathRef.current);
1329
+ }
1330
+ },
1331
+ [mapInstance, isDrawingPolygon, colors]
1332
+ );
1333
+ const clearListeners = () => {
1334
+ mapListenersRef.current.forEach((listener) => google.maps.event.removeListener(listener));
1335
+ mapListenersRef.current = [];
1336
+ };
1337
+ useEffect(() => {
1338
+ if (!mapInstance) return;
1339
+ clearListeners();
1340
+ if (!selectedMode) {
1341
+ mapInstance.setOptions({ draggableCursor: "grab", clickableIcons: true });
1342
+ return;
1343
+ }
1344
+ mapInstance.setOptions({
1345
+ draggableCursor: "crosshair",
1346
+ clickableIcons: false
1347
+ });
1348
+ const clickListener = mapInstance.addListener("click", (e) => {
1349
+ if (!e.latLng) return;
1350
+ switch (selectedMode) {
1351
+ case "marker":
1352
+ addMarker(e.latLng);
1353
+ break;
1354
+ case "circle":
1355
+ addCircle(e.latLng);
1356
+ break;
1357
+ case "rectangle":
1358
+ addRectangle(e.latLng);
1359
+ break;
1360
+ case "polygon":
1361
+ addPolygonPoint(e.latLng);
1362
+ break;
1363
+ }
1364
+ });
1365
+ mapListenersRef.current.push(clickListener);
1366
+ if (selectedMode === "polygon") {
1367
+ const dblClickListener = mapInstance.addListener("dblclick", (e) => {
1368
+ if (e.domEvent) e.domEvent.stopPropagation();
1369
+ finishPolygon();
1370
+ });
1371
+ mapListenersRef.current.push(dblClickListener);
1372
+ }
1373
+ return () => {
1374
+ clearListeners();
1375
+ };
1376
+ }, [
1377
+ mapInstance,
1378
+ selectedMode,
1379
+ addMarker,
1380
+ addCircle,
1381
+ addRectangle,
1382
+ addPolygonPoint,
1383
+ finishPolygon
1384
+ ]);
1385
+ const handleModeChange = (mode) => {
1386
+ if (isDrawingPolygon) {
1387
+ cancelPolygonDrawing();
1388
+ }
1389
+ setSelectedMode(mode);
1390
+ };
1391
+ const clearAll = () => {
1392
+ shapes.forEach((shape) => {
1393
+ if ("setMap" in shape.overlay) shape.overlay.setMap(null);
1394
+ else shape.overlay.map = null;
1395
+ });
1396
+ setShapes([]);
1397
+ if (isDrawingPolygon) cancelPolygonDrawing();
1398
+ toast.info("Mapa limpo");
1399
+ };
1400
+ const undoLast = () => {
1401
+ if (isDrawingPolygon) {
1402
+ if (polygonPathRef.current.length > 0) {
1403
+ polygonPathRef.current.pop();
1404
+ tempPolylineRef.current?.setPath(polygonPathRef.current);
1405
+ if (polygonPathRef.current.length === 0) {
1406
+ cancelPolygonDrawing();
1407
+ }
1408
+ }
1409
+ return;
1410
+ }
1411
+ if (shapes.length === 0) return;
1412
+ const lastShape = shapes[shapes.length - 1];
1413
+ if ("setMap" in lastShape.overlay) lastShape.overlay.setMap(null);
1414
+ else lastShape.overlay.map = null;
1415
+ setShapes((prev) => prev.slice(0, prev.length - 1));
1416
+ };
1417
+ const handleSave = () => {
1418
+ if (shapes.length === 0) {
1419
+ toast.error("Adicione desenhos ao mapa antes de salvar.");
1420
+ return;
1421
+ }
1422
+ const exportData = shapes.map((s) => {
1423
+ let data = {};
1424
+ if (s.type === "marker") {
1425
+ const marker = s.overlay;
1426
+ const pos = marker.position;
1427
+ if (pos) {
1428
+ const lat = typeof pos.lat === "function" ? pos.lat() : pos.lat;
1429
+ const lng = typeof pos.lng === "function" ? pos.lng() : pos.lng;
1430
+ data = { lat, lng };
1431
+ }
1432
+ } else if (s.type === "circle") {
1433
+ const circle = s.overlay;
1434
+ data = {
1435
+ center: { lat: circle.getCenter()?.lat(), lng: circle.getCenter()?.lng() },
1436
+ radius: circle.getRadius()
1437
+ };
1438
+ } else if (s.type === "rectangle") {
1439
+ const rect = s.overlay;
1440
+ const bounds = rect.getBounds();
1441
+ data = {
1442
+ north: bounds?.getNorthEast().lat(),
1443
+ south: bounds?.getSouthWest().lat(),
1444
+ east: bounds?.getNorthEast().lng(),
1445
+ west: bounds?.getSouthWest().lng()
1446
+ };
1447
+ } else if (s.type === "polygon") {
1448
+ const poly = s.overlay;
1449
+ const path = poly.getPath();
1450
+ data = path.getArray().map((coord) => ({ lat: coord.lat(), lng: coord.lng() }));
1451
+ }
1452
+ return { type: s.type, data };
1453
+ });
1454
+ setSavedData(JSON.stringify(exportData, null, 2));
1455
+ setShowSaveDialog(true);
1456
+ };
1457
+ const ToolButton = ({
1458
+ active,
1459
+ onClick,
1460
+ icon: Icon,
1461
+ label
1462
+ }) => /* @__PURE__ */ jsxs(
1463
+ Button,
1464
+ {
1465
+ variant: active ? "default" : "ghost",
1466
+ className: `w-full justify-start gap-3 ${active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"}`,
1467
+ onClick,
1468
+ children: [
1469
+ /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
1470
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: label })
1471
+ ]
1472
+ }
1473
+ );
1474
+ return /* @__PURE__ */ jsxs(Card, { className: "h-full border-0 shadow-none md:border md:shadow-sm", children: [
1475
+ /* @__PURE__ */ jsx(CardHeader, { className: "border-b bg-muted/20 pb-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1476
+ /* @__PURE__ */ jsxs("div", { children: [
1477
+ /* @__PURE__ */ jsx(CardTitle, { children: "Ferramentas de Desenho" }),
1478
+ /* @__PURE__ */ jsx(CardDescription, { className: "mt-1", children: "Crie geometrias personalizadas no mapa" })
1479
+ ] }),
1480
+ /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "h-6", children: [
1481
+ shapes.length,
1482
+ " ",
1483
+ shapes.length === 1 ? "elemento" : "elementos"
1484
+ ] })
1485
+ ] }) }),
1486
+ /* @__PURE__ */ jsxs(CardContent, { className: "p-0 flex flex-col md:flex-row h-[600px] bg-background", children: [
1487
+ /* @__PURE__ */ jsxs("div", { className: "w-full md:w-64 border-b md:border-b-0 md:border-r bg-muted/10 flex flex-col", children: [
1488
+ /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxs("div", { className: "p-4 space-y-6", children: [
1489
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1490
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ferramentas" }),
1491
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
1492
+ /* @__PURE__ */ jsx(
1493
+ ToolButton,
1494
+ {
1495
+ active: selectedMode === null,
1496
+ onClick: () => handleModeChange(null),
1497
+ icon: MousePointer2,
1498
+ label: "Navegar"
1499
+ }
1500
+ ),
1501
+ /* @__PURE__ */ jsx(
1502
+ ToolButton,
1503
+ {
1504
+ active: selectedMode === "marker",
1505
+ onClick: () => handleModeChange("marker"),
1506
+ icon: MapPin,
1507
+ label: "Marcador"
1508
+ }
1509
+ ),
1510
+ /* @__PURE__ */ jsx(
1511
+ ToolButton,
1512
+ {
1513
+ active: selectedMode === "circle",
1514
+ onClick: () => handleModeChange("circle"),
1515
+ icon: Circle,
1516
+ label: "Círculo"
1517
+ }
1518
+ ),
1519
+ /* @__PURE__ */ jsx(
1520
+ ToolButton,
1521
+ {
1522
+ active: selectedMode === "rectangle",
1523
+ onClick: () => handleModeChange("rectangle"),
1524
+ icon: Square,
1525
+ label: "Retângulo"
1526
+ }
1527
+ ),
1528
+ /* @__PURE__ */ jsx(
1529
+ ToolButton,
1530
+ {
1531
+ active: selectedMode === "polygon",
1532
+ onClick: () => handleModeChange("polygon"),
1533
+ icon: Hexagon,
1534
+ label: "Polígono"
1535
+ }
1536
+ )
1537
+ ] })
1538
+ ] }),
1539
+ /* @__PURE__ */ jsx(Separator, {}),
1540
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1541
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ações" }),
1542
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1543
+ /* @__PURE__ */ jsxs(
1544
+ Button,
1545
+ {
1546
+ variant: "outline",
1547
+ onClick: undoLast,
1548
+ disabled: shapes.length === 0 && !isDrawingPolygon,
1549
+ className: "w-full",
1550
+ title: "Desfazer último",
1551
+ "aria-label": "Desfazer último",
1552
+ children: [
1553
+ /* @__PURE__ */ jsx(Undo, { className: "h-4 w-4 mr-2" }),
1554
+ "Desfazer"
1555
+ ]
1556
+ }
1557
+ ),
1558
+ /* @__PURE__ */ jsxs(
1559
+ Button,
1560
+ {
1561
+ variant: "destructive",
1562
+ onClick: clearAll,
1563
+ disabled: shapes.length === 0 && !isDrawingPolygon,
1564
+ className: "w-full bg-destructive/10 text-destructive hover:bg-destructive hover:text-destructive-foreground border-0 shadow-none",
1565
+ children: [
1566
+ /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4 mr-2" }),
1567
+ "Limpar"
1568
+ ]
1569
+ }
1570
+ )
1571
+ ] }),
1572
+ /* @__PURE__ */ jsxs(
1573
+ Button,
1574
+ {
1575
+ variant: "default",
1576
+ onClick: handleSave,
1577
+ disabled: shapes.length === 0,
1578
+ className: "w-full mt-2",
1579
+ children: [
1580
+ /* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-2" }),
1581
+ "Salvar GeoJSON"
1582
+ ]
1583
+ }
1584
+ )
1585
+ ] })
1586
+ ] }) }),
1587
+ isDrawingPolygon && /* @__PURE__ */ jsxs("div", { className: "p-4 bg-primary/5 border-t border-primary/10", children: [
1588
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2 text-primary text-xs font-medium", children: [
1589
+ /* @__PURE__ */ jsxs("span", { className: "relative flex h-2 w-2", children: [
1590
+ /* @__PURE__ */ jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75" }),
1591
+ /* @__PURE__ */ jsx("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary" })
1592
+ ] }),
1593
+ "Desenhando Polígono..."
1594
+ ] }),
1595
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1596
+ /* @__PURE__ */ jsxs(
1597
+ Button,
1598
+ {
1599
+ size: "sm",
1600
+ className: "w-full bg-green-600 hover:bg-green-700 text-white",
1601
+ onClick: finishPolygon,
1602
+ children: [
1603
+ /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 mr-1" }),
1604
+ " Concluir"
1605
+ ]
1606
+ }
1607
+ ),
1608
+ /* @__PURE__ */ jsxs(
1609
+ Button,
1610
+ {
1611
+ size: "sm",
1612
+ variant: "outline",
1613
+ className: "w-full",
1614
+ onClick: cancelPolygonDrawing,
1615
+ children: [
1616
+ /* @__PURE__ */ jsx(X, { className: "h-3 w-3 mr-1" }),
1617
+ " Cancelar"
1618
+ ]
1619
+ }
1620
+ )
1621
+ ] })
1622
+ ] })
1623
+ ] }),
1624
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 relative bg-muted/5 min-h-[400px]", children: [
1625
+ /* @__PURE__ */ jsx(
1626
+ Map,
1627
+ {
1628
+ className: "h-full w-full rounded-none md:rounded-br-lg",
1629
+ center: { lat: -23.5505, lng: -46.6333 },
1630
+ zoom: 13,
1631
+ height: "100%",
1632
+ mapContainerClassName: "h-full w-full rounded-none md:rounded-br-lg",
1633
+ disableDefaultUI: true,
1634
+ zoomControl: true,
1635
+ onMapLoad: setMapInstance,
1636
+ apiKey
1637
+ }
1638
+ ),
1639
+ selectedMode && !isDrawingPolygon && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-background/90 backdrop-blur border px-4 py-2 rounded-full shadow-sm text-xs font-medium text-muted-foreground pointer-events-none z-10", children: [
1640
+ selectedMode === "marker" && "Clique no mapa para adicionar um marcador",
1641
+ selectedMode === "circle" && "Clique no mapa para definir o centro do círculo",
1642
+ selectedMode === "rectangle" && "Clique no mapa para criar um retângulo",
1643
+ selectedMode === "polygon" && "Clique sequencialmente para desenhar a área"
1644
+ ] })
1645
+ ] }),
1646
+ /* @__PURE__ */ jsx(Dialog, { open: showSaveDialog, onOpenChange: setShowSaveDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
1647
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
1648
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Dados Geográficos (GeoJSON)" }),
1649
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Copie os dados das formas desenhadas abaixo." })
1650
+ ] }),
1651
+ /* @__PURE__ */ jsx("div", { className: "relative mt-2", children: /* @__PURE__ */ jsx(
1652
+ "pre",
1653
+ {
1654
+ className: "p-4 rounded-lg bg-muted overflow-auto max-h-[300px] text-xs font-mono",
1655
+ "data-custom-scrollbar": true,
1656
+ children: savedData
1657
+ }
1658
+ ) }),
1659
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx(Button, { onClick: () => setShowSaveDialog(false), children: "Fechar" }) })
1660
+ ] }) })
1661
+ ] })
1662
+ ] });
1663
+ }
1664
+
1665
+ function MapShowcase() {
1666
+ const [activeTab, setActiveTab] = useState("simple");
1667
+ const [isTransitioning, setIsTransitioning] = useState(false);
1668
+ const [apiKey, setApiKey] = useState("");
1669
+ const [inputApiKey, setInputApiKey] = useState("");
1670
+ const [showTraffic, setShowTraffic] = useState(false);
1671
+ const [showTransit, setShowTransit] = useState(false);
1672
+ const [showBicycling, setShowBicycling] = useState(false);
1673
+ const [showZoomControl, setShowZoomControl] = useState(true);
1674
+ const [showMapTypeControl, setShowMapTypeControl] = useState(false);
1675
+ const [showStreetViewControl, setShowStreetViewControl] = useState(false);
1676
+ const [showFullscreenControl, setShowFullscreenControl] = useState(true);
1677
+ const handleTabChange = (value) => {
1678
+ if (value === activeTab) return;
1679
+ setIsTransitioning(true);
1680
+ setTimeout(() => {
1681
+ setActiveTab(value);
1682
+ setIsTransitioning(false);
1683
+ }, 50);
1684
+ };
1685
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
1686
+ /* @__PURE__ */ jsx(
1687
+ PageHeader,
1688
+ {
1689
+ title: "Mapas",
1690
+ subtitle: "Biblioteca de componentes de mapa para visualização de dados geoespaciais. Utiliza a API do Google Maps com estilização personalizada do Xertica UI.",
1691
+ actions: /* @__PURE__ */ jsx(Badge, { children: "Design System" })
1692
+ }
1693
+ ),
1694
+ /* @__PURE__ */ jsxs(Card, { children: [
1695
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1696
+ /* @__PURE__ */ jsx(CardTitle, { children: "Configuração da API Key" }),
1697
+ /* @__PURE__ */ jsx(CardDescription, { children: "Insira sua Google Maps API Key para renderizar os mapas abaixo." })
1698
+ ] }),
1699
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center space-x-2", children: [
1700
+ /* @__PURE__ */ jsx(
1701
+ Input,
1702
+ {
1703
+ type: "password",
1704
+ placeholder: "Cole sua Google Maps API Key aqui",
1705
+ "aria-label": "Google Maps API Key",
1706
+ value: inputApiKey,
1707
+ onChange: (e) => setInputApiKey(e.target.value),
1708
+ className: "max-w-md h-10"
1709
+ }
1710
+ ),
1711
+ /* @__PURE__ */ jsx(Button, { onClick: () => setApiKey(inputApiKey), children: "Salvar" })
1712
+ ] }) })
1713
+ ] }),
1714
+ /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "w-full", children: [
1715
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4 mb-8", children: [
1716
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "simple", children: "Mapas Simples" }),
1717
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "markers", children: "Marcadores" }),
1718
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "controls", children: "Controles" }),
1719
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "drawing", className: "flex items-center gap-2", children: [
1720
+ /* @__PURE__ */ jsx(Pencil, { className: "w-3 h-3" }),
1721
+ " Desenho"
1722
+ ] })
1723
+ ] }),
1724
+ /* @__PURE__ */ jsx(TabsContent, { value: "simple", className: "space-y-8", children: !isTransitioning && activeTab === "simple" && /* @__PURE__ */ jsxs(Fragment, { children: [
1725
+ /* @__PURE__ */ jsxs(Card, { children: [
1726
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1727
+ /* @__PURE__ */ jsx(CardTitle, { children: "Mapa Padrão" }),
1728
+ /* @__PURE__ */ jsx(CardDescription, { children: "Configuração básica do mapa centralizado em uma coordenada específica." })
1729
+ ] }),
1730
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1731
+ Map,
1732
+ {
1733
+ center: { lat: -23.5505, lng: -46.6333 },
1734
+ zoom: 13,
1735
+ height: "400px",
1736
+ apiKey
1737
+ }
1738
+ ) })
1739
+ ] }),
1740
+ /* @__PURE__ */ jsxs(Card, { children: [
1741
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1742
+ /* @__PURE__ */ jsx(CardTitle, { children: "Camadas (Layers)" }),
1743
+ /* @__PURE__ */ jsx(CardDescription, { children: "Sobreposição de informações como tráfego, transporte público e ciclovias." })
1744
+ ] }),
1745
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
1746
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 p-4 border rounded-lg bg-muted/50", children: [
1747
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1748
+ /* @__PURE__ */ jsx(Switch, { id: "traffic", checked: showTraffic, onCheckedChange: setShowTraffic }),
1749
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "traffic", className: "flex items-center gap-2", children: [
1750
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1751
+ " Trânsito"
1752
+ ] })
1753
+ ] }),
1754
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1755
+ /* @__PURE__ */ jsx(Switch, { id: "transit", checked: showTransit, onCheckedChange: setShowTransit }),
1756
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "transit", className: "flex items-center gap-2", children: [
1757
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1758
+ " Transporte"
1759
+ ] })
1760
+ ] }),
1761
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1762
+ /* @__PURE__ */ jsx(
1763
+ Switch,
1764
+ {
1765
+ id: "bicycling",
1766
+ checked: showBicycling,
1767
+ onCheckedChange: setShowBicycling
1768
+ }
1769
+ ),
1770
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "bicycling", className: "flex items-center gap-2", children: [
1771
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1772
+ " Ciclovias"
1773
+ ] })
1774
+ ] })
1775
+ ] }),
1776
+ /* @__PURE__ */ jsx(
1777
+ Map,
1778
+ {
1779
+ center: { lat: -23.5505, lng: -46.6333 },
1780
+ zoom: 12,
1781
+ height: "500px",
1782
+ layers: {
1783
+ traffic: showTraffic,
1784
+ transit: showTransit,
1785
+ bicycling: showBicycling
1786
+ },
1787
+ apiKey
1788
+ }
1789
+ )
1790
+ ] })
1791
+ ] }),
1792
+ /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-4", children: [
1793
+ /* @__PURE__ */ jsxs(Card, { children: [
1794
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "São Paulo" }) }),
1795
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1796
+ Map,
1797
+ {
1798
+ center: { lat: -23.5505, lng: -46.6333 },
1799
+ zoom: 11,
1800
+ height: "200px",
1801
+ disableDefaultUI: true,
1802
+ apiKey
1803
+ }
1804
+ ) })
1805
+ ] }),
1806
+ /* @__PURE__ */ jsxs(Card, { children: [
1807
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "Rio de Janeiro" }) }),
1808
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1809
+ Map,
1810
+ {
1811
+ center: { lat: -22.9068, lng: -43.1729 },
1812
+ zoom: 11,
1813
+ height: "200px",
1814
+ disableDefaultUI: true,
1815
+ apiKey
1816
+ }
1817
+ ) })
1818
+ ] }),
1819
+ /* @__PURE__ */ jsxs(Card, { children: [
1820
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "New York" }) }),
1821
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1822
+ Map,
1823
+ {
1824
+ center: { lat: 40.7128, lng: -74.006 },
1825
+ zoom: 11,
1826
+ height: "200px",
1827
+ disableDefaultUI: true,
1828
+ apiKey
1829
+ }
1830
+ ) })
1831
+ ] })
1832
+ ] })
1833
+ ] }) }),
1834
+ /* @__PURE__ */ jsx(TabsContent, { value: "markers", className: "space-y-8", children: !isTransitioning && activeTab === "markers" && /* @__PURE__ */ jsxs(Fragment, { children: [
1835
+ /* @__PURE__ */ jsxs(Card, { children: [
1836
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1837
+ /* @__PURE__ */ jsx(CardTitle, { children: "Marcadores e Pins" }),
1838
+ /* @__PURE__ */ jsx(CardDescription, { children: "Exemplos de marcadores personalizados com diferentes cores e informações." })
1839
+ ] }),
1840
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1841
+ Map,
1842
+ {
1843
+ center: { lat: -23.5505, lng: -46.6333 },
1844
+ zoom: 13,
1845
+ height: "500px",
1846
+ apiKey,
1847
+ markers: [
1848
+ {
1849
+ position: { lat: -23.5505, lng: -46.6333 },
1850
+ title: "Principal",
1851
+ info: "Marcador padrão",
1852
+ customColor: "#4F46E5"
1853
+ },
1854
+ {
1855
+ position: { lat: -23.54, lng: -46.64 },
1856
+ title: "Secundário",
1857
+ info: "Marcador de alerta",
1858
+ customColor: "#EF4444",
1859
+ icon: "!"
1860
+ },
1861
+ {
1862
+ position: { lat: -23.56, lng: -46.62 },
1863
+ title: "Loja",
1864
+ info: "Ponto de venda",
1865
+ customColor: "#10B981",
1866
+ icon: "S"
1867
+ }
1868
+ ]
1869
+ }
1870
+ ) })
1871
+ ] }),
1872
+ /* @__PURE__ */ jsxs(Card, { children: [
1873
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1874
+ /* @__PURE__ */ jsx(CardTitle, { children: "Marcador com Ações" }),
1875
+ /* @__PURE__ */ jsx(CardDescription, { children: "Marcador interativo que exibe conteúdo rico (texto, imagem, botões) ao ser clicado." })
1876
+ ] }),
1877
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1878
+ Map,
1879
+ {
1880
+ center: { lat: -23.5505, lng: -46.6333 },
1881
+ zoom: 13,
1882
+ height: "500px",
1883
+ apiKey,
1884
+ markers: [
1885
+ {
1886
+ position: { lat: -23.5505, lng: -46.6333 },
1887
+ label: "🏢",
1888
+ richContent: /* @__PURE__ */ jsxs("div", { className: "p-4 max-w-[260px]", children: [
1889
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
1890
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base", children: "Xertica HQ" }),
1891
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-[10px] h-5", children: "Open" })
1892
+ ] }),
1893
+ /* @__PURE__ */ jsxs("div", { className: "w-full h-32 bg-muted rounded-md mb-3 overflow-hidden relative", children: [
1894
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" }),
1895
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-white font-medium", children: "Office View" })
1896
+ ] }),
1897
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-3 leading-relaxed", children: "Sede principal em São Paulo. Espaço moderno para reuniões e eventos." }),
1898
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1899
+ /* @__PURE__ */ jsx(Button, { size: "sm", className: "w-full h-8 text-xs shadow-sm", children: "Navegar" }),
1900
+ /* @__PURE__ */ jsx(
1901
+ Button,
1902
+ {
1903
+ size: "sm",
1904
+ variant: "outline",
1905
+ className: "w-full h-8 text-xs bg-background",
1906
+ children: "Detalhes"
1907
+ }
1908
+ )
1909
+ ] })
1910
+ ] })
1911
+ }
1912
+ ]
1913
+ }
1914
+ ) })
1915
+ ] }),
1916
+ /* @__PURE__ */ jsxs(Card, { children: [
1917
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1918
+ /* @__PURE__ */ jsx(CardTitle, { children: "Áreas e Zonas" }),
1919
+ /* @__PURE__ */ jsx(CardDescription, { children: "Delimitação de áreas geográficas usando círculos e polígonos." })
1920
+ ] }),
1921
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1922
+ Map,
1923
+ {
1924
+ center: { lat: -23.5505, lng: -46.6333 },
1925
+ zoom: 12,
1926
+ height: "500px",
1927
+ apiKey,
1928
+ markers: [
1929
+ {
1930
+ position: { lat: -23.5505, lng: -46.6333 },
1931
+ title: "Centro da Zona",
1932
+ info: "Raio de 3km",
1933
+ customColor: "#6366F1"
1934
+ }
1935
+ ],
1936
+ circle: {
1937
+ center: { lat: -23.5505, lng: -46.6333 },
1938
+ radius: 3e3,
1939
+ fillColor: "#6366F1",
1940
+ strokeColor: "#4F46E5"
1941
+ },
1942
+ polygon: {
1943
+ paths: [
1944
+ [
1945
+ { lat: -23.52, lng: -46.6 },
1946
+ { lat: -23.52, lng: -46.66 },
1947
+ { lat: -23.58, lng: -46.66 },
1948
+ { lat: -23.58, lng: -46.6 }
1949
+ ]
1950
+ ],
1951
+ fillColor: "#10B981",
1952
+ strokeColor: "#059669"
1953
+ }
1954
+ }
1955
+ ) })
1956
+ ] })
1957
+ ] }) }),
1958
+ /* @__PURE__ */ jsx(TabsContent, { value: "controls", className: "space-y-8", children: !isTransitioning && activeTab === "controls" && /* @__PURE__ */ jsxs(Fragment, { children: [
1959
+ /* @__PURE__ */ jsxs(Card, { children: [
1960
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1961
+ /* @__PURE__ */ jsx(CardTitle, { children: "Controles do Mapa" }),
1962
+ /* @__PURE__ */ jsx(CardDescription, { children: "Personalize a interface do mapa ativando ou desativando controles nativos." })
1963
+ ] }),
1964
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
1965
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 border rounded-lg bg-muted/50", children: [
1966
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1967
+ /* @__PURE__ */ jsx(
1968
+ Checkbox,
1969
+ {
1970
+ id: "zoom",
1971
+ checked: showZoomControl,
1972
+ onCheckedChange: (c) => setShowZoomControl(!!c)
1973
+ }
1974
+ ),
1975
+ /* @__PURE__ */ jsx(Label, { htmlFor: "zoom", children: "Zoom Control" })
1976
+ ] }),
1977
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1978
+ /* @__PURE__ */ jsx(
1979
+ Checkbox,
1980
+ {
1981
+ id: "maptype",
1982
+ checked: showMapTypeControl,
1983
+ onCheckedChange: (c) => setShowMapTypeControl(!!c)
1984
+ }
1985
+ ),
1986
+ /* @__PURE__ */ jsx(Label, { htmlFor: "maptype", children: "Map Type" })
1987
+ ] }),
1988
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1989
+ /* @__PURE__ */ jsx(
1990
+ Checkbox,
1991
+ {
1992
+ id: "streetview",
1993
+ checked: showStreetViewControl,
1994
+ onCheckedChange: (c) => setShowStreetViewControl(!!c)
1995
+ }
1996
+ ),
1997
+ /* @__PURE__ */ jsx(Label, { htmlFor: "streetview", children: "Street View" })
1998
+ ] }),
1999
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2000
+ /* @__PURE__ */ jsx(
2001
+ Checkbox,
2002
+ {
2003
+ id: "fullscreen",
2004
+ checked: showFullscreenControl,
2005
+ onCheckedChange: (c) => setShowFullscreenControl(!!c)
2006
+ }
2007
+ ),
2008
+ /* @__PURE__ */ jsx(Label, { htmlFor: "fullscreen", children: "Fullscreen" })
2009
+ ] })
2010
+ ] }),
2011
+ /* @__PURE__ */ jsx(
2012
+ Map,
2013
+ {
2014
+ center: { lat: -23.5505, lng: -46.6333 },
2015
+ zoom: 13,
2016
+ height: "400px",
2017
+ apiKey,
2018
+ zoomControl: showZoomControl,
2019
+ mapTypeControl: showMapTypeControl,
2020
+ streetViewControl: showStreetViewControl,
2021
+ fullscreenControl: showFullscreenControl
2022
+ }
2023
+ )
2024
+ ] })
2025
+ ] }),
2026
+ /* @__PURE__ */ jsxs(Card, { children: [
2027
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2028
+ /* @__PURE__ */ jsx(CardTitle, { children: "Filtros Interativos" }),
2029
+ /* @__PURE__ */ jsx(CardDescription, { children: "Exemplo avançado de mapa com controles customizados para filtragem de marcadores." })
2030
+ ] }),
2031
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(FilterableMapExample, { apiKey }) })
2032
+ ] })
2033
+ ] }) }),
2034
+ /* @__PURE__ */ jsx(TabsContent, { value: "drawing", className: "space-y-8", children: !isTransitioning && activeTab === "drawing" && /* @__PURE__ */ jsx(DrawingMapExample, { apiKey }) })
2035
+ ] }),
2036
+ /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-6 pt-8 border-t", children: [
2037
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2038
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Documentação" }),
2039
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2040
+ "Verifique ",
2041
+ /* @__PURE__ */ jsx("code", { children: "MAP_SETUP.md" }),
2042
+ " para configuração inicial e requisitos de API."
2043
+ ] })
2044
+ ] }),
2045
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2046
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Performance" }),
2047
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Utiliza carregamento assíncrono e AdvancedMarkerElement para melhor desempenho." })
2048
+ ] }),
2049
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2050
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Design System" }),
2051
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2052
+ "Componentes seguem estritamente as variáveis de tokens do ",
2053
+ /* @__PURE__ */ jsx("code", { children: "globals.css" }),
2054
+ "."
2055
+ ] })
2056
+ ] })
2057
+ ] })
2058
+ ] });
2059
+ }
2060
+
2061
+ function TemplateContent() {
2062
+ const { t } = useTranslation();
2063
+ const layout = useOptionalLayout();
2064
+ const [localSidebarExpanded, setLocalSidebarExpanded] = useState(false);
2065
+ const [localSidebarWidth, setLocalSidebarWidth] = useState(280);
2066
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
2067
+ const sidebarWidth = layout?.sidebarWidth ?? localSidebarWidth;
2068
+ const setSidebarWidth = layout?.setSidebarWidth ?? setLocalSidebarWidth;
2069
+ layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
2070
+ useNavigate();
2071
+ const { data: teamMembers = [], isLoading: teamLoading } = useTeamMembers();
2072
+ const progress = useDashboardStore((s) => s.progress);
2073
+ const setProgress = useDashboardStore((s) => s.setProgress);
2074
+ const sliderValue = useDashboardStore((s) => s.sliderValue);
2075
+ const setSliderValue = useDashboardStore((s) => s.setSliderValue);
2076
+ const switchEnabled = useDashboardStore((s) => s.switchEnabled);
2077
+ const toggleSwitch = useDashboardStore((s) => s.toggleSwitch);
2078
+ const [showSidebarUser, setShowSidebarUser] = useState(true);
2079
+ const [showSidebarSettings, setShowSidebarSettings] = useState(true);
2080
+ const [showSidebarLogout, setShowSidebarLogout] = useState(true);
2081
+ const [showHeaderActions, setShowHeaderActions] = useState(true);
2082
+ const [showHeaderBreadcrumbs, setShowHeaderBreadcrumbs] = useState(true);
2083
+ const handleFormSubmit = (e) => {
2084
+ e.preventDefault();
2085
+ toast.success(t("templates.formSubmitSuccess"));
2086
+ };
2087
+ return /* @__PURE__ */ jsxs(
2088
+ "div",
2089
+ {
2090
+ className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
2091
+ style: {
2092
+ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : "80px"
2093
+ },
2094
+ children: [
2095
+ /* @__PURE__ */ jsx(
2096
+ Header,
2097
+ {
2098
+ showThemeToggle: true,
2099
+ showLanguageSelector: true,
2100
+ breadcrumbs: [
2101
+ { label: t("nav.designSystem"), href: "/home", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2102
+ { label: t("templates.breadcrumb") }
2103
+ ],
2104
+ renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
2105
+ }
2106
+ ),
2107
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "p-5 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
2108
+ /* @__PURE__ */ jsx(
2109
+ PageHeader,
2110
+ {
2111
+ title: t("templates.title"),
2112
+ subtitle: t("templates.subtitle")
2113
+ }
2114
+ ),
2115
+ /* @__PURE__ */ jsxs("section", { children: [
2116
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.headerWithBreadcrumbs.sectionTitle") }),
2117
+ /* @__PURE__ */ jsxs(Card, { children: [
2118
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2119
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.headerWithBreadcrumbs.cardTitle") }),
2120
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.headerWithBreadcrumbs.cardDescription") })
2121
+ ] }),
2122
+ /* @__PURE__ */ jsxs(CardContent, { className: "p-0 border-t bg-background overflow-hidden rounded-b-[var(--radius-lg)]", children: [
2123
+ /* @__PURE__ */ jsx(
2124
+ Header,
2125
+ {
2126
+ className: "border-b",
2127
+ breadcrumbs: [
2128
+ { label: t("templates.headerWithBreadcrumbs.breadcrumbs.dashboard"), href: "#", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2129
+ { label: t("templates.headerWithBreadcrumbs.breadcrumbs.settings"), href: "#", icon: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" }) },
2130
+ { label: t("templates.headerWithBreadcrumbs.breadcrumbs.users"), href: "#", icon: /* @__PURE__ */ jsx(Users, { className: "w-4 h-4" }) },
2131
+ { label: t("templates.headerWithBreadcrumbs.breadcrumbs.accessProfile") }
2132
+ ],
2133
+ showLanguageSelector: true,
2134
+ showThemeToggle: true
2135
+ }
2136
+ ),
2137
+ /* @__PURE__ */ jsxs("div", { className: "p-6 min-h-[200px]", children: [
2138
+ /* @__PURE__ */ jsx("h4", { className: "text-lg font-semibold mb-2", children: t("templates.headerWithBreadcrumbs.exampleContentTitle") }),
2139
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2140
+ t("templates.headerWithBreadcrumbs.exampleContentDescriptionPart1"),
2141
+ /* @__PURE__ */ jsx("strong", { children: "Header" }),
2142
+ t("templates.headerWithBreadcrumbs.exampleContentDescriptionPart2")
2143
+ ] })
2144
+ ] })
2145
+ ] })
2146
+ ] })
2147
+ ] }),
2148
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2149
+ /* @__PURE__ */ jsxs("section", { children: [
2150
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.alerts") }),
2151
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2152
+ /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
2153
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.infoTitle") }),
2154
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.infoDescription") })
2155
+ ] }),
2156
+ /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
2157
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.errorTitle") }),
2158
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.errorDescription") })
2159
+ ] }),
2160
+ /* @__PURE__ */ jsxs(Alert, { variant: "success", children: [
2161
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.successTitle") }),
2162
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.successDescription") })
2163
+ ] }),
2164
+ /* @__PURE__ */ jsxs(Alert, { variant: "warning", children: [
2165
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.warningTitle") }),
2166
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.warningDescription") })
2167
+ ] })
2168
+ ] })
2169
+ ] }),
2170
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2171
+ /* @__PURE__ */ jsxs("section", { children: [
2172
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.cardsAndTabs") }),
2173
+ /* @__PURE__ */ jsxs(Tabs, { defaultValue: "overview", className: "w-full", children: [
2174
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4", children: [
2175
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "overview", children: t("templates.tabs.overview") }),
2176
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "forms", children: t("templates.tabs.forms") }),
2177
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "data", children: t("templates.tabs.data") }),
2178
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "settings", children: t("templates.tabs.settings") })
2179
+ ] }),
2180
+ /* @__PURE__ */ jsxs(TabsContent, { value: "overview", className: "space-y-4", children: [
2181
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-3", children: [
2182
+ /* @__PURE__ */ jsxs(Card, { children: [
2183
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2184
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.totalUsers") }),
2185
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.last30Days") })
2186
+ ] }),
2187
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2188
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "1,234" }),
2189
+ /* @__PURE__ */ jsx(Badge, { variant: "default", className: "ml-2", children: "+12%" })
2190
+ ] }) })
2191
+ ] }),
2192
+ /* @__PURE__ */ jsxs(Card, { children: [
2193
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2194
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.totalRevenue") }),
2195
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.currentMonth") })
2196
+ ] }),
2197
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2198
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "$ 45.2k" }),
2199
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "ml-2", children: "+8%" })
2200
+ ] }) })
2201
+ ] }),
2202
+ /* @__PURE__ */ jsxs(Card, { children: [
2203
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2204
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.conversionRate") }),
2205
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.currentWeek") })
2206
+ ] }),
2207
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2208
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "3.2%" }),
2209
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "ml-2", children: "-2%" })
2210
+ ] }) })
2211
+ ] })
2212
+ ] }),
2213
+ /* @__PURE__ */ jsxs(Card, { children: [
2214
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2215
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.overview.progressTitle") }),
2216
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.overview.progressDescription") })
2217
+ ] }),
2218
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2219
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2220
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2221
+ /* @__PURE__ */ jsx(Label, { children: t("templates.overview.projectProgress") }),
2222
+ /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2223
+ progress,
2224
+ "%"
2225
+ ] })
2226
+ ] }),
2227
+ /* @__PURE__ */ jsx(Progress, { value: progress, className: "w-full" }),
2228
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2229
+ /* @__PURE__ */ jsx(
2230
+ Button,
2231
+ {
2232
+ size: "sm",
2233
+ onClick: () => setProgress(Math.max(0, progress - 10)),
2234
+ children: "-10%"
2235
+ }
2236
+ ),
2237
+ /* @__PURE__ */ jsx(
2238
+ Button,
2239
+ {
2240
+ size: "sm",
2241
+ onClick: () => setProgress(Math.min(100, progress + 10)),
2242
+ children: "+10%"
2243
+ }
2244
+ )
2245
+ ] })
2246
+ ] }),
2247
+ /* @__PURE__ */ jsx(Separator, {}),
2248
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2249
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2250
+ /* @__PURE__ */ jsx(Label, { children: t("templates.overview.volume") }),
2251
+ /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2252
+ sliderValue[0],
2253
+ "%"
2254
+ ] })
2255
+ ] }),
2256
+ /* @__PURE__ */ jsx(
2257
+ Slider,
2258
+ {
2259
+ value: sliderValue,
2260
+ onValueChange: setSliderValue,
2261
+ min: 0,
2262
+ max: 100,
2263
+ step: 1,
2264
+ className: "w-full",
2265
+ "aria-label": t("templates.overview.volume")
2266
+ }
2267
+ )
2268
+ ] })
2269
+ ] })
2270
+ ] })
2271
+ ] }),
2272
+ /* @__PURE__ */ jsx(TabsContent, { value: "forms", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2273
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2274
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.forms.registrationTitle") }),
2275
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.forms.registrationDescription") })
2276
+ ] }),
2277
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("form", { onSubmit: handleFormSubmit, className: "space-y-4", children: [
2278
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2279
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2280
+ /* @__PURE__ */ jsx(Label, { htmlFor: "firstName", children: t("templates.forms.firstName") }),
2281
+ /* @__PURE__ */ jsx(Input, { id: "firstName", placeholder: t("templates.forms.firstNamePlaceholder") })
2282
+ ] }),
2283
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2284
+ /* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: t("templates.forms.lastName") }),
2285
+ /* @__PURE__ */ jsx(Input, { id: "lastName", placeholder: t("templates.forms.lastNamePlaceholder") })
2286
+ ] })
2287
+ ] }),
2288
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2289
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("templates.forms.email") }),
2290
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2291
+ /* @__PURE__ */ jsx(Mail, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2292
+ /* @__PURE__ */ jsx(
2293
+ Input,
2294
+ {
2295
+ id: "email",
2296
+ type: "email",
2297
+ placeholder: t("templates.forms.emailPlaceholder"),
2298
+ className: "pl-10"
2299
+ }
2300
+ )
2301
+ ] })
2302
+ ] }),
2303
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2304
+ /* @__PURE__ */ jsx(Label, { htmlFor: "phone", children: t("templates.forms.phone") }),
2305
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2306
+ /* @__PURE__ */ jsx(Phone, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2307
+ /* @__PURE__ */ jsx(
2308
+ Input,
2309
+ {
2310
+ id: "phone",
2311
+ type: "tel",
2312
+ placeholder: t("templates.forms.phonePlaceholder"),
2313
+ className: "pl-10"
2314
+ }
2315
+ )
2316
+ ] })
2317
+ ] }),
2318
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2319
+ /* @__PURE__ */ jsx(Label, { htmlFor: "role", children: t("templates.forms.role") }),
2320
+ /* @__PURE__ */ jsxs(Select, { children: [
2321
+ /* @__PURE__ */ jsx(SelectTrigger, { id: "role", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("templates.forms.rolePlaceholder") }) }),
2322
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2323
+ /* @__PURE__ */ jsx(SelectItem, { value: "developer", children: t("templates.forms.roles.developer") }),
2324
+ /* @__PURE__ */ jsx(SelectItem, { value: "designer", children: t("templates.forms.roles.designer") }),
2325
+ /* @__PURE__ */ jsx(SelectItem, { value: "manager", children: t("templates.forms.roles.manager") }),
2326
+ /* @__PURE__ */ jsx(SelectItem, { value: "analyst", children: t("templates.forms.roles.analyst") })
2327
+ ] })
2328
+ ] })
2329
+ ] }),
2330
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2331
+ /* @__PURE__ */ jsx(Label, { htmlFor: "bio", children: t("templates.forms.bio") }),
2332
+ /* @__PURE__ */ jsx(
2333
+ Textarea,
2334
+ {
2335
+ id: "bio",
2336
+ placeholder: t("templates.forms.bioPlaceholder"),
2337
+ rows: 4
2338
+ }
2339
+ )
2340
+ ] }),
2341
+ /* @__PURE__ */ jsx(Separator, {}),
2342
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2343
+ /* @__PURE__ */ jsx("h4", { children: t("templates.forms.preferences") }),
2344
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2345
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2346
+ /* @__PURE__ */ jsx(Checkbox, { id: "newsletter" }),
2347
+ /* @__PURE__ */ jsx(Label, { htmlFor: "newsletter", className: "font-normal", children: t("templates.forms.newsletter") })
2348
+ ] }),
2349
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2350
+ /* @__PURE__ */ jsx(Checkbox, { id: "notifications" }),
2351
+ /* @__PURE__ */ jsx(Label, { htmlFor: "notifications", className: "font-normal", children: t("templates.forms.pushNotifications") })
2352
+ ] }),
2353
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2354
+ /* @__PURE__ */ jsx(Checkbox, { id: "updates" }),
2355
+ /* @__PURE__ */ jsx(Label, { htmlFor: "updates", className: "font-normal", children: t("templates.forms.featureUpdates") })
2356
+ ] })
2357
+ ] }),
2358
+ /* @__PURE__ */ jsx(Separator, {}),
2359
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2360
+ /* @__PURE__ */ jsx(Label, { children: t("templates.forms.accountType") }),
2361
+ /* @__PURE__ */ jsxs(RadioGroup, { defaultValue: "personal", "aria-label": t("templates.forms.accountType"), children: [
2362
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2363
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "personal", id: "personal" }),
2364
+ /* @__PURE__ */ jsx(Label, { htmlFor: "personal", className: "font-normal", children: t("templates.forms.accountPersonal") })
2365
+ ] }),
2366
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2367
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "business", id: "business" }),
2368
+ /* @__PURE__ */ jsx(Label, { htmlFor: "business", className: "font-normal", children: t("templates.forms.accountBusiness") })
2369
+ ] }),
2370
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2371
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "enterprise", id: "enterprise" }),
2372
+ /* @__PURE__ */ jsx(Label, { htmlFor: "enterprise", className: "font-normal", children: t("templates.forms.accountEnterprise") })
2373
+ ] })
2374
+ ] })
2375
+ ] })
2376
+ ] })
2377
+ ] }) }),
2378
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2379
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.forms.cancel") }),
2380
+ /* @__PURE__ */ jsx(Button, { onClick: handleFormSubmit, children: t("templates.forms.createAccount") })
2381
+ ] })
2382
+ ] }) }),
2383
+ /* @__PURE__ */ jsx(TabsContent, { value: "data", className: "space-y-4", children: /* @__PURE__ */ jsx(SectionErrorBoundary, { children: /* @__PURE__ */ jsxs(Card, { children: [
2384
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2385
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.data.title") }),
2386
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.data.description") })
2387
+ ] }),
2388
+ /* @__PURE__ */ jsxs(CardContent, { children: [
2389
+ /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2390
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2391
+ /* @__PURE__ */ jsx(
2392
+ Input,
2393
+ {
2394
+ placeholder: t("templates.data.searchPlaceholder"),
2395
+ "aria-label": t("templates.data.searchPlaceholder"),
2396
+ className: "pl-10"
2397
+ }
2398
+ )
2399
+ ] }) }),
2400
+ /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius-lg)] border border-border overflow-hidden", children: /* @__PURE__ */ jsxs(Table, { children: [
2401
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
2402
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.name") }),
2403
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.email") }),
2404
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.role") }),
2405
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.status") }),
2406
+ /* @__PURE__ */ jsx(TableHead, { className: "text-right", children: t("team.actions") })
2407
+ ] }) }),
2408
+ /* @__PURE__ */ jsx(TableBody, { children: teamLoading ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
2409
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2410
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-8 rounded-full shrink-0" }),
2411
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-28" })
2412
+ ] }) }),
2413
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-36" }) }),
2414
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-20" }) }),
2415
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }) }),
2416
+ /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-14 ml-auto" }) })
2417
+ ] }, i)) }) : teamMembers.map((member) => /* @__PURE__ */ jsxs(TableRow, { children: [
2418
+ /* @__PURE__ */ jsx(TableCell, { children: member.name }),
2419
+ /* @__PURE__ */ jsx(TableCell, { children: member.email }),
2420
+ /* @__PURE__ */ jsx(TableCell, { children: t(`team.roles.${member.role}`) }),
2421
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
2422
+ Badge,
2423
+ {
2424
+ variant: member.status === "active" ? "default" : member.status === "away" ? "secondary" : "outline",
2425
+ children: t(`common.${member.status}`)
2426
+ }
2427
+ ) }),
2428
+ /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: t("common.edit") }) })
2429
+ ] }, member.id)) })
2430
+ ] }) })
2431
+ ] }),
2432
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between items-center", children: [
2433
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("team.showing", { count: teamMembers.length, total: teamMembers.length }) }),
2434
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2435
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: t("common.previous") }),
2436
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: t("common.next") })
2437
+ ] })
2438
+ ] })
2439
+ ] }) }) }),
2440
+ /* @__PURE__ */ jsx(TabsContent, { value: "settings", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2441
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2442
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.settings.title") }),
2443
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.settings.description") })
2444
+ ] }),
2445
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2446
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2447
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2448
+ /* @__PURE__ */ jsx(Label, { htmlFor: "dark-mode", children: t("templates.settings.darkMode") }),
2449
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.darkModeDescription") })
2450
+ ] }),
2451
+ /* @__PURE__ */ jsx(
2452
+ Switch,
2453
+ {
2454
+ id: "dark-mode",
2455
+ checked: switchEnabled,
2456
+ onCheckedChange: toggleSwitch
2457
+ }
2458
+ )
2459
+ ] }),
2460
+ /* @__PURE__ */ jsx(Separator, {}),
2461
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2462
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2463
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email-notifications", children: t("templates.settings.emailNotifications") }),
2464
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.emailNotificationsDescription") })
2465
+ ] }),
2466
+ /* @__PURE__ */ jsx(Switch, { id: "email-notifications", defaultChecked: true })
2467
+ ] }),
2468
+ /* @__PURE__ */ jsx(Separator, {}),
2469
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2470
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2471
+ /* @__PURE__ */ jsx(Label, { htmlFor: "push-notifications", children: t("templates.settings.pushNotifications") }),
2472
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.pushNotificationsDescription") })
2473
+ ] }),
2474
+ /* @__PURE__ */ jsx(Switch, { id: "push-notifications" })
2475
+ ] }),
2476
+ /* @__PURE__ */ jsx(Separator, {}),
2477
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2478
+ /* @__PURE__ */ jsx(Label, { children: t("templates.settings.language") }),
2479
+ /* @__PURE__ */ jsxs(Select, { defaultValue: "pt-br", children: [
2480
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t("templates.settings.language"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2481
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2482
+ /* @__PURE__ */ jsx(SelectItem, { value: "pt-br", children: t("templates.settings.languages.ptBR") }),
2483
+ /* @__PURE__ */ jsx(SelectItem, { value: "en", children: t("templates.settings.languages.en") }),
2484
+ /* @__PURE__ */ jsx(SelectItem, { value: "es", children: t("templates.settings.languages.es") })
2485
+ ] })
2486
+ ] })
2487
+ ] }),
2488
+ /* @__PURE__ */ jsx(Separator, {}),
2489
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2490
+ /* @__PURE__ */ jsx(Label, { children: t("templates.settings.timezone") }),
2491
+ /* @__PURE__ */ jsxs(Select, { defaultValue: "america-sao-paulo", children: [
2492
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t("templates.settings.timezone"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2493
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2494
+ /* @__PURE__ */ jsx(SelectItem, { value: "america-sao-paulo", children: t("templates.settings.timezones.saoPaulo") }),
2495
+ /* @__PURE__ */ jsx(SelectItem, { value: "america-new-york", children: t("templates.settings.timezones.newYork") }),
2496
+ /* @__PURE__ */ jsx(SelectItem, { value: "europe-london", children: t("templates.settings.timezones.london") })
2497
+ ] })
2498
+ ] })
2499
+ ] })
2500
+ ] }),
2501
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2502
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.settings.restoreDefaults") }),
2503
+ /* @__PURE__ */ jsx(Button, { children: t("templates.settings.saveChanges") })
2504
+ ] })
2505
+ ] }) })
2506
+ ] })
2507
+ ] }),
2508
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2509
+ /* @__PURE__ */ jsxs("section", { children: [
2510
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.buttons") }),
2511
+ /* @__PURE__ */ jsxs(Card, { children: [
2512
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2513
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.buttons.title") }),
2514
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.buttons.description") })
2515
+ ] }),
2516
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2517
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2518
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.variants") }),
2519
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2520
+ /* @__PURE__ */ jsx(Button, { variant: "default", children: "Default" }),
2521
+ /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Secondary" }),
2522
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Outline" }),
2523
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", children: "Ghost" }),
2524
+ /* @__PURE__ */ jsx(Button, { variant: "link", children: "Link" }),
2525
+ /* @__PURE__ */ jsx(Button, { variant: "destructive", children: "Destructive" })
2526
+ ] })
2527
+ ] }),
2528
+ /* @__PURE__ */ jsx(Separator, {}),
2529
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2530
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.sizes") }),
2531
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
2532
+ /* @__PURE__ */ jsx(Button, { size: "sm", children: "Small" }),
2533
+ /* @__PURE__ */ jsx(Button, { size: "default", children: "Default" }),
2534
+ /* @__PURE__ */ jsx(Button, { size: "lg", children: "Large" }),
2535
+ /* @__PURE__ */ jsx(Button, { size: "icon", "aria-label": t("nav.settings"), children: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }) })
2536
+ ] })
2537
+ ] }),
2538
+ /* @__PURE__ */ jsx(Separator, {}),
2539
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2540
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.withIcons") }),
2541
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2542
+ /* @__PURE__ */ jsxs(Button, { children: [
2543
+ /* @__PURE__ */ jsx(User, { className: "mr-2 h-4 w-4" }),
2544
+ t("templates.buttons.profile")
2545
+ ] }),
2546
+ /* @__PURE__ */ jsxs(Button, { variant: "secondary", children: [
2547
+ /* @__PURE__ */ jsx(Mail, { className: "mr-2 h-4 w-4" }),
2548
+ t("templates.buttons.messages")
2549
+ ] }),
2550
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
2551
+ /* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
2552
+ t("templates.buttons.schedule")
2553
+ ] })
2554
+ ] })
2555
+ ] }),
2556
+ /* @__PURE__ */ jsx(Separator, {}),
2557
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2558
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.states") }),
2559
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2560
+ /* @__PURE__ */ jsx(Button, { disabled: true, children: t("templates.buttons.disabled") }),
2561
+ /* @__PURE__ */ jsx(Button, { variant: "outline", disabled: true, children: t("templates.buttons.outlineDisabled") })
2562
+ ] })
2563
+ ] })
2564
+ ] })
2565
+ ] })
2566
+ ] }),
2567
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2568
+ /* @__PURE__ */ jsxs("section", { children: [
2569
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.badges") }),
2570
+ /* @__PURE__ */ jsxs(Card, { children: [
2571
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2572
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.badges.title") }),
2573
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.badges.description") })
2574
+ ] }),
2575
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2576
+ /* @__PURE__ */ jsx(Badge, { variant: "default", children: "Default" }),
2577
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Secondary" }),
2578
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Outline" }),
2579
+ /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: "Destructive" }),
2580
+ /* @__PURE__ */ jsx(Badge, { className: "bg-success text-success-foreground", children: "Success" }),
2581
+ /* @__PURE__ */ jsx(Badge, { className: "bg-warning text-warning-foreground", children: "Warning" }),
2582
+ /* @__PURE__ */ jsx(Badge, { className: "bg-info text-info-foreground", children: "Info" })
2583
+ ] }) })
2584
+ ] })
2585
+ ] }),
2586
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2587
+ /* @__PURE__ */ jsxs("section", { children: [
2588
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.dialogs") }),
2589
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2590
+ /* @__PURE__ */ jsxs(Card, { children: [
2591
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2592
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.dialogs.dialogTitle") }),
2593
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.dialogs.dialogDescription") })
2594
+ ] }),
2595
+ /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(Dialog, { children: [
2596
+ /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.dialogs.editProfile") }) }),
2597
+ /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
2598
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
2599
+ /* @__PURE__ */ jsx(DialogTitle, { children: t("templates.dialogs.editProfile") }),
2600
+ /* @__PURE__ */ jsx(DialogDescription, { children: t("templates.dialogs.editProfileDescription") })
2601
+ ] }),
2602
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 py-4", children: [
2603
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2604
+ /* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "text-right", children: t("templates.dialogs.name") }),
2605
+ /* @__PURE__ */ jsx(Input, { id: "name", defaultValue: "John Doe", className: "col-span-3" })
2606
+ ] }),
2607
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2608
+ /* @__PURE__ */ jsx(Label, { htmlFor: "username", className: "text-right", children: t("templates.dialogs.username") }),
2609
+ /* @__PURE__ */ jsx(Input, { id: "username", defaultValue: "@johndoe", className: "col-span-3" })
2610
+ ] })
2611
+ ] }),
2612
+ /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { type: "submit", children: t("templates.dialogs.update") }) })
2613
+ ] })
2614
+ ] }) })
2615
+ ] }),
2616
+ /* @__PURE__ */ jsxs(Card, { children: [
2617
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2618
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.dialogs.alertDialogTitle") }),
2619
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.dialogs.alertDialogDescription") })
2620
+ ] }),
2621
+ /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(AlertDialog, { children: [
2622
+ /* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "destructive", children: t("templates.dialogs.deleteAccount") }) }),
2623
+ /* @__PURE__ */ jsxs(AlertDialogContent, { className: "sm:max-w-[425px]", children: [
2624
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
2625
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: t("templates.dialogs.areYouSure") }),
2626
+ /* @__PURE__ */ jsx(AlertDialogDescription, { children: t("templates.dialogs.deleteWarning") })
2627
+ ] }),
2628
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
2629
+ /* @__PURE__ */ jsx(AlertDialogCancel, { children: t("templates.dialogs.cancel") }),
2630
+ /* @__PURE__ */ jsx(AlertDialogAction, { className: "bg-destructive text-destructive-foreground hover:bg-destructive/90", children: t("templates.dialogs.continue") })
2631
+ ] })
2632
+ ] })
2633
+ ] }) })
2634
+ ] })
2635
+ ] })
2636
+ ] }),
2637
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2638
+ /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(MapShowcase, {}) }),
2639
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2640
+ /* @__PURE__ */ jsxs("section", { children: [
2641
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.headerVariations.sectionTitle") }),
2642
+ /* @__PURE__ */ jsxs(Card, { children: [
2643
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2644
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.headerVariations.cardTitle") }),
2645
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.headerVariations.cardDescription") })
2646
+ ] }),
2647
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2648
+ /* @__PURE__ */ jsxs("div", { className: "p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2649
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: t("templates.headerVariations.visibleElements") }),
2650
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6", children: [
2651
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2652
+ /* @__PURE__ */ jsx(
2653
+ Switch,
2654
+ {
2655
+ id: "header-actions",
2656
+ checked: showHeaderActions,
2657
+ onCheckedChange: setShowHeaderActions
2658
+ }
2659
+ ),
2660
+ /* @__PURE__ */ jsx(Label, { htmlFor: "header-actions", className: "cursor-pointer", children: t("templates.headerVariations.actionButtons") })
2661
+ ] }),
2662
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2663
+ /* @__PURE__ */ jsx(
2664
+ Switch,
2665
+ {
2666
+ id: "header-bread",
2667
+ checked: showHeaderBreadcrumbs,
2668
+ onCheckedChange: setShowHeaderBreadcrumbs
2669
+ }
2670
+ ),
2671
+ /* @__PURE__ */ jsx(Label, { htmlFor: "header-bread", className: "cursor-pointer", children: t("templates.headerVariations.breadcrumbsLabel") })
2672
+ ] })
2673
+ ] })
2674
+ ] }),
2675
+ /* @__PURE__ */ jsxs("div", { className: "relative border rounded-[var(--radius-lg)] bg-muted/10 overflow-hidden shadow-inner", children: [
2676
+ /* @__PURE__ */ jsx("div", { className: "p-4 bg-background/50 border-b text-xs font-mono text-muted-foreground", children: t("templates.headerVariations.preview") }),
2677
+ /* @__PURE__ */ jsx(
2678
+ Header,
2679
+ {
2680
+ title: !showHeaderBreadcrumbs ? t("templates.headerVariations.currentPage") : void 0,
2681
+ breadcrumbs: showHeaderBreadcrumbs ? [
2682
+ {
2683
+ label: t("templates.headerVariations.breadcrumbBrand"),
2684
+ href: "#",
2685
+ icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
2686
+ },
2687
+ { label: t("templates.headerVariations.breadcrumbSettings"), href: "#" },
2688
+ { label: t("templates.headerVariations.breadcrumbProfile") }
2689
+ ] : void 0,
2690
+ actions: showHeaderActions ? [
2691
+ {
2692
+ id: "notify",
2693
+ icon: /* @__PURE__ */ jsx(Bell, { className: "w-5 h-5" }),
2694
+ onClick: () => toast(t("templates.headerVariations.notificationsOpenedToast"))
2695
+ },
2696
+ {
2697
+ id: "mail",
2698
+ label: t("templates.headerVariations.messagesLabel"),
2699
+ icon: /* @__PURE__ */ jsx(Mail, { className: "w-5 h-5" }),
2700
+ onClick: () => toast(t("templates.headerVariations.messagesOpenedToast"))
2701
+ }
2702
+ ] : void 0
2703
+ }
2704
+ ),
2705
+ /* @__PURE__ */ jsx("div", { className: "h-32 flex items-center justify-center text-muted-foreground text-sm italic", children: t("templates.headerVariations.contentArea") })
2706
+ ] })
2707
+ ] })
2708
+ ] })
2709
+ ] }),
2710
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2711
+ /* @__PURE__ */ jsxs("section", { children: [
2712
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.sidebarVariations") }),
2713
+ /* @__PURE__ */ jsxs(Card, { children: [
2714
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2715
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.sidebar.title") }),
2716
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.sidebar.description") })
2717
+ ] }),
2718
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "assistant", className: "w-full", children: [
2719
+ /* @__PURE__ */ jsxs(TabsList, { className: "mb-4", children: [
2720
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "assistant", children: t("templates.sidebar.assistantMode") }),
2721
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "default", children: t("templates.sidebar.defaultMode") })
2722
+ ] }),
2723
+ /* @__PURE__ */ jsxs("div", { className: "mb-6 p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2724
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: t("templates.sidebarControls.footerSettings") }),
2725
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 mt-2", children: [
2726
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2727
+ /* @__PURE__ */ jsx(
2728
+ Switch,
2729
+ {
2730
+ id: "show-user",
2731
+ checked: showSidebarUser,
2732
+ onCheckedChange: setShowSidebarUser
2733
+ }
2734
+ ),
2735
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-user", className: "cursor-pointer", children: t("templates.sidebarControls.userProfile") })
2736
+ ] }),
2737
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2738
+ /* @__PURE__ */ jsx(
2739
+ Switch,
2740
+ {
2741
+ id: "show-settings",
2742
+ checked: showSidebarSettings,
2743
+ onCheckedChange: setShowSidebarSettings
2744
+ }
2745
+ ),
2746
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-settings", className: "cursor-pointer", children: t("templates.sidebarControls.settings") })
2747
+ ] }),
2748
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2749
+ /* @__PURE__ */ jsx(
2750
+ Switch,
2751
+ {
2752
+ id: "show-logout",
2753
+ checked: showSidebarLogout,
2754
+ onCheckedChange: setShowSidebarLogout
2755
+ }
2756
+ ),
2757
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-logout", className: "cursor-pointer", children: t("templates.sidebarControls.logoutButton") })
2758
+ ] })
2759
+ ] }),
2760
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 pt-6 border-t", children: [
2761
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
2762
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold", children: t("templates.sidebarControls.sidebarWidthDesktop") }),
2763
+ /* @__PURE__ */ jsxs("span", { className: "text-xs font-mono bg-muted px-2 py-1 rounded", children: [
2764
+ sidebarWidth,
2765
+ "px"
2766
+ ] })
2767
+ ] }),
2768
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
2769
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12 text-right", children: "240px" }),
2770
+ /* @__PURE__ */ jsx(
2771
+ Slider,
2772
+ {
2773
+ value: [sidebarWidth],
2774
+ onValueChange: (val) => setSidebarWidth(val[0]),
2775
+ min: 240,
2776
+ max: 450,
2777
+ step: 10,
2778
+ className: "flex-1",
2779
+ "aria-label": t("templates.sidebarControls.sidebarWidthAriaLabel")
2780
+ }
2781
+ ),
2782
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12", children: "450px" })
2783
+ ] })
2784
+ ] })
2785
+ ] }),
2786
+ /* @__PURE__ */ jsx(TabsContent, { value: "assistant", children: /* @__PURE__ */ jsxs(
2787
+ "div",
2788
+ {
2789
+ className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
2790
+ style: { transform: "translateZ(0)" },
2791
+ children: [
2792
+ /* @__PURE__ */ jsx(
2793
+ Sidebar,
2794
+ {
2795
+ expanded: true,
2796
+ width: sidebarWidth,
2797
+ onToggle: () => {
2798
+ },
2799
+ user: { email: "admin@xertica.com" },
2800
+ onLogout: () => toast(t("templates.sidebar.logoutToast")),
2801
+ location: { pathname: "/assistant/current" },
2802
+ navigate: () => {
2803
+ },
2804
+ variant: "assistant",
2805
+ search: {
2806
+ show: true,
2807
+ placeholder: t("templates.sidebar.searchTopicsPlaceholder"),
2808
+ filter: {
2809
+ show: true,
2810
+ content: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-2", children: [
2811
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase text-muted-foreground px-2", children: t("templates.sidebarControls.filterByStatus") }),
2812
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 p-1", children: [
2813
+ /* @__PURE__ */ jsx(Badge, { className: "bg-sidebar-foreground/20 text-sidebar-foreground border-none cursor-pointer hover:bg-sidebar-foreground/30", children: t("templates.sidebarControls.filterActive") }),
2814
+ /* @__PURE__ */ jsx(
2815
+ Badge,
2816
+ {
2817
+ variant: "outline",
2818
+ className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2819
+ children: t("templates.sidebarControls.filterArchived")
2820
+ }
2821
+ ),
2822
+ /* @__PURE__ */ jsx(
2823
+ Badge,
2824
+ {
2825
+ variant: "outline",
2826
+ className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2827
+ children: t("templates.sidebarControls.filterPending")
2828
+ }
2829
+ )
2830
+ ] })
2831
+ ] })
2832
+ }
2833
+ },
2834
+ fixedArea: {
2835
+ show: true,
2836
+ content: /* @__PURE__ */ jsxs(Button, { className: "w-full bg-sidebar-primary hover:bg-sidebar-primary/90 text-sidebar-primary-foreground shadow-lg font-bold border-none transition-all duration-300 transform hover:scale-[1.02] active:scale-[0.98]", children: [
2837
+ /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4 mr-2" }),
2838
+ t("templates.sidebar.newConversation")
2839
+ ] })
2840
+ },
2841
+ navigationGroups: [
2842
+ {
2843
+ id: "recent",
2844
+ label: t("templates.sidebar.recent"),
2845
+ icon: Clock,
2846
+ items: [
2847
+ {
2848
+ path: "/assistant/refatoracao",
2849
+ label: t("templates.sidebar.items.sidebarRefactor"),
2850
+ description: t("templates.sidebar.items.sidebarRefactorDescription"),
2851
+ actions: [
2852
+ {
2853
+ label: t("templates.sidebar.actions.rename"),
2854
+ icon: FileEdit,
2855
+ onClick: () => toast(t("templates.sidebar.actions.renameToast"))
2856
+ },
2857
+ {
2858
+ label: t("templates.sidebar.actions.move"),
2859
+ icon: ArrowRightLeft,
2860
+ children: [
2861
+ {
2862
+ label: t("templates.sidebar.actions.moveActive"),
2863
+ onClick: () => toast(t("templates.sidebar.actions.moveActiveToast"))
2864
+ },
2865
+ {
2866
+ label: t("templates.sidebar.actions.moveMonitoring"),
2867
+ onClick: () => toast(t("templates.sidebar.actions.moveMonitoringToast"))
2868
+ },
2869
+ {
2870
+ label: t("templates.sidebar.actions.moveArchive"),
2871
+ onClick: () => toast(t("templates.sidebar.actions.moveArchiveToast"))
2872
+ }
2873
+ ]
2874
+ },
2875
+ {
2876
+ label: t("templates.sidebar.actions.clear"),
2877
+ icon: Trash2,
2878
+ onClick: () => toast(t("templates.sidebar.actions.clearToast")),
2879
+ variant: "destructive"
2880
+ }
2881
+ ]
2882
+ }
2883
+ ]
2884
+ },
2885
+ {
2886
+ id: "projects",
2887
+ label: t("templates.sidebar.constructionMonitoring"),
2888
+ icon: Map$1,
2889
+ actions: [
2890
+ {
2891
+ label: t("templates.sidebar.actions.newCategory"),
2892
+ icon: Plus,
2893
+ onClick: () => toast(t("templates.sidebar.actions.newCategoryToast"))
2894
+ },
2895
+ {
2896
+ label: t("templates.sidebar.actions.archiveGroup"),
2897
+ icon: Archive,
2898
+ onClick: () => toast(t("templates.sidebar.actions.archiveGroupToast"))
2899
+ }
2900
+ ],
2901
+ items: [
2902
+ {
2903
+ path: "/assistant/br163",
2904
+ label: t("templates.sidebar.items.br163Restoration"),
2905
+ icon: () => /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-yellow-500" }),
2906
+ description: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 min-w-[160px]", children: [
2907
+ /* @__PURE__ */ jsx(
2908
+ Progress,
2909
+ {
2910
+ value: 67,
2911
+ className: "h-1.5 bg-sidebar-foreground/10"
2912
+ }
2913
+ ),
2914
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-[10px] text-sidebar-foreground/60", children: [
2915
+ /* @__PURE__ */ jsx("span", { children: t("templates.sidebar.items.br163Location") }),
2916
+ /* @__PURE__ */ jsx("span", { children: "67%" })
2917
+ ] })
2918
+ ] })
2919
+ }
2920
+ ]
2921
+ }
2922
+ ],
2923
+ footer: {
2924
+ showUser: showSidebarUser,
2925
+ showSettings: showSidebarSettings,
2926
+ showLogout: showSidebarLogout
2927
+ }
2928
+ }
2929
+ ),
2930
+ /* @__PURE__ */ jsx(
2931
+ "div",
2932
+ {
2933
+ className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
2934
+ style: { left: `${sidebarWidth}px` },
2935
+ children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: t("templates.sidebar.assistantContent") })
2936
+ }
2937
+ )
2938
+ ]
2939
+ }
2940
+ ) }),
2941
+ /* @__PURE__ */ jsx(TabsContent, { value: "default", children: /* @__PURE__ */ jsxs(
2942
+ "div",
2943
+ {
2944
+ className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
2945
+ style: { transform: "translateZ(0)" },
2946
+ children: [
2947
+ /* @__PURE__ */ jsx(
2948
+ Sidebar,
2949
+ {
2950
+ expanded: true,
2951
+ width: sidebarWidth,
2952
+ onToggle: () => {
2953
+ },
2954
+ user: {
2955
+ name: "Ariel Santos",
2956
+ email: "admin@xertica.com",
2957
+ avatar: "https://github.com/shadcn.png"
2958
+ },
2959
+ onLogout: () => toast(t("templates.sidebar.logoutToast")),
2960
+ onSettingsClick: () => toast(t("templates.sidebar.settingsClickedToast")),
2961
+ location: { pathname: "/home" },
2962
+ navigate: () => {
2963
+ },
2964
+ variant: "default",
2965
+ routes: [
2966
+ { path: "/home", label: t("templates.sidebar.routes.home"), icon: Home },
2967
+ { path: "/dashboard", label: t("templates.sidebar.routes.dashboard"), icon: Users },
2968
+ { path: "/settings", label: t("templates.sidebar.routes.settings"), icon: Settings }
2969
+ ],
2970
+ footer: {
2971
+ showUser: showSidebarUser,
2972
+ showSettings: showSidebarSettings,
2973
+ showLogout: showSidebarLogout
2974
+ }
2975
+ }
2976
+ ),
2977
+ /* @__PURE__ */ jsx(
2978
+ "div",
2979
+ {
2980
+ className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
2981
+ style: { left: `${sidebarWidth}px` },
2982
+ children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: t("templates.sidebar.defaultContent") })
2983
+ }
2984
+ )
2985
+ ]
2986
+ }
2987
+ ) })
2988
+ ] }) })
2989
+ ] })
2990
+ ] }),
2991
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2992
+ /* @__PURE__ */ jsxs(Card, { className: "mt-8", children: [
2993
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2994
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.footer.title") }),
2995
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.footer.subtitle") })
2996
+ ] }),
2997
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
2998
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2999
+ t("templates.footer.descriptionPart1"),
3000
+ /* @__PURE__ */ jsx("code", { className: "bg-muted px-2 py-1 rounded-[var(--radius-sm)] [font-size:var(--text-small)]", children: "xertica-ui" }),
3001
+ t("templates.footer.descriptionPart2")
3002
+ ] }),
3003
+ /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
3004
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.footer.tipTitle") }),
3005
+ /* @__PURE__ */ jsxs(AlertDescription, { children: [
3006
+ t("templates.footer.tipDescriptionPart1"),
3007
+ /* @__PURE__ */ jsx("code", { className: "bg-muted px-1 rounded", children: "styles/xertica/tokens.css" }),
3008
+ t("templates.footer.tipDescriptionPart2")
3009
+ ] })
3010
+ ] })
3011
+ ] })
3012
+ ] })
3013
+ ] }) }) }) })
3014
+ ]
3015
+ }
3016
+ );
3017
+ }
3018
+
3019
+ function TemplatePage() {
3020
+ const { user, logout } = useAuth();
3021
+ const layout = useOptionalLayout();
3022
+ const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
3023
+ const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
3024
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
3025
+ const sidebarWidth = layout?.sidebarWidth ?? 280;
3026
+ const assistenteExpanded = layout?.assistenteExpanded ?? localAssistantExpanded;
3027
+ const toggleSidebar = layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
3028
+ const toggleAssistente = layout?.toggleAssistente ?? (() => setLocalAssistantExpanded((value) => !value));
3029
+ const location = useLocation();
3030
+ const navigate = useNavigate();
3031
+ return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
3032
+ /* @__PURE__ */ jsx(
3033
+ Sidebar,
3034
+ {
3035
+ expanded: sidebarExpanded,
3036
+ width: sidebarWidth,
3037
+ onToggle: toggleSidebar,
3038
+ user: {
3039
+ ...user,
3040
+ name: "Ariel Santos",
3041
+ avatar: "https://github.com/shadcn.png"
3042
+ },
3043
+ onLogout: logout,
3044
+ onSettingsClick: () => navigate("/settings"),
3045
+ location,
3046
+ navigate,
3047
+ routes
3048
+ }
3049
+ ),
3050
+ /* @__PURE__ */ jsx(TemplateContent, {}),
3051
+ /* @__PURE__ */ jsx(
3052
+ XerticaAssistant,
3053
+ {
3054
+ isExpanded: assistenteExpanded,
3055
+ onToggle: toggleAssistente,
3056
+ onEvaluation: () => {
3057
+ }
3058
+ }
3059
+ )
3060
+ ] });
3061
+ }
3062
+
3063
+ function VerifyEmailPage() {
3064
+ const navigate = useNavigate();
3065
+ const location = useLocation();
3066
+ const { t } = useTranslation();
3067
+ const email = location.state?.email || "your@email.com";
3068
+ const [isResending, setIsResending] = useState(false);
3069
+ const [resendSuccess, setResendSuccess] = useState(false);
3070
+ const handleResend = async () => {
3071
+ setIsResending(true);
3072
+ setResendSuccess(false);
3073
+ await new Promise((resolve) => setTimeout(resolve, 1500));
3074
+ setIsResending(false);
3075
+ setResendSuccess(true);
3076
+ setTimeout(() => setResendSuccess(false), 3e3);
3077
+ };
3078
+ const handleSocialLogin = (_provider) => {
3079
+ };
3080
+ return /* @__PURE__ */ jsxs("div", { className: "h-full flex overflow-y-auto", children: [
3081
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
3082
+ /* @__PURE__ */ jsx(
3083
+ ImageWithFallback,
3084
+ {
3085
+ src: "https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format",
3086
+ alt: t("verifyEmail.heroImageAlt"),
3087
+ className: "absolute inset-0 w-full h-full object-cover"
3088
+ }
3089
+ ),
3090
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
3091
+ ] }),
3092
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
3093
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
3094
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
3095
+ /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
3096
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
3097
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
3098
+ XerticaLogo,
3099
+ {
3100
+ className: "h-12 w-auto text-primary dark:text-foreground",
3101
+ variant: "theme"
3102
+ }
3103
+ ) }),
3104
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx("div", { className: "p-4 bg-primary/10 rounded-[var(--radius)]", children: /* @__PURE__ */ jsx(Mail, { className: "w-12 h-12 text-primary" }) }) }),
3105
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("verifyEmail.heading") }),
3106
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t("verifyEmail.instructionsSent") }),
3107
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-primary", children: email })
3108
+ ] }),
3109
+ /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-3", children: [
3110
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("verifyEmail.instructions") }),
3111
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-muted-foreground", children: [
3112
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" }),
3113
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: t("verifyEmail.checkSpam") })
3114
+ ] })
3115
+ ] }),
3116
+ resendSuccess && /* @__PURE__ */ jsxs("div", { className: "bg-[var(--chart-2)]/10 border border-[var(--chart-2)]/20 rounded-[var(--radius)] p-3 flex items-center gap-2", children: [
3117
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-[var(--chart-2)] flex-shrink-0" }),
3118
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--chart-2)]", children: t("verifyEmail.resentSuccess") })
3119
+ ] }),
3120
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3121
+ /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: t("verifyEmail.notReceived") }),
3122
+ /* @__PURE__ */ jsx(
3123
+ Button,
3124
+ {
3125
+ variant: "outline",
3126
+ className: "w-full",
3127
+ onClick: handleResend,
3128
+ disabled: isResending,
3129
+ children: isResending ? t("verifyEmail.resending") : t("verifyEmail.resend")
3130
+ }
3131
+ ),
3132
+ /* @__PURE__ */ jsxs(
3133
+ Button,
3134
+ {
3135
+ type: "button",
3136
+ onClick: () => navigate("/login"),
3137
+ variant: "outline",
3138
+ className: "w-full text-muted-foreground hover:text-foreground",
3139
+ children: [
3140
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
3141
+ t("verifyEmail.backToLogin")
3142
+ ]
3143
+ }
3144
+ )
3145
+ ] }),
3146
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3147
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
3148
+ /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t("login.orContinueWith") }) })
3149
+ ] }),
3150
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3151
+ /* @__PURE__ */ jsxs(
3152
+ Button,
3153
+ {
3154
+ type: "button",
3155
+ variant: "outline",
3156
+ className: "w-full justify-center",
3157
+ onClick: () => handleSocialLogin(),
3158
+ children: [
3159
+ /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
3160
+ /* @__PURE__ */ jsx(
3161
+ "path",
3162
+ {
3163
+ fill: "#EA4335",
3164
+ d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
3165
+ }
3166
+ ),
3167
+ /* @__PURE__ */ jsx(
3168
+ "path",
3169
+ {
3170
+ fill: "#4285F4",
3171
+ d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
3172
+ }
3173
+ ),
3174
+ /* @__PURE__ */ jsx(
3175
+ "path",
3176
+ {
3177
+ fill: "#FBBC05",
3178
+ d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
3179
+ }
3180
+ ),
3181
+ /* @__PURE__ */ jsx(
3182
+ "path",
3183
+ {
3184
+ fill: "#34A853",
3185
+ d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
3186
+ }
3187
+ ),
3188
+ /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
3189
+ ] }),
3190
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithGoogle") })
3191
+ ]
3192
+ }
3193
+ ),
3194
+ /* @__PURE__ */ jsxs(
3195
+ Button,
3196
+ {
3197
+ type: "button",
3198
+ variant: "outline",
3199
+ className: "w-full justify-center",
3200
+ onClick: () => handleSocialLogin(),
3201
+ children: [
3202
+ /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
3203
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithMTLogin") })
3204
+ ]
3205
+ }
3206
+ ),
3207
+ /* @__PURE__ */ jsx(
3208
+ Button,
3209
+ {
3210
+ type: "button",
3211
+ variant: "outline",
3212
+ className: "w-full justify-center font-normal",
3213
+ onClick: () => handleSocialLogin(),
3214
+ children: /* @__PURE__ */ jsx("span", { children: t("login.signInWithGovBr") })
3215
+ }
3216
+ )
3217
+ ] })
3218
+ ] })
3219
+ ] })
3220
+ ] });
3221
+ }
3222
+
3223
+ export { ForgotPasswordPage as F, HomeContent as H, LoginPage as L, ResetPasswordPage as R, TemplateContent as T, VerifyEmailPage as V, HomePage as a, TemplatePage as b };