{"version":3,"file":"ImageDisplay.N7pldhD2.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Zwi7KndXzKa4AcdIm28T/lAuYVUzeS5DtW9uQW7d6/ImageDisplay.js"],"sourcesContent":["// CMS Image component that handles landscape and portrait orientations differently\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageDisplay(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Default image\"},backgroundColor,borderRadius}=props;const[isLandscape,setIsLandscape]=useState(true);const[imageLoaded,setImageLoaded]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"&&image.src){const img=new Image;img.onload=()=>{setIsLandscape(img.width>img.height);setImageLoaded(true);};img.src=image.src;}},[image.src]);const imageStyle={width:isLandscape?\"auto\":\"100%\",height:isLandscape?\"100%\":\"100%\",maxWidth:isLandscape?\"100%\":\"none\",maxHeight:isLandscape?\"100%\":\"none\",objectFit:isLandscape?\"contain\":\"cover\",objectPosition:\"center\",display:\"block\"};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,borderRadius,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\"},children:imageLoaded&&/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt||\"CMS Image\",style:imageStyle})});}addPropertyControls(ImageDisplay,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#F5F5F5\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageDisplay\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageDisplay.map"],"mappings":"kTAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,gBAAgB,CAAC,kBAAgB,gBAAc,EAAW,CAAC,EAAY,GAAgBA,EAAS,GAAK,CAAM,CAAC,EAAY,GAAgBA,EAAS,GAAM,CAAC,MAAc,CAAC,GAAU,IAAS,QAAa,EAAM,IAAI,CAAC,IAAM,EAAI,IAAI,MAAM,EAAI,WAAW,CAAC,EAAe,EAAI,MAAM,EAAI,OAAO,CAAC,EAAe,GAAK,EAAG,EAAI,IAAI,EAAM,MAAO,CAAC,EAAM,IAAI,CAAC,CAAC,IAAM,EAAW,CAAC,MAAM,EAAY,OAAO,OAAO,OAAmB,OAAc,SAAS,EAAY,OAAO,OAAO,UAAU,EAAY,OAAO,OAAO,UAAU,EAAY,UAAU,QAAQ,eAAe,SAAS,QAAQ,QAAQ,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,kBAAgB,eAAa,SAAS,SAAS,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,WAAW,CAAC,SAAS,GAA0B,EAAK,MAAM,CAAC,IAAI,EAAM,IAAI,IAAI,EAAM,KAAK,YAAY,MAAM,EAAW,CAAC,CAAC,CAAC,sBAH38B,IAAsC,IAAoD,CAGm3B,EAAoB,EAAa,CAAC,MAAM,CAAC,KAAK,EAAY,gBAAgB,MAAM,QAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,UAAU,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC"}