{"version":3,"file":"Overlay_maybe_.-ier5fKY.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/yjFl40G2TXkXwvk4hzr2/d51msgKaxIIHAKfKLNpR/Overlay_maybe_.js"],"sourcesContent":["\"use client\";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * FramerOverlay - Frei bespielbare Overlay-Komponente für Framer\n *\n * Features:\n * - Erscheint beim Laden der Seite sofort\n * - Verschwindet automatisch nach 8 Sekunden (konfigurierbar)\n * - Kann durch Klick auf den Hintergrund geschlossen werden (auch mit Komponenten!)\n * - Kann durch Klick auf Close-Button geschlossen werden\n * - Erscheint erneut beim Neuladen der Seite\n * - Komplett frei gestaltbar - ziehe einfach Komponenten in die FramerOverlay!\n * - Responsive für Desktop, Tablet, Handy\n * - Unterstützt Videos, Animationen, Bilder, Text - alles was Framer kann!\n */export default function FramerOverlay({autoHideDelay=8e3,backgroundColor=\"rgba(0, 0, 0, 0.9)\",backgroundColorMobile,backgroundColorTablet,backgroundColorDesktop,children,showCloseButton=true,closeButtonText=\"\\xd7\",closeButtonSize=40,closeButtonSizeMobile,closeButtonSizeTablet,closeButtonSizeDesktop,closeButtonColor=\"#FFFFFF\",closeButtonPosition=\"top-right\",className,style}){const[visible,setVisible]=useState(true);const[isMounted,setIsMounted]=useState(false);// Komponente als gemountet markieren (für Animationen)\nuseEffect(()=>{setIsMounted(true);},[]);// Auto-Hide nach X Sekunden + Redirect auf /home von der Homepage (/)\nuseEffect(()=>{if(!visible||!isMounted)return;const timer=setTimeout(()=>{setVisible(false);if(typeof window!==\"undefined\"){const path=window.location.pathname;if(path===\"/\"||path===\"\"){window.location.href=\"/home\";}}},autoHideDelay);return()=>clearTimeout(timer);},[visible,autoHideDelay,isMounted]);// Schließen durch Close-Button\nconst handleClose=()=>{setVisible(false);};// Schließen bei Klick auf Hintergrund - funktioniert auch wenn Komponenten im Overlay sind\nconst handleBackgroundClick=e=>{// Prüfe ob der Klick direkt auf dem Hintergrund war (nicht auf einem Child)\nif(e.target===e.currentTarget){setVisible(false);}};// Position für Close-Button\nconst getCloseButtonPosition=()=>{switch(closeButtonPosition){case\"top-left\":return{top:\"20px\",left:\"20px\"};case\"top-right\":return{top:\"20px\",right:\"20px\"};case\"bottom-left\":return{bottom:\"20px\",left:\"20px\"};case\"bottom-right\":return{bottom:\"20px\",right:\"20px\"};default:return{top:\"20px\",right:\"20px\"};}};if(!visible)return null;// Basis-Werte für Responsive\nconst baseBgColor=backgroundColor||\"rgba(0, 0, 0, 0.9)\";const baseButtonSize=typeof closeButtonSize===\"number\"?closeButtonSize:40;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .framer-overlay-bg {\n                    background-color: ${backgroundColorMobile||baseBgColor};\n                }\n                @media (min-width: 768px) {\n                    .framer-overlay-bg {\n                        background-color: ${backgroundColorTablet||baseBgColor};\n                    }\n                }\n                @media (min-width: 1024px) {\n                    .framer-overlay-bg {\n                        background-color: ${backgroundColorDesktop||baseBgColor};\n                    }\n                }\n                .framer-overlay-close-btn {\n                    width: ${closeButtonSizeMobile||baseButtonSize}px;\n                    height: ${closeButtonSizeMobile||baseButtonSize}px;\n                    font-size: ${(closeButtonSizeMobile||baseButtonSize)*.8}px;\n                }\n                @media (min-width: 768px) {\n                    .framer-overlay-close-btn {\n                        width: ${closeButtonSizeTablet||baseButtonSize}px;\n                        height: ${closeButtonSizeTablet||baseButtonSize}px;\n                        font-size: ${(closeButtonSizeTablet||baseButtonSize)*.8}px;\n                    }\n                }\n                @media (min-width: 1024px) {\n                    .framer-overlay-close-btn {\n                        width: ${closeButtonSizeDesktop||baseButtonSize}px;\n                        height: ${closeButtonSizeDesktop||baseButtonSize}px;\n                        font-size: ${(closeButtonSizeDesktop||baseButtonSize)*.8}px;\n                    }\n                }\n            `}),/*#__PURE__*/_jsxs(\"div\",{className:`${className||\"\"} framer-overlay-bg`,style:{position:\"fixed\",top:0,left:0,right:0,bottom:0,width:\"100vw\",height:\"100vh\",zIndex:9999,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",overflow:\"auto\",...style},onClick:handleBackgroundClick,children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",maxWidth:\"100%\",maxHeight:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",pointerEvents:\"none\",cursor:\"default\"},children:/*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"auto\"},children:children})}),showCloseButton&&/*#__PURE__*/_jsx(\"button\",{className:\"framer-overlay-close-btn\",onClick:e=>{e.stopPropagation();handleClose();},style:{position:\"absolute\",...getCloseButtonPosition(),display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",color:closeButtonColor,fontWeight:\"bold\",background:\"transparent\",border:\"none\",userSelect:\"none\",zIndex:1e4,pointerEvents:\"auto\"},children:closeButtonText})]})]});}addPropertyControls(FramerOverlay,{// Grundlegende Einstellungen\nautoHideDelay:{type:ControlType.Number,defaultValue:8e3,min:0,max:6e4,step:100,title:\"Auto-Hide Delay (ms)\",description:\"Zeit in Millisekunden bis das Overlay automatisch verschwindet (0 = nie)\",unit:\"ms\"},backgroundColor:{type:ControlType.Color,defaultValue:\"rgba(0, 0, 0, 0.9)\",title:\"Hintergrundfarbe (Standard)\",description:\"Standard Hintergrundfarbe des Overlays\"},backgroundColorDesktop:{type:ControlType.Color,title:\"Hintergrundfarbe Desktop\",description:\"Hintergrundfarbe f\\xfcr Desktop (>1024px)\"},backgroundColorTablet:{type:ControlType.Color,title:\"Hintergrundfarbe Tablet\",description:\"Hintergrundfarbe f\\xfcr Tablet (768px-1024px)\"},backgroundColorMobile:{type:ControlType.Color,title:\"Hintergrundfarbe Mobile\",description:\"Hintergrundfarbe f\\xfcr Mobile (<768px)\"},// Close-Button Einstellungen\nshowCloseButton:{type:ControlType.Boolean,defaultValue:true,title:\"Close-Button anzeigen\",description:\"Zeigt einen Close-Button zum Schlie\\xdfen des Overlays\"},closeButtonText:{type:ControlType.String,defaultValue:\"\\xd7\",title:\"Close-Button Text\",description:\"Text/Symbol des Close-Buttons\",hidden:props=>!props.showCloseButton},closeButtonSize:{type:ControlType.Number,defaultValue:40,min:20,max:100,step:1,title:\"Close-Button Gr\\xf6\\xdfe (Standard)\",description:\"Standard Gr\\xf6\\xdfe des Close-Buttons\",hidden:props=>!props.showCloseButton},closeButtonSizeDesktop:{type:ControlType.Number,defaultValue:40,min:20,max:100,step:1,title:\"Close-Button Gr\\xf6\\xdfe Desktop\",description:\"Gr\\xf6\\xdfe f\\xfcr Desktop (>1024px)\",hidden:props=>!props.showCloseButton},closeButtonSizeTablet:{type:ControlType.Number,defaultValue:40,min:20,max:100,step:1,title:\"Close-Button Gr\\xf6\\xdfe Tablet\",description:\"Gr\\xf6\\xdfe f\\xfcr Tablet (768px-1024px)\",hidden:props=>!props.showCloseButton},closeButtonSizeMobile:{type:ControlType.Number,defaultValue:40,min:20,max:100,step:1,title:\"Close-Button Gr\\xf6\\xdfe Mobile\",description:\"Gr\\xf6\\xdfe f\\xfcr Mobile (<768px)\",hidden:props=>!props.showCloseButton},closeButtonColor:{type:ControlType.Color,defaultValue:\"#FFFFFF\",title:\"Close-Button Farbe\",description:\"Farbe des Close-Buttons\",hidden:props=>!props.showCloseButton},closeButtonPosition:{type:ControlType.Enum,defaultValue:\"top-right\",options:[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"],optionTitles:[\"Oben links\",\"Oben rechts\",\"Unten links\",\"Unten rechts\"],title:\"Close-Button Position\",description:\"Position des Close-Buttons\",hidden:props=>!props.showCloseButton}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerOverlay\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n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