{"version":3,"file":"ConsentMap.CxgzZ95G.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","p","ce","init_framer_BpuvUAiZ","addPropertyControls","useIsStaticRenderer","ControlType","ConsentMap","address","props","zoom","radius","isStatic","allowed","setAllowed","on","box","src","init_ConsentMap","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/V46Q6BVgyrCL8nmYBj06/Fce8TOhSj2H4FUbF162F/ConsentMap.js"],"sourcesContent":["// Consent Map\n// Google Maps embed that only loads after cookie consent (\"cookie-consent\" = \"all\")\n// or after the visitor clicks \"Karte laden\" for this map. Until then a calm placeholder shows.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 480\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ConsentMap(props){const address=props.address??\"Hauptstrasse, 4147 Aesch BL\";const zoom=props.zoom??15;const radius=props.radius??24;const isStatic=useIsStaticRenderer();const[allowed,setAllowed]=useState(false);useEffect(()=>{if(isStatic)return;try{if(localStorage.getItem(\"cookie-consent\")===\"all\")setAllowed(true);}catch{}const on=e=>setAllowed(e.detail===\"all\");window.addEventListener(\"cookie-consent\",on);return()=>window.removeEventListener(\"cookie-consent\",on);},[isStatic]);const box={...props.style,position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:radius,overflow:\"hidden\"};if(allowed){const src=`https://www.google.com/maps?q=${encodeURIComponent(address)}&z=${zoom}&output=embed`;return /*#__PURE__*/_jsx(\"div\",{style:box,children:/*#__PURE__*/_jsx(\"iframe\",{title:`Karte: ${address}`,src:src,loading:\"lazy\",referrerPolicy:\"no-referrer-when-downgrade\",style:{border:0,width:\"100%\",height:\"100%\",filter:\"grayscale(0.35)\"}})});}return /*#__PURE__*/_jsxs(\"div\",{style:{...box,background:props.background??\"#F3F3F1\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:14,padding:32,boxSizing:\"border-box\",textAlign:\"center\",fontFamily:\"'Jost', sans-serif\"},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"30\",height:\"30\",viewBox:\"0 0 256 256\",\"aria-hidden\":true,children:/*#__PURE__*/_jsx(\"path\",{fill:props.buttonColor??\"#A9763F\",d:\"M128 16a88.1 88.1 0 0 0-88 88c0 75.3 80 132.2 83.4 134.6a8 8 0 0 0 9.2 0C136 236.2 216 179.3 216 104a88.1 88.1 0 0 0-88-88Zm0 56a32 32 0 1 1-32 32 32 32 0 0 1 32-32Z\",opacity:\".9\"})}),/*#__PURE__*/_jsx(\"div\",{style:{color:props.textColor??\"#1C1F1E\",fontSize:17,fontWeight:500,letterSpacing:\"-0.02em\"},children:address}),/*#__PURE__*/_jsx(\"div\",{style:{color:props.mutedColor??\"#6B6E6C\",fontSize:14,lineHeight:\"1.55em\",maxWidth:420},children:\"Die Karte wird von Google Maps geladen. Dabei werden Daten an Google \\xfcbertragen.\"}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:10,flexWrap:\"wrap\",justifyContent:\"center\",marginTop:4},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setAllowed(true),style:{height:44,padding:\"0 22px\",borderRadius:999,border:\"none\",background:\"#151515\",color:\"#FFFFFF\",fontFamily:\"'Jost', sans-serif\",fontSize:14,fontWeight:500,cursor:\"pointer\"},children:\"Karte laden\"}),/*#__PURE__*/_jsx(\"a\",{href:`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`,target:\"_blank\",rel:\"noopener\",style:{height:44,padding:\"0 22px\",borderRadius:999,border:\"1px solid rgba(28,31,30,0.18)\",color:props.textColor??\"#1C1F1E\",fontSize:14,fontWeight:500,display:\"flex\",alignItems:\"center\",textDecoration:\"none\"},children:\"Route planen\"})]})]});}ConsentMap.displayName=\"Consent Map\";addPropertyControls(ConsentMap,{address:{type:ControlType.String,title:\"Adresse\",defaultValue:\"Hauptstrasse, 4147 Aesch BL\"},zoom:{type:ControlType.Number,title:\"Zoom\",defaultValue:15,min:10,max:20,step:1},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:24,min:0,max:48},background:{type:ControlType.Color,title:\"Platzhalter\",defaultValue:\"#F3F3F1\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#1C1F1E\"},mutedColor:{type:ControlType.Color,title:\"Text hell\",defaultValue:\"#6B6E6C\"},buttonColor:{type:ControlType.Color,title:\"Akzent\",defaultValue:\"#A9763F\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ConsentMap\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"480\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ConsentMap.map"],"mappings":"A,oMAQG,SAAwBY,EAAW,EAAM,CAAC,IAAMC,EAAQC,EAAM,SAAS,8BAAoCC,EAAKD,EAAM,MAAM,GAASE,EAAOF,EAAM,QAAQ,GAASG,EAASP,EAAoB,EAAO,CAACQ,EAAQC,GAAYnB,EAAS,EAAK,EAAEO,MAAc,CAAC,GAAGU,EAAS,OAAO,GAAG,CAAI,aAAa,QAAQ,gBAAgB,IAAI,OAAME,EAAW,EAAI,CAAE,MAAM,CAAC,CAAC,IAAMC,EAAG,GAAGD,EAAW,EAAE,SAAS,KAAK,EAA+C,OAA7Cf,EAAO,iBAAiB,iBAAiBgB,CAAE,MAAYhB,EAAO,oBAAoB,iBAAiBgB,CAAE,CAAE,EAAE,CAACH,CAAQ,CAAC,EAAE,IAAMI,EAAI,CAAC,GAAGP,EAAM,MAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,aAAaE,E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