{"version":3,"file":"ScrollPanImage.DfESf24r.mjs","names":["React.useRef","__esmMin","de","c","init_jsx_runtime","init_npm_react_18_3_1","useTransform","useScroll","useReducedMotion","init_framer_motion_DhsWWWsN","motion","RenderTarget","addPropertyControls","init_framer_Bf4_tcb2","ControlType","ScrollPanImage","ref","position","scrollYProgress","reduced","canvas","alt","style","image","init_ScrollPanImage"],"sources":["https:/framerusercontent.com/modules/4nw3EiU9oEpMTXsDvKVu/p207ojF04sJG4cg1jVeK/ScrollPanImage.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useScroll,useTransform,useReducedMotion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollPanImage({image,alt=\"Beef-A-Roo indoor menu\",style}){const ref=React.useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"300px center\",\"1500px center\"]});const position=useTransform(scrollYProgress,[0,1],[\"0% 50%\",\"100% 50%\"]);const reduced=useReducedMotion();const canvas=RenderTarget.current()===RenderTarget.canvas;return /*#__PURE__*/_jsx(\"div\",{ref:ref,role:\"img\",\"aria-label\":alt,style:{...style,width:\"100%\",height:canvas||reduced?600:1800,position:\"relative\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(motion.div,{style:{position:canvas||reduced?\"relative\":\"sticky\",top:canvas||reduced?0:\"calc(50vh - 300px)\",width:\"100%\",height:600,overflow:\"hidden\",backgroundImage:image?'url(\"'+image+'\")':undefined,backgroundSize:\"cover\",backgroundRepeat:\"no-repeat\",backgroundPosition:canvas||reduced?\"0% 50%\":position}})});}addPropertyControls(ScrollPanImage,{image:{type:ControlType.Image,title:\"Image\"},alt:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"Beef-A-Roo indoor menu\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollPanImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollPanImage.map"],"mappings":"A,wPAGG,SAAwBe,EAAe,CAAC,QAAM,MAAI,yBAAyB,SAAO,CAAC,IAAMC,EAAIhB,EAAa,IAAI,EAAO,CAAC,mBAAiBO,EAAU,CAAC,OAAOS,EAAI,OAAO,CAAC,eAAe,eAAe,CAAC,CAAC,EAAQC,EAASX,EAAaY,EAAgB,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,UAAU,CAAC,EAAQC,EAAQX,EAAiB,EAAQY,EAAOT,EAAa,QAAQ,IAAIA,EAAa,OAAO,MAAoB,gBAAK,MAAM,CAAK,MAAI,KAAK,MAAM,aAAaU,EAAI,MAAM,CAAC,GAAGC,EAAM,MAAM,OAAO,OAAOF,GAAQD,EAAQ,IAAI,KAAK,SAAS,WAAW,SAAS,SAAS,EAAE,SAAsB,gBAAKT,EAAO,IAAI,CAAC,MAAM,CAAC,SAASU,GAAQD,EAAQ,WAAW,SAAS,IAAIC,GAAQD,EAAQ,EAAE,qBAAqB,MAAM,OAAO,OAAO,IAAI,SAAS,SAAS,gBAAgBI,EAAM,QAAQA,EAAM,KAAK,IAAA,GAAU,eAAe,QAAQ,iBAAiB,YAAY,mBAAmBH,GAAQD,EAAQ,SAASF,CAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,C,8CAACL,EAAoBG,EAAe,CAAC,MAAM,CAAC,KAAKD,EAAY,MAAM,MAAM,OAAO,EAAE,IAAI,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,wBAAwB,CAAC,CAAC,C"}