{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/LDnsUFBYDoLpDVIdecxS/ZK65AUXEkXi3VyeHnUrk/OptInIFrame.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import*as React from\"react\";import{ConsentManagerZeitgewinn}from\"https://framerusercontent.com/modules/tS2xqHklkOx720cdpKhx/hnmbXra5FlGpgnm0p86g/ConsentManagerZeitgewinn.js\";export function OptInIFrame(props){// Set default values for props\nconst{backgroundColor=\"#000000\",hoverColor=\"#8B572A\",textColor=\"#FFFFFF\",buttonText=\"Jetzt Feature aktivieren\",fontFamily=\"Inter\",linkUrl=\"#\",width=100,cookieName=\"cookie_consent\",featureFrameId=\"featureFrame\",featureFrameSrc=\"https://example.com/feature\",optInBoxId=\"optInBox\",featureBoxId=\"featureBox\"}=props;// Create a style for the container div\nconst containerStyle={width:typeof width===\"number\"?`${width}%`:width,backgroundColor:backgroundColor,display:\"block\",padding:\"16px 24px\",textAlign:\"center\",transition:\"background-color 0.3s ease\"};// Create a style for the link\nconst linkStyle={color:textColor,textDecoration:\"none\",fontFamily:fontFamily,fontSize:\"16px\",fontWeight:500,display:\"block\",width:\"100%\"};// 2. Functional-Consent pr\u00FCfen\nconst hasFunctionalConsent=ConsentManagerZeitgewinn.isFunctionalConsentGiven();// 3. Text f\u00FCr den Button festlegen\nconst displayText=hasFunctionalConsent?buttonText:\"Cookie-Einstellungen\";// Handle hover state with React's useState hook\nconst[isHovering,setIsHovering]=React.useState(false);// Update the background color based on hover state\nconst dynamicContainerStyle={...containerStyle,backgroundColor:isHovering?hoverColor:backgroundColor};const handleClick=e=>{// If linkUrl is \"#\", prevent default behavior to avoid page jump\nif(linkUrl===\"#\"){e.preventDefault();}// You could add any additional click handling here\n};return /*#__PURE__*/_jsx(\"button\",{// className=\"cky-banner-element\"\nstyle:{...dynamicContainerStyle,cursor:\"pointer\",border:\"none\",outline:\"none\",color:textColor,fontFamily:fontFamily,fontSize:\"16px\",fontWeight:500},onMouseEnter:()=>setIsHovering(true),onMouseLeave:()=>setIsHovering(false),onClick:e=>{if(!ConsentManagerZeitgewinn.isFunctionalConsentGiven()){return;}e.preventDefault();// Set the cookie with the specified name\ndocument.cookie=`${cookieName}=true; path=/; max-age=31536000`// valid for 1 year\n;// Set the src attribute of the iframe\nconst featureFrame=document.getElementById(featureFrameId);if(featureFrame){featureFrame.src=featureFrameSrc;}// Hide the opt-in box\nconst optInBox=document.getElementById(optInBoxId);if(optInBox){optInBox.style.display=\"none\";}// Show the feature box\nconst featureBox=document.getElementById(featureBoxId);if(featureBox){featureBox.style.display=\"flex\";}},children:displayText});}// Add property controls to make the component customizable in Framer\naddPropertyControls(OptInIFrame,{backgroundColor:{type:ControlType.Color,title:\"Hintergrundfarbe\",defaultValue:\"#000000\"},hoverColor:{type:ControlType.Color,title:\"Hover Farbe\",defaultValue:\"#8B572A\"},textColor:{type:ControlType.Color,title:\"Textfarbe\",defaultValue:\"#FFFFFF\"},buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Jetzt feature aktivieren\"},fontFamily:{type:ControlType.Enum,title:\"Schriftart\",options:[\"Inter\",\"Arial\",\"Helvetica\",\"Roboto\",\"Open Sans\",\"Montserrat\",\"Verdana\",\"Georgia\",\"Times New Roman\"],optionTitles:[\"Inter\",\"Arial\",\"Helvetica\",\"Roboto\",\"Open Sans\",\"Montserrat\",\"Verdana\",\"Georgia\",\"Times New Roman\"],defaultValue:\"Inter\"},linkUrl:{type:ControlType.String,title:\"Link URL\",defaultValue:\"#\"},width:{type:ControlType.Number,title:\"Breite\",defaultValue:100,unit:\"%\",min:10,max:100,step:1,displayStepper:true},cookieName:{type:ControlType.String,title:\"Cookie Name\",defaultValue:\"cookie_consent\"},featureFrameId:{type:ControlType.String,title:\"Feature Frame ID\",defaultValue:\"featureFrame\"},featureFrameSrc:{type:ControlType.String,title:\"Feature Frame Source URL\",defaultValue:\"https://example.com/feature\"},optInBoxId:{type:ControlType.String,title:\"Opt-In Box ID\",defaultValue:\"optInBox\"},featureBoxId:{type:ControlType.String,title:\"Feature Box ID\",defaultValue:\"featureBox\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"OptInIFrame\":{\"type\":\"reactComponent\",\"name\":\"OptInIFrame\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "yIAAoR,SAASA,EAAYC,EAAM,CAC/S,GAAK,CAAC,gBAAAC,EAAgB,UAAU,WAAAC,EAAW,UAAU,UAAAC,EAAU,UAAU,WAAAC,EAAW,2BAA2B,WAAAC,EAAW,QAAQ,QAAAC,EAAQ,IAAI,MAAAC,EAAM,IAAI,WAAAC,EAAW,iBAAiB,eAAAC,EAAe,eAAe,gBAAAC,EAAgB,8BAA8B,WAAAC,EAAW,WAAW,aAAAC,EAAa,YAAY,EAAEZ,EAC3Sa,EAAe,CAAC,MAAM,OAAON,GAAQ,SAAS,GAAGA,CAAK,IAAIA,EAAM,gBAAgBN,EAAgB,QAAQ,QAAQ,QAAQ,YAAY,UAAU,SAAS,WAAW,4BAA4B,EAC9La,EAAU,CAAC,MAAMX,EAAU,eAAe,OAAO,WAAWE,EAAW,SAAS,OAAO,WAAW,IAAI,QAAQ,QAAQ,MAAM,MAAM,EAElIU,EADqBC,EAAyB,yBAAyB,EACtCZ,EAAW,uBAC7C,CAACa,EAAWC,CAAa,EAAQC,EAAS,EAAK,EAC9CC,EAAsB,CAAC,GAAGP,EAAe,gBAAgBI,EAAWf,EAAWD,CAAe,EAAQoB,EAAYC,GAAG,CACxHhB,IAAU,KAAKgB,EAAE,eAAe,CACnC,EAAE,OAAoBC,EAAK,SAAS,CACpC,MAAM,CAAC,GAAGH,EAAsB,OAAO,UAAU,OAAO,OAAO,QAAQ,OAAO,MAAMjB,EAAU,WAAWE,EAAW,SAAS,OAAO,WAAW,GAAG,EAAE,aAAa,IAAIa,EAAc,EAAI,EAAE,aAAa,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A2B,aAAa,6BAA6B,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,aAAa,UAAU,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,iBAAiB,aAAa,YAAY,CAAC,CAAC",
  "names": ["OptInIFrame", "props", "backgroundColor", "hoverColor", "textColor", "buttonText", "fontFamily", "linkUrl", "width", "cookieName", "featureFrameId", "featureFrameSrc", "optInBoxId", "featureBoxId", "containerStyle", "linkStyle", "displayText", "ConsentManagerZeitgewinn", "isHovering", "setIsHovering", "ye", "dynamicContainerStyle", "handleClick", "e", "p", "featureFrame", "optInBox", "featureBox", "addPropertyControls", "ControlType"]
}
