{"version":3,"file":"NaturalSizeImage.sJaLKkF4.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","de","init_jsx_runtime","c","ce","_e","init_framer_CN96F41L","addPropertyControls","ControlType","NaturalSizeImage","imgRef","dimensions","setDimensions","updateDimensions","imgElement","props","init_NaturalSizeImage"],"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":"A,wLAGG,SAAwBY,EAAiB,EAAM,CAAC,IAAMC,EAAOb,EAAO,IAAI,EAAO,CAACc,EAAWC,GAAed,EAAS,CAAC,MAAM,OAAO,OAAO,MAAM,CAAC,EAAgT,OAA9SM,MAAc,CAAC,IAAMS,MAAqB,CAAIH,EAAO,SAASE,EAAc,CAAC,MAAMF,EAAO,QAAQ,aAAa,OAAOA,EAAO,QAAQ,aAAa,CAAC,CAAG,EAAQI,EAAWJ,EAAO,QAAWI,IAAeA,EAAW,SAAUD,EAAiB,EAAQ,EAAW,OAAOA,EAAmB,EAAE,CAACE,EAAM,KAAK,CAAC,EAAsB,gBAAK,MAAM,CAAC,IAAIL,EAAO,IAAIK,EAAM,MAAM,MAAM,CAAC,MAAMJ,EAAW,MAAM,OAAOA,EAAW,MAAM,CAAC,CAAC,CAAE,C,0CAACJ,EAAoBE,EAAiB,CAAC,MAAM,CAAC,KAAKD,EAAY,KAAK,CAAC,CAAC,C"}