{"version":3,"file":"DynamicUserCertificate.DdOa-eCd.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/tGRiISu0ifpddvxnFHKR/yBwWZzzwl30EnTcFEwvR/DynamicUserCertificate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */const fallbackImage=\"https://xeonmedia.pl/wp-content/uploads/2025/06/Grafika-certyfikatu-placeholder.png\";export default function DynamicUserCertificate(props){const{backgroundColor}=props;const[imageUrl,setImageUrl]=React.useState(fallbackImage);React.useEffect(()=>{const params=new URLSearchParams(window.location.search);const url=params.get(\"img\");if(url){const img=new Image;img.src=url;img.onload=()=>setImageUrl(url);img.onerror=()=>setImageUrl(fallbackImage);}else{setImageUrl(fallbackImage);}},[]);return /*#__PURE__*/_jsx(Frame,{...props,background:undefined,style:{width:\"100%\",height:\"100%\",backgroundColor:backgroundColor,backgroundSize:\"contain\",backgroundRepeat:\"no-repeat\",backgroundPosition:\"center\",backgroundImage:`url(${imageUrl})`,...props.style}});}DynamicUserCertificate.defaultProps={width:600,height:600,backgroundColor:\"#f5f5f5\"};addPropertyControls(DynamicUserCertificate,{backgroundColor:{title:\"Background\",type:ControlType.Color,defaultValue:\"#f5f5f5\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DynamicUserCertificate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicUserCertificate.map"],"mappings":"sMAG6G,SAAwB,EAAuB,EAAM,CAAC,GAAK,CAAC,mBAAiB,EAAW,CAAC,EAAS,GAAaA,EAAe,EAAc,CAAsQ,OAArQ,MAAoB,CAA0D,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAkB,IAAI,MAAM,CAAC,GAAG,EAAI,CAAC,IAAM,EAAI,IAAI,MAAM,EAAI,IAAI,EAAI,EAAI,WAAW,EAAY,EAAI,CAAC,EAAI,YAAY,EAAY,EAAc,MAAO,EAAY,EAAc,EAAI,EAAE,CAAC,CAAqB,EAAK,EAAM,CAAC,GAAG,EAAM,WAAW,IAAA,GAAU,MAAM,CAAC,MAAM,OAAO,OAAO,OAAuB,kBAAgB,eAAe,UAAU,iBAAiB,YAAY,mBAAmB,SAAS,gBAAgB,OAAO,EAAS,GAAG,GAAG,EAAM,MAAM,CAAC,CAAC,wBAH1tB,IAA4B,IAA0D,CAGxH,EAAc,sFAAgvB,EAAuB,aAAa,CAAC,MAAM,IAAI,OAAO,IAAI,gBAAgB,UAAU,CAAC,EAAoB,EAAuB,CAAC,gBAAgB,CAAC,MAAM,aAAa,KAAK,EAAY,MAAM,aAAa,UAAU,CAAC,CAAC"}