{"version":3,"file":"DynamicUserCertificate.DWYUmbd0.mjs","names":[],"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":"6TAG6G,SAAwB,EAAuB,EAAM,CAAC,GAAK,CAAC,kBAAgB,CAAC,EAAW,CAAC,EAAS,EAAY,CAAC,EAAe,EAAc,CAAsQ,MAArQ,GAAgB,IAAI,CAAC,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,QAAc,EAAI,EAAO,IAAI,MAAM,CAAC,GAAG,EAAI,CAAC,IAAM,EAAI,IAAI,MAAkD,AAA5C,EAAI,IAAI,EAAI,EAAI,OAAO,IAAI,EAAY,EAAI,CAAC,EAAI,QAAQ,IAAI,EAAY,EAAc,AAAE,MAAK,EAAY,EAAc,AAAG,EAAC,CAAE,EAAC,CAAqB,EAAK,EAAM,CAAC,GAAG,EAAM,eAAA,GAAqB,MAAM,CAAC,MAAM,OAAO,OAAO,OAAuB,kBAAgB,eAAe,UAAU,iBAAiB,YAAY,mBAAmB,SAAS,iBAAiB,MAAM,EAAS,GAAG,GAAG,EAAM,KAAM,CAAC,EAAC,AAAE,gBAAqF,IAH51B,GAA2C,IAA4B,IAA0D,CAGxH,EAAc,sFAAgvB,EAAuB,aAAa,CAAC,MAAM,IAAI,OAAO,IAAI,gBAAgB,SAAU,EAAC,EAAoB,EAAuB,CAAC,gBAAgB,CAAC,MAAM,aAAa,KAAK,EAAY,MAAM,aAAa,SAAU,CAAC,EAAC"}