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