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