{"version":3,"file":"ImageButton.DN0xio4K.mjs","names":[],"sources":["https:/framerusercontent.com/modules/o2pbwZICnnXkwsPHHiiz/n7E9z2dVk3V71eeLIUIR/ImageButton.js"],"sourcesContent":["// Image button with hover scale effect and configurable images/links\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageButton(props){const{variant=\"image1\",image1={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},image2={src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Gradient 2 - Purple\"},image3={src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Gradient 3 - Orange\"},link1=\"https://framer.com\",link2=\"https://framer.com\",link3=\"https://framer.com\",borderRadius=8,hoverScale=.95,tapScale=.9,animationDuration=.2}=props;const[isHovered,setIsHovered]=useState(false);const currentImage=variant===\"image1\"?image1:variant===\"image2\"?image2:image3;const currentLink=variant===\"image1\"?link1:variant===\"image2\"?link2:link3;const handleClick=()=>{if(typeof window!==\"undefined\"&&currentLink){window.location.href=currentLink;}};const handleMouseEnter=()=>{startTransition(()=>setIsHovered(true));};const handleMouseLeave=()=>{startTransition(()=>setIsHovered(false));};return /*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",cursor:\"pointer\",borderRadius,overflow:\"hidden\",position:\"relative\"},animate:{scale:isHovered?hoverScale:1},transition:{duration:animationDuration,ease:\"easeOut\"},onClick:handleClick,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,whileTap:{scale:tapScale},children:/*#__PURE__*/_jsx(\"img\",{src:currentImage.src,alt:currentImage.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"}})});}addPropertyControls(ImageButton,{variant:{type:ControlType.Enum,title:\"Variant\",options:[\"image1\",\"image2\",\"image3\"],optionTitles:[\"Image 1\",\"Image 2\",\"Image 3\"],defaultValue:\"image1\",displaySegmentedControl:true},image1:{type:ControlType.ResponsiveImage,title:\"Image 1\"},link1:{type:ControlType.Link,title:\"Link 1\"},image2:{type:ControlType.ResponsiveImage,title:\"Image 2\"},link2:{type:ControlType.Link,title:\"Link 2\"},image3:{type:ControlType.ResponsiveImage,title:\"Image 3\"},link3:{type:ControlType.Link,title:\"Link 3\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},hoverScale:{type:ControlType.Number,title:\"Hover Scale\",defaultValue:.95,min:0,max:1,step:.01},tapScale:{type:ControlType.Number,title:\"Tap Scale\",defaultValue:.9,min:0,max:1,step:.01},animationDuration:{type:ControlType.Number,title:\"Animation Duration\",defaultValue:.2,min:0,max:5,step:.1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageButton.map"],"mappings":"iYAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,UAAQ,SAAS,SAAO,CAAC,IAAI,sEAAsE,IAAI,mBAAoB,EAAC,SAAO,CAAC,IAAI,oEAAoE,IAAI,qBAAsB,EAAC,SAAO,CAAC,IAAI,uEAAuE,IAAI,qBAAsB,EAAC,QAAM,qBAAqB,QAAM,qBAAqB,QAAM,qBAAqB,eAAa,EAAE,aAAW,IAAI,WAAS,GAAG,oBAAkB,GAAG,CAAC,EAAW,CAAC,EAAU,EAAa,CAAC,GAAS,EAAM,CAAO,EAAa,IAAU,SAAS,EAAO,IAAU,SAAS,EAAO,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