{"version":3,"file":"MenzzoForm.D1SoSKWZ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/fNz6YgROkgiVmx8C6UKC/jMUZKe3dSaCxrptP3Na7/MenzzoForm.js"],"sourcesContent":["/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth fill\n * @framerSupportedLayoutHeight fixed\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";export default function WhatsAppButton({phoneNumber,message,buttonText,bgColor,hoverColor,textColor,fontSize,fontFamily,paddingVertical,paddingHorizontal}){useEffect(()=>{const form=document.querySelector(\"form\");if(form){const originalSubmit=form.onsubmit;form.onsubmit=e=>{e.preventDefault();const formData=new FormData(form);const data=Object.fromEntries(formData.entries());let finalMessage=message;Object.entries(data).forEach(([key,value])=>{finalMessage+=`\n${key}: ${value}`;});const encodedMessage=encodeURIComponent(finalMessage);const whatsappLink=`https://wa.me/${phoneNumber}?text=${encodedMessage}`;window.open(whatsappLink,\"_blank\");if(originalSubmit){originalSubmit.call(form,e);}};}},[phoneNumber,message]);return /*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{backgroundColor:bgColor,color:textColor,fontSize:`${fontSize}px`,fontFamily:fontFamily,padding:`${paddingVertical}px ${paddingHorizontal}px`,border:\"none\",borderRadius:\"5px\",cursor:\"pointer\",transition:\"background-color 0.3s\",width:\"100%\",textAlign:\"center\"},onMouseOver:e=>e.currentTarget.style.backgroundColor=hoverColor,onMouseOut:e=>e.currentTarget.style.backgroundColor=bgColor,children:buttonText});}WhatsAppButton.defaultProps={phoneNumber:\"5511999999999\",message:\"Ol\\xe1, gostaria de saber mais!\",buttonText:\"Fale no WhatsApp\",bgColor:\"#25D366\",hoverColor:\"#128C7E\",textColor:\"#FFFFFF\",fontSize:16,fontFamily:\"Arial\",paddingVertical:10,paddingHorizontal:20};addPropertyControls(WhatsAppButton,{phoneNumber:{type:ControlType.String,title:\"WhatsApp N\\xfamero\",defaultValue:\"5511999999999\"},message:{type:ControlType.String,title:\"Mensagem Inicial\",defaultValue:\"Ol\\xe1, gostaria de saber mais!\"},buttonText:{type:ControlType.String,title:\"Texto do Bot\\xe3o\",defaultValue:\"Fale no WhatsApp\"},bgColor:{type:ControlType.Color,title:\"Cor de Fundo\",defaultValue:\"#25D366\"},hoverColor:{type:ControlType.Color,title:\"Cor do Hover\",defaultValue:\"#128C7E\"},textColor:{type:ControlType.Color,title:\"Cor do Texto\",defaultValue:\"#FFFFFF\"},fontSize:{type:ControlType.Number,title:\"Tamanho da Fonte\",min:10,max:50,defaultValue:16},fontFamily:{type:ControlType.String,title:\"Fonte\",defaultValue:\"Arial\"},paddingVertical:{type:ControlType.Number,title:\"Padding Vertical\",min:0,max:50,defaultValue:10},paddingHorizontal:{type:ControlType.Number,title:\"Padding Horizontal\",min:0,max:50,defaultValue:20}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WhatsAppButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MenzzoForm.map"],"mappings":"0SAI+H,SAAwB,EAAe,CAAC,cAAY,UAAQ,aAAW,UAAQ,aAAW,YAAU,WAAS,aAAW,kBAAgB,oBAAkB,CAAC,CACvB,MADwB,GAAU,IAAI,CAAC,IAAM,EAAK,SAAS,cAAc,OAAO,CAAC,GAAG,EAAK,CAAC,IAAM,EAAe,EAAK,SAAS,EAAK,SAAS,GAAG,CAAC,EAAE,gBAAgB,CAAC,IAAM,EAAS,IAAI,SAAS,GAAY,EAAK,OAAO,YAAY,EAAS,SAAS,CAAC,CAAK,EAAa,EAAQ,OAAO,QAAQ,EAAK,CAAC,QAAQ,CAAC,CAAC,EAAI,EAAM,GAAG,CAAC,IAAe;EAC5kB,EAAI,IAAI,GAAS,EAAC,CAAC,IAAM,EAAe,mBAAmB,EAAa,CAAO,GAAc,gBAAgB,EAAY,QAAQ,IAA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