{"version":3,"file":"shared-lib.CyZ3tOVt.mjs","names":["React.useState","React.useCallback","React.useMemo","__esmMin","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","ce","addPropertyControls","init_framer_DcxuU94H","ControlType","GermanCookieConsent","props","acknowledged","setAcknowledged","hydrated","setHydrated","isNarrow","setIsNarrow","savedChoice","STORAGE_KEY","onResize","acknowledge","reopen","textStyles","textColor","textFont","fixedPosition","bottomOffset","style","settingsLabel","cornerRadius","noticeText","Link","policyUrl","primaryLabel","buttonAccentColor","init_GermanCookieConsent_1"],"sources":["https:/framerusercontent.com/modules/hLpFeRRg2uCTpCNPj1Re/PIDdAz2iNsQLMjzFESML/GermanCookieConsent_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";const STORAGE_KEY=\"german-cookie-consent-accepted\";// User request: Create a new Framer code component named GermanCookieConsent for a German consulting portfolio with technically necessary cookies only, a fixed bottom-centered consent banner with persistence, Datenschutzerklärung link, reopenable settings button, responsive layout, configurable controls, and client-side safe browser API usage.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GermanCookieConsent(props){const{noticeText,policyUrl,primaryLabel,settingsLabel,backgroundColor,textColor,buttonAccentColor,cornerRadius,bottomOffset,textFont,style}=props;const[acknowledged,setAcknowledged]=React.useState(false);const[hydrated,setHydrated]=React.useState(false);const[isNarrow,setIsNarrow]=React.useState(false);React.useEffect(()=>{if(typeof window!==\"undefined\"){const savedChoice=window.localStorage.getItem(STORAGE_KEY);React.startTransition(()=>{setAcknowledged(savedChoice===\"true\");setHydrated(true);setIsNarrow(window.innerWidth<600);});const onResize=()=>{React.startTransition(()=>setIsNarrow(window.innerWidth<600));};window.addEventListener(\"resize\",onResize);return()=>window.removeEventListener(\"resize\",onResize);}else{React.startTransition(()=>setHydrated(true));}},[]);const acknowledge=React.useCallback(()=>{if(typeof window!==\"undefined\"){window.localStorage.setItem(STORAGE_KEY,\"true\");}React.startTransition(()=>setAcknowledged(true));},[]);const reopen=React.useCallback(()=>{React.startTransition(()=>setAcknowledged(false));},[]);const textStyles=React.useMemo(()=>({color:textColor,fontSize:textFont?.fontSize,lineHeight:textFont?.lineHeight,letterSpacing:textFont?.letterSpacing,fontWeight:textFont?.fontWeight,fontStyle:textFont?.fontStyle,textAlign:textFont?.textAlign,fontFamily:textFont?.fontFamily}),[textColor,textFont]);const fixedPosition=React.useMemo(()=>({position:\"fixed\",left:\"50%\",transform:\"translateX(-50%)\",bottom:bottomOffset,zIndex:9999,width:\"min(720px, calc(100vw - 24px))\"}),[bottomOffset]);if(!hydrated)return null;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\",...style},children:!acknowledged?/*#__PURE__*/_jsxs(\"div\",{style:{...fixedPosition,pointerEvents:\"auto\",backgroundColor,color:textColor,borderRadius:cornerRadius,boxShadow:\"0 8px 28px rgba(0, 0, 0, 0.12)\",padding:\"12px 14px\",display:\"flex\",alignItems:isNarrow?\"stretch\":\"center\",justifyContent:\"space-between\",gap:\"10px\",flexDirection:isNarrow?\"column\":\"row\"},children:[/*#__PURE__*/_jsxs(\"p\",{style:{...textStyles,margin:0,flex:1},children:[noticeText,\" \",/*#__PURE__*/_jsx(Link,{href:policyUrl,children:/*#__PURE__*/_jsx(\"a\",{style:{color:textColor,textDecoration:\"underline\"},children:\"Datenschutzerkl\\xe4rung\"})})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:acknowledge,\"aria-label\":primaryLabel,style:{appearance:\"none\",border:`1px solid ${buttonAccentColor}`,background:\"transparent\",color:buttonAccentColor,borderRadius:999,padding:\"8px 16px\",cursor:\"pointer\",whiteSpace:\"nowrap\",minHeight:36},children:primaryLabel})]}):/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:reopen,\"aria-label\":settingsLabel,style:{...fixedPosition,pointerEvents:\"auto\",width:\"auto\",maxWidth:\"calc(100vw - 24px)\",background:\"transparent\",border:\"none\",color:textColor,textDecoration:\"underline\",opacity:.7,cursor:\"pointer\",padding:0,...textStyles},children:settingsLabel})});}addPropertyControls(GermanCookieConsent,{noticeText:{type:ControlType.String,title:\"Hinweis\",defaultValue:\"Wir verwenden ausschlie\\xdflich technisch notwendige Cookies, um den Betrieb dieser Website sicherzustellen.\",displayTextArea:true},policyUrl:{type:ControlType.Link,title:\"Datenschutz URL\",defaultValue:\"/datenschutz\"},primaryLabel:{type:ControlType.String,title:\"Button\",defaultValue:\"Verstanden\"},settingsLabel:{type:ControlType.String,title:\"Einstellungen\",defaultValue:\"Cookie-Einstellungen\"},backgroundColor:{type:ControlType.Color,title:\"Hintergrund\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Textfarbe\",defaultValue:\"#000000\"},buttonAccentColor:{type:ControlType.Color,title:\"Akzent\",defaultValue:\"#6567e1\"},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:36,step:1},bottomOffset:{type:ControlType.Number,title:\"Abstand Unten\",defaultValue:16,min:0,max:80,step:1},textFont:{type:ControlType.Font,title:\"Text Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GermanCookieConsent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GermanCookieConsent_1.map"],"mappings":"A,6NAIG,SAAwBkB,EAAoB,EAAM,CAAC,GAAK,CAAC,aAAW,YAAU,eAAa,gBAAc,kBA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