{"version":3,"file":"WhatsAppWelcomeButton.BfsQd9AX.mjs","names":["React.useState","React.useCallback","React.useMemo","React.useState","React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/ZPkCMuNnt0rF0iDo0VwW/9Bwy6pyX45oybBy1mKk6/SiteNavigation.js","https:/framerusercontent.com/modules/C3NzYC4vAKlutLoVJTRX/7TlziNxS0Uu6UazcPjTE/WhatsAppWelcomeButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// User request: Create a new self-contained Framer code component named SiteNavigation that replaces the existing canvas menu, guarantees browser navigation via button onClick handlers, matches the current Portuguese financial visual design, supports desktop horizontal and phone vertical layouts, fills available width, has intrinsic responsive height, supports the style prop, uses Inter, and exposes optional controls for brand text and CTA label.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function SiteNavigation(props){const{brandText,ctaLabel,style}=props;const[isMobile,setIsMobile]=React.useState(false);React.useEffect(()=>{if(typeof window===\"undefined\")return;const updateLayout=()=>{const nextIsMobile=window.innerWidth<768;React.startTransition(()=>setIsMobile(nextIsMobile));};updateLayout();window.addEventListener(\"resize\",updateLayout);return()=>window.removeEventListener(\"resize\",updateLayout);},[]);const navigate=React.useCallback(path=>{if(typeof window===\"undefined\")return;window.location.href=path;},[]);const navItems=React.useMemo(()=>[{label:\"\\xc1reas de poupan\\xe7a\",path:\"/#servicos\"},{label:\"Como funciona\",path:\"/#como-funciona\"},{label:\"Resultados\",path:\"/#resultados\"},{label:\"Equipa\",path:\"/equipa\"},{label:\"Contacto\",path:\"/#contacto\"}],[]);return /*#__PURE__*/_jsx(\"header\",{style:{position:\"relative\",width:\"100%\",boxSizing:\"border-box\",background:\"#FFFFFF\",fontFamily:\"Inter, sans-serif\",padding:isMobile?\"14px 16px\":\"16px 24px\",borderBottom:\"1px solid #EEEEEE\",...style},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",width:\"100%\",maxWidth:1200,margin:\"0 auto\",flexDirection:isMobile?\"column\":\"row\",alignItems:isMobile?\"stretch\":\"center\",justifyContent:\"space-between\",gap:isMobile?14:20},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:\"#06054A\",fontSize:24,lineHeight:1.1,fontWeight:700,letterSpacing:\"-0.02em\"},\"aria-label\":\"Marca\",children:brandText}),/*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Navega\\xe7\\xe3o principal\",style:{display:\"flex\",flexDirection:isMobile?\"column\":\"row\",alignItems:isMobile?\"stretch\":\"center\",gap:isMobile?8:10,width:isMobile?\"100%\":\"auto\"},children:[navItems.map(item=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>navigate(item.path),\"aria-label\":item.label,style:{appearance:\"none\",border:\"none\",background:\"transparent\",color:\"#06054A\",fontSize:15,fontWeight:500,lineHeight:1.2,padding:isMobile?\"10px 12px\":\"8px 10px\",borderRadius:10,textAlign:isMobile?\"left\":\"center\",cursor:\"pointer\",width:isMobile?\"100%\":\"auto\"},children:item.label},item.label)),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>navigate(\"/#simulacao\"),\"aria-label\":ctaLabel,style:{appearance:\"none\",border:\"none\",background:\"#00A4D6\",color:\"#FFFFFF\",fontSize:14,fontWeight:700,lineHeight:1.1,padding:isMobile?\"12px 14px\":\"11px 14px\",borderRadius:999,cursor:\"pointer\",width:isMobile?\"100%\":\"auto\",textAlign:\"center\"},children:ctaLabel})]})]})});}addPropertyControls(SiteNavigation,{brandText:{type:ControlType.String,title:\"Marca\",defaultValue:\"Poupamos Juntos\"},ctaLabel:{type:ControlType.String,title:\"CTA\",defaultValue:\"Simular Poupan\\xe7a\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SiteNavigation\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SiteNavigation.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";// User request: Create a self-contained Framer component named WhatsAppWelcomeButton with SSR-safe localStorage first-visit bubble behavior, persistent WhatsApp floating contact button, Portuguese defaults, polished financial-site styling, accessible interaction, and configurable property controls.\n/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function WhatsAppWelcomeButton(props){const{message,whatsappNumber,accentColor,textColor,cornerRadius,bubbleText,buttonLabel,style}=props;const isStatic=useIsStaticRenderer();const[showBubble,setShowBubble]=React.useState(false);React.useEffect(()=>{if(isStatic)return;if(typeof window===\"undefined\")return;try{const storageKey=\"framer_whatsapp_welcome_seen\";const seen=window.localStorage.getItem(storageKey);if(!seen){React.startTransition(()=>setShowBubble(true));window.localStorage.setItem(storageKey,\"1\");}}catch(_error){React.startTransition(()=>setShowBubble(true));}},[isStatic]);const waUrl=React.useMemo(()=>{const safeNumber=whatsappNumber.replace(/[^\\d]/g,\"\");return`https://wa.me/${safeNumber}?text=${encodeURIComponent(message)}`;},[whatsappNumber,message]);const openWhatsApp=React.useCallback(()=>{if(typeof window===\"undefined\")return;window.open(waUrl,\"_blank\",\"noopener,noreferrer\");},[waUrl]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:92,height:116,pointerEvents:\"none\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:isStatic?\"relative\":\"fixed\",right:isStatic?\"auto\":18,bottom:isStatic?\"auto\":18,display:\"flex\",flexDirection:\"column\",alignItems:\"flex-end\",gap:8,zIndex:999,pointerEvents:\"auto\",fontFamily:\"Inter, sans-serif\",...style},children:[showBubble?/*#__PURE__*/_jsx(\"div\",{style:{background:\"#FFFFFF\",color:textColor,fontSize:13,lineHeight:1,borderRadius:cornerRadius,padding:\"8px 12px\",boxShadow:\"0 8px 20px rgba(6, 5, 74, 0.12)\",border:\"1px solid rgba(6, 5, 74, 0.08)\",whiteSpace:\"nowrap\"},children:bubbleText}):null,/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:openWhatsApp,\"aria-label\":\"Abrir conversa no WhatsApp\",style:{width:56,height:56,borderRadius:\"50%\",border:\"none\",background:accentColor,color:\"#FFFFFF\",fontSize:17,fontWeight:700,letterSpacing:\"0.02em\",cursor:\"pointer\",boxShadow:\"0 10px 24px rgba(0, 164, 214, 0.35)\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\"},children:buttonLabel})]})});}addPropertyControls(WhatsAppWelcomeButton,{message:{type:ControlType.String,title:\"Mensagem\",defaultValue:\"Ol\\xe1, gostaria de falar convosco.\"},whatsappNumber:{type:ControlType.String,title:\"WhatsApp\",defaultValue:\"351913123478\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#00A4D6\"},textColor:{type:ControlType.Color,title:\"Texto\",defaultValue:\"#06054A\"},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,step:1},bubbleText:{type:ControlType.String,title:\"Bubble\",defaultValue:\"Fale connosco!\"},buttonLabel:{type:ControlType.String,title:\"Etiqueta do bot\\xe3o\",defaultValue:\"Ol\\xe1\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WhatsAppWelcomeButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WhatsAppWelcomeButton.map"],"mappings":"mOAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,YAAU,WAAS,SAAO,EAAW,CAAC,EAAS,GAAaA,EAAe,EAAK,EAAE,MAAoB,CAAC,GA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