{"version":3,"file":"shared-lib.fLB1FzES.mjs","names":["useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/OtV7VsBqoSWmejwGBs5J/sQhZhhj838AsraVOrAwu/Polski_baner_cookies.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,Link,useIsStaticRenderer}from\"framer\";import{startTransition,useCallback,useEffect,useMemo,useState}from\"react\";const CONSENT_KEY=\"bee_studio_cookie_consent\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PolskiBanerCookies(props){const{privacyPolicyUrl,primaryLabel,secondaryLabel,heading,body,surfaceColor,textColor,borderColor,primaryButtonBackground,primaryButtonTextColor,secondaryButtonTextColor,linkColor}=props;const isStatic=useIsStaticRenderer();const[visible,setVisible]=useState(true);useEffect(()=>{if(typeof window!==\"undefined\"){try{const existingValue=window.localStorage.getItem(CONSENT_KEY);if(existingValue===\"accepted\"||existingValue===\"rejected\"){startTransition(()=>setVisible(false));}else{startTransition(()=>setVisible(true));}}catch(_error){startTransition(()=>setVisible(true));}}else{startTransition(()=>setVisible(true));}},[isStatic]);const saveConsent=useCallback(value=>{if(typeof window!==\"undefined\"){try{window.localStorage.setItem(CONSENT_KEY,value);}catch(_error){// Ignore storage failures and still hide the banner for current session render.\n}}startTransition(()=>setVisible(false));},[]);const containerStyle=useMemo(()=>({position:\"fixed\",right:12,left:12,bottom:12,zIndex:2147483e3,marginLeft:\"auto\",width:\"min(360px, calc(100vw - 24px))\",backgroundColor:surfaceColor,color:textColor,border:`1px solid ${borderColor}`,borderRadius:14,padding:14,boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",gap:10,boxShadow:\"0 10px 28px rgba(0,0,0,0.24)\",pointerEvents:\"auto\"}),[surfaceColor,textColor,borderColor]);if(!visible)return null;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsxs(\"aside\",{style:containerStyle,role:\"dialog\",\"aria-live\":\"polite\",\"aria-label\":heading,children:[/*#__PURE__*/_jsx(\"div\",{style:{...props.headingFont,color:textColor,margin:0},children:heading}),/*#__PURE__*/_jsx(\"div\",{style:{...props.bodyFont,color:textColor,opacity:.92,margin:0},children:body}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:8,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>saveConsent(\"accepted\"),style:{...props.buttonFont,appearance:\"none\",border:\"none\",borderRadius:10,background:primaryButtonBackground,color:primaryButtonTextColor,padding:\"10px 12px\",cursor:\"pointer\",minHeight:40,flex:\"1 1 120px\"},\"aria-label\":primaryLabel,children:primaryLabel}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>saveConsent(\"rejected\"),style:{...props.buttonFont,appearance:\"none\",border:`1px solid ${borderColor}`,borderRadius:10,background:\"transparent\",color:secondaryButtonTextColor,padding:\"10px 12px\",cursor:\"pointer\",minHeight:40,flex:\"1 1 120px\"},\"aria-label\":secondaryLabel,children:secondaryLabel})]}),/*#__PURE__*/_jsx(Link,{href:privacyPolicyUrl,children:/*#__PURE__*/_jsx(\"a\",{style:{...props.linkFont,color:linkColor,textDecoration:\"underline\",textUnderlineOffset:2,width:\"max-content\"},children:\"Polityka prywatności\"})})]})});}addPropertyControls(PolskiBanerCookies,{heading:{type:ControlType.String,title:\"Nagł\\xf3wek\",defaultValue:\"Szanujemy Twoją prywatność\"},body:{type:ControlType.String,title:\"Treść\",displayTextArea:true,defaultValue:\"Używamy plik\\xf3w cookies, aby zapewnić prawidłowe działanie strony i lepiej dopasować treści.\"},primaryLabel:{type:ControlType.String,title:\"Primary\",defaultValue:\"Akceptuję\"},secondaryLabel:{type:ControlType.String,title:\"Secondary\",defaultValue:\"Odrzucam\"},privacyPolicyUrl:{type:ControlType.Link,title:\"Polityka URL\",defaultValue:\"/polityka-prywatnosci\"},surfaceColor:{type:ControlType.Color,title:\"Surface\",defaultValue:\"#121212\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(255,255,255,0.18)\"},primaryButtonBackground:{type:ControlType.Color,title:\"Primary BG\",defaultValue:\"#FFFFFF\"},primaryButtonTextColor:{type:ControlType.Color,title:\"Primary Text\",defaultValue:\"#000000\"},secondaryButtonTextColor:{type:ControlType.Color,title:\"Secondary Text\",defaultValue:\"#FFFFFF\"},linkColor:{type:ControlType.Color,title:\"Link\",defaultValue:\"#CCCCCC\"},headingFont:{type:ControlType.Font,title:\"Heading Font\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},bodyFont:{type:ControlType.Font,title:\"Body Font\",defaultValue:{fontSize:\"14px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.35em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},linkFont:{type:ControlType.Font,title:\"Link Font\",defaultValue:{fontSize:\"12px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PolskiBanerCookies\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Polski_baner_cookies.map"],"mappings":"0OAGG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,mBAAi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