{"version":3,"file":"RotatableImage.DSVqjsbe.mjs","names":[],"sources":["https:/framerusercontent.com/modules/R7GRfhXFsQFFqHgjYvXt/OOQUxE97kllqBcW8MeOK/RotatableImage.js"],"sourcesContent":["// Scalable image component with rotation on appear from top-left anchor\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Scalable image with appear rotation from top-left anchor\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function RotatableImage(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},scale,duration,rotation=90,transition=\"cubic-bezier(0.4,0,0.2,1)\",style}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const[mounted,setMounted]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"){const timer=setTimeout(()=>{startTransition(()=>setMounted(true));},40);return()=>clearTimeout(timer);}},[]);useEffect(()=>{if(isStatic||!ref.current)return;// No longer needed to set styles directly\n},[isStatic]);const showAnimation=mounted&&!isStatic;const transform=showAnimation?`scale(${scale}) rotate(0deg)`:`scale(${scale}) rotate(-${rotation}deg)`;const opacity=showAnimation?1:0;const transitionStyle=showAnimation?`transform ${duration}ms ${transition}, opacity ${duration}ms ${transition}`:\"none\";return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"visible\",display:\"flex\",alignItems:\"stretch\",justifyContent:\"stretch\",background:\"transparent\",transformOrigin:\"0 0\",transform,opacity,transition:transitionStyle,...isStatic?{transform:`scale(${scale}) rotate(0deg)`,opacity:1,transition:\"none\"}:{}},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt||\"Image\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"},draggable:false})});}addPropertyControls(RotatableImage,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1,min:.1,max:2,step:.01},duration:{type:ControlType.Number,title:\"Duration (ms)\",defaultValue:500,min:100,max:3e3,step:10},rotation:{type:ControlType.Number,title:\"Rotation (deg)\",defaultValue:90,min:1,max:360,step:1},transition:{type:ControlType.Enum,title:\"Transition\",options:[\"cubic-bezier(0.4,0,0.2,1)\",\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"linear\"],optionTitles:[\"Material (default)\",\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Linear\"],defaultValue:\"cubic-bezier(0.4,0,0.2,1)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatableImage\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatableImage.map"],"mappings":"0VAMG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,mBAAoB,EAAC,QAAM,WAAS,WAAS,GAAG,aAAW,4BAA4B,QAAM,CAAC,EAAY,EAAI,EAAO,KAAK,CAAO,EAAS,GAAqB,CAAM,CAAC,EAAQ,EAAW,CAAC,GAAS,EAAM,CAA6J,AAA5J,EAAU,IAAI,CAAC,GAAU,WAAqB,CAAC,IAAM,EAAM,WAAW,IAAI,CAAC,EAAgB,IAAI,GAAW,EAAK,CAAC,AAAE,EAAC,GAAG,CAAC,MAAM,IAAI,aAAa,EAAM,AAAE,CAAC,EAAC,CAAE,EAAC,CAAC,EAAU,IAAI,CAAI,GAAW,EAAI,OAClhB,EAAC,CAAC,CAAS,EAAC,CAAC,IAAM,EAAc,IAAU,EAAe,EAAU,GAAe,QAAQ,EAAM,iBAAiB,QAAQ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