{"version":3,"file":"RotatableImage.dm_BpHTH.mjs","names":["useRef","useState"],"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,oBAAoB,CAAC,QAAM,WAAS,WAAS,GAAG,aAAW,4BAA4B,SAAO,EAAY,EAAIA,EAAO,KAAK,CAAO,EAAS,GAAqB,CAAM,CAAC,EAAQ,GAAYC,EAAS,GAAM,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,CAAC,IAAM,EAAM,eAAe,CAAC,MAAoB,EAAW,GAAK,CAAC,EAAG,GAAG,CAAC,UAAU,aAAa,EAAM,GAAI,EAAE,CAAC,CAAC,MAAc,CAAI,GAAW,EAAI,SACjhB,CAAC,EAAS,CAAC,CAAC,IAAM,EAAc,GAAS,CAAC,EAAe,EAAU,EAAc,SAAS,EAAM,gBAAgB,SAAS,EAAM,YAAY,EAAS,MAAY,EAAQ,EAAc,EAAE,EAAQ,EA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