{"version":3,"file":"LegalConsent.DAt63bTo.mjs","names":["React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/cgUwuny4nR1dJPxEX0jv/8x0Ytk7hzUMX4WOQ6cRK/LegalConsent.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export default function LegalConsent(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[visible,setVisible]=React.useState(false);const[checked,setChecked]=React.useState(false);const[isDesktop,setIsDesktop]=React.useState(false);React.useEffect(()=>{if(isCanvas)return;const checkWidth=()=>{setIsDesktop(window.innerWidth>=768);};checkWidth();window.addEventListener(\"resize\",checkWidth);return()=>window.removeEventListener(\"resize\",checkWidth);},[isCanvas]);React.useEffect(()=>{if(isCanvas)return;const consent=localStorage.getItem(\"legalConsent\");if(!consent){setVisible(true);document.body.style.overflow=\"hidden\";}else{document.body.classList.add(\"legal-consent-granted\");}},[isCanvas]);const handleContinue=()=>{if(!checked)return;localStorage.setItem(\"legalConsent\",\"true\");localStorage.setItem(\"legalConsentDate\",new Date().toISOString());document.body.classList.add(\"legal-consent-granted\");document.body.style.overflow=\"auto\";setVisible(false);};// 🚀 No renderizar nada en el Canvas de Framer\nif(isCanvas)return null;if(!visible)return null;const modalStyle={position:\"fixed\",bottom:20,right:isDesktop?20:\"50%\",transform:isDesktop?\"none\":\"translateX(50%)\",background:\"#FFFFFF\",padding:28,borderRadius:16,boxShadow:\"0 30px 80px rgba(0,0,0,0.25)\",fontFamily:\"Inter, sans-serif\",width:isDesktop?490:\"90%\",maxWidth:490,display:\"flex\",flexDirection:\"column\",gap:16,zIndex:1e5};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:overlayStyle}),/*#__PURE__*/_jsxs(\"div\",{style:modalStyle,children:[/*#__PURE__*/_jsx(\"h2\",{style:titleStyle,children:\"Privacy & Data Collection Notice\"}),/*#__PURE__*/_jsxs(\"p\",{style:textStyle,children:[\"Before continuing, please confirm that you have read and agree to our\",\" \",/*#__PURE__*/_jsx(\"a\",{href:props.privacyUrl,target:\"_blank\",rel:\"noopener noreferrer\",style:linkStyle,children:\"Privacy Policy\"}),\" \",\"and consent to data collection.\"]}),/*#__PURE__*/_jsxs(\"label\",{style:checkboxContainer,children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:checked,onChange:e=>setChecked(e.target.checked),style:{width:16,height:16}}),\"I have read and accept the Privacy Policy.\"]}),/*#__PURE__*/_jsx(\"button\",{onClick:handleContinue,disabled:!checked,style:{...buttonStyle,background:checked?\"#2E75FF\":\"#A0A0A0\",cursor:checked?\"pointer\":\"not-allowed\",opacity:checked?1:.6},children:\"Continue to Site\"})]})]});}/* ------------------ STYLES ------------------ */const overlayStyle={position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",background:\"rgba(0,0,0,0.55)\",zIndex:99999};const titleStyle={margin:0,fontSize:18,fontWeight:700,color:\"#162B54\"};const textStyle={fontSize:14,lineHeight:1.6,color:\"#616F8A\"};const linkStyle={color:\"#2E75FF\",textDecoration:\"underline\"};const checkboxContainer={display:\"flex\",alignItems:\"center\",fontSize:14,color:\"#162B54\",gap:8,cursor:\"pointer\"};const buttonStyle={width:\"100%\",padding:\"12px 20px\",borderRadius:12,border:\"none\",color:\"#fff\",fontSize:14,fontWeight:600,transition:\"all 0.2s ease\"};/* ------------------ PROPS ------------------ */addPropertyControls(LegalConsent,{privacyUrl:{type:ControlType.String,title:\"Privacy URL\",defaultValue:\"/privacy-policy\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LegalConsent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LegalConsent.map"],"mappings":"qNAA4K,SAAwB,EAAa,EAAM,CAAC,IAAM,EAAS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