{"version":3,"file":"Termin.D_6n_TGG.mjs","names":["React.useState","React.useCallback"],"sources":["https:/framerusercontent.com/modules/pQl7jCiASYMPMknzyPDM/Pxi5P8W01HwQsfHx4uDk/Termin.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ConsentBookingIframe(props){const[hasConsent,setHasConsent]=React.useState(false);// --- 1. LOGIK: CONSENT PRÜFEN (LocalStorage) ---\nconst checkConsent=React.useCallback(()=>{if(typeof window===\"undefined\"||!window.localStorage)return;const rawValue=window.localStorage.getItem(props.storageKey);if(!rawValue){setHasConsent(false);return;}try{const parsed=JSON.parse(rawValue);if(parsed[props.jsonKey]===true){setHasConsent(true);}else{setHasConsent(false);}}catch(e){setHasConsent(false);}},[props.storageKey,props.jsonKey]);React.useEffect(()=>{checkConsent();const handleUpdate=()=>setTimeout(checkConsent,100);window.addEventListener(\"cookie_consent_update\",handleUpdate);const interval=setInterval(checkConsent,1e3);return()=>{window.removeEventListener(\"cookie_consent_update\",handleUpdate);clearInterval(interval);};},[checkConsent]);// --- STYLES ---\nconst fallbackStyle={backgroundColor:props.fallbackBgColor,color:props.fallbackTextColor,padding:\"12px 24px\",borderRadius:\"8px\",textDecoration:\"none\",fontWeight:\"bold\",textAlign:\"center\",display:\"inline-block\",cursor:\"pointer\",fontFamily:\"Inter, sans-serif\"};// --- RENDER ---\n// STATUS: CONSENT VORHANDEN -> IFRAME\nif(hasConsent){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"iframe\",{src:props.iframeUrl,title:\"Booking Widget\",width:\"100%\",height:\"100%\",frameBorder:\"0\",loading:\"lazy\",style:{border:\"none\",minHeight:props.minHeight,// --- NEUE ZEILEN FÜR SCROLL VERHALTEN ---\noverscrollBehaviorY:\"auto\",WebkitOverflowScrolling:\"touch\"},allow:\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"})});}// STATUS: KEIN CONSENT -> FALLBACK BUTTON\nreturn /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(\"a\",{href:props.fallbackUrl,style:fallbackStyle,target:\"_blank\",rel:\"noopener noreferrer\",children:props.fallbackButtonText})});}addPropertyControls(ConsentBookingIframe,{// Sektion: Consent Logic\nstorageKey:{type:ControlType.String,title:\"Storage Key\",defaultValue:\"framerCookiesConsentMode\"},jsonKey:{type:ControlType.String,title:\"Consent Type\",defaultValue:\"marketing\"},// Sektion: Iframe (Consent = JA)\niframeUrl:{type:ControlType.String,title:\"Iframe URL\",defaultValue:\"https://connect.shore.com/widget/...\",description:\"Die URL, die im Iframe geladen wird.\"},minHeight:{type:ControlType.String,title:\"Min Height\",defaultValue:\"600px\",description:\"Mindesth\\xf6he f\\xfcr den Iframe, falls der Container zu klein ist.\"},// Sektion: Fallback Button (Consent = NEIN)\nfallbackButtonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Termin buchen (Extern)\"},fallbackUrl:{type:ControlType.String,title:\"Fallback Link\",defaultValue:\"https://deine-seite.de/termin\"},fallbackBgColor:{type:ControlType.Color,title:\"Button Farbe\",defaultValue:\"#0099ff\"},fallbackTextColor:{type:ControlType.Color,title:\"Text Farbe\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ConsentBookingIframe\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Termin.map"],"mappings":"sMAA2H,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAe,GAAM,CAC9N,EAAaC,MAAsB,CAAC,GAAU,IAAS,QAAa,CAAC,EAAO,aA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