{"version":3,"file":"ImageComponent.B_DP2rIG.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/XQvkcgavrBao4MWYcwxa/k6LuQ1Hgmi9i6B09V8lC/ImageComponent.js"],"sourcesContent":["// Image component with option to use URL or upload file\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageComponent(props){const{imageSource=\"upload\",imageUrl=\"\",imageFile=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt=\"Image\",objectFit=\"cover\",hoverEffect=\"zoom\",hoverScale=1.1,hoverBrightness=1.2,style}=props;const[isHovered,setIsHovered]=useState(false);const imageSrc=imageSource===\"url\"?imageUrl:imageFile;const getHoverTransform=()=>{if(!isHovered||hoverEffect===\"none\")return\"scale(1)\";if(hoverEffect===\"zoom\")return`scale(${hoverScale})`;return\"scale(1)\";};const getHoverFilter=()=>{if(!isHovered||hoverEffect===\"none\")return\"none\";if(hoverEffect===\"brightness\")return`brightness(${hoverBrightness})`;if(hoverEffect===\"blur\")return\"blur(4px)\";if(hoverEffect===\"grayscale\")return\"grayscale(100%)\";return\"none\";};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",...style},children:/*#__PURE__*/_jsx(\"img\",{src:imageSrc,alt:alt,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{width:\"100%\",height:\"100%\",objectFit:objectFit,display:\"block\",transform:getHoverTransform(),filter:getHoverFilter(),transition:\"transform 0.3s ease, filter 0.3s ease\"}})});}addPropertyControls(ImageComponent,{imageSource:{type:ControlType.Enum,title:\"Image Source\",options:[\"url\",\"upload\"],optionTitles:[\"URL\",\"Upload\"],defaultValue:\"upload\",displaySegmentedControl:true},imageUrl:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\",placeholder:\"https://example.com/image.jpg\",hidden:({imageSource})=>imageSource!==\"url\"},imageFile:{type:ControlType.File,title:\"Upload Image\",allowedFileTypes:[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\"],hidden:({imageSource})=>imageSource!==\"upload\"},alt:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"Image\",placeholder:\"Describe the image...\"},objectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Contain\",\"Cover\",\"Fill\",\"None\",\"Scale Down\"],defaultValue:\"cover\"},hoverEffect:{type:ControlType.Enum,title:\"Hover Effect\",options:[\"zoom\",\"brightness\",\"blur\",\"grayscale\",\"none\"],optionTitles:[\"Zoom\",\"Brightness\",\"Blur\",\"Grayscale\",\"None\"],defaultValue:\"zoom\"},hoverScale:{type:ControlType.Number,title:\"Zoom Scale\",defaultValue:1.1,min:1,max:2,step:.05,hidden:({hoverEffect})=>hoverEffect!==\"zoom\"},hoverBrightness:{type:ControlType.Number,title:\"Brightness\",defaultValue:1.2,min:.5,max:2,step:.1,hidden:({hoverEffect})=>hoverEffect!==\"brightness\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageComponent.map"],"mappings":"qKAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,cAAY,SAAS,WAAS,GAAG,YAAU,sEAAsE,MAAI,QAAQ,YAAU,QAAQ,cAAY,OAAO,aAAW,IAAI,kBAAgB,IAAI,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,IAAc,MAAM,EAAS,EAAgB,MAA0B,CAAC,GAAW,IAAc,OAAa,WAAc,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