{"version":3,"file":"NaturalSizeImage.C4nICSwe.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/Z3V9iRrxkQDIMpBj8Zx9/RL1I0Jhz5soiXLK1nUsW/NaturalSizeImage.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType,addPropertyControls}from\"framer\";import{useEffect,useRef,useState}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function NaturalSizeImage(props){const imgRef=useRef(null);const[dimensions,setDimensions]=useState({width:\"auto\",height:\"auto\"});useEffect(()=>{const updateDimensions=()=>{if(imgRef.current){setDimensions({width:imgRef.current.naturalWidth,height:imgRef.current.naturalHeight});}};const imgElement=imgRef.current;if(imgElement){if(imgElement.complete){updateDimensions();}else{imgElement.onload=updateDimensions;}}},[props.image]);return /*#__PURE__*/_jsx(\"img\",{ref:imgRef,src:props.image,style:{width:dimensions.width,height:dimensions.height}});}addPropertyControls(NaturalSizeImage,{image:{type:ControlType.Image}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NaturalSizeImage\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NaturalSizeImage.map"],"mappings":"yLAGG,SAAwB,EAAiB,EAAM,CAAC,IAAM,EAAOA,EAAO,KAAK,CAAM,CAAC,EAAW,GAAeC,EAAS,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,CAA+S,OAA9S,MAAc,CAAC,IAAM,MAAqB,CAAI,EAAO,SAAS,EAAc,CAAC,MAAM,EAAO,QAAQ,aAAa,OAAO,EAAO,QAAQ,cAAc,CAAC,EAAU,EAAW,EAAO,QAAW,IAAe,EAAW,SAAU,GAAkB,CAAO,EAAW,OAAO,IAAqB,CAAC,EAAM,MAAM,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAO,IAAI,EAAM,MAAM,MAAM,CAAC,MAAM,EAAW,MAAM,OAAO,EAAW,OAAO,CAAC,CAAC,kBAH3gB,IAAoD,IAA6C,CAG4a,EAAoB,EAAiB,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,CAAC,CAAC"}