{"version":3,"file":"Fixed_Background.Dski2CBH.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","window","init_ssg_sandbox_shims","ce","init_jsx_runtime","c","_e","init_framer_DymZktPS","addPropertyControls","ControlType","FixedBackground","isDesktop","setIsDesktop","handleResize","fixedBackgroundStyle","props","init_Fixed_Background"],"sources":["https:/framerusercontent.com/modules/yBtUOfc23pqZfTxpalOs/u96zQuDOAQnoXyks05Or/Fixed_Background.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FixedBackground(props){const[isDesktop,setIsDesktop]=useState(false);useEffect(()=>{// Detect screen width\nconst handleResize=()=>{setIsDesktop(window.innerWidth>=1024)// Use `fixed` if width is 1024px or more\n;};handleResize()// Check on mount\n;window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);const fixedBackgroundStyle={backgroundImage:`url(${props.image})`,backgroundSize:\"cover\",backgroundPosition:props.backgroundPosition,backgroundAttachment:isDesktop?\"fixed\":\"scroll\",height:\"100%\",width:\"100%\",overflow:\"hidden\"};return /*#__PURE__*/_jsx(\"div\",{style:fixedBackgroundStyle},props.image);}FixedBackground.defaultProps={image:\"https://framerusercontent.com/images/pdaSL6MxL6Fh9argpPZFwQztI.png\",backgroundPosition:\"center\"};addPropertyControls(FixedBackground,{image:{type:ControlType.Image,title:\"Background Image\"},backgroundPosition:{type:ControlType.Enum,title:\"Background Position\",options:[\"center\",\"top\",\"bottom\",\"left\",\"right\",\"top left\",\"top right\",\"bottom left\",\"bottom right\"],optionTitles:[\"Center\",\"Top\",\"Bottom\",\"Left\",\"Right\",\"Top Left\",\"Top Right\",\"Bottom Left\",\"Bottom Right\"],defaultValue:\"center\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FixedBackground\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Fixed_Background.map"],"mappings":"A,+LAAqI,SAAwBY,EAAgB,EAAM,CAAC,GAAK,CAACC,EAAUC,GAAcd,EAAS,EAAK,EAAEK,MAAc,CAChP,IAAMU,MAAiB,CAACD,EAAaX,EAAO,YAAY,IAAI,CAC3D,EAC+C,OAD7CY,EAAa,EACfZ,EAAO,iBAAiB,SAASY,CAAY,MAAYZ,EAAO,oBAAoB,SAASY,CAAY,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMC,EAAqB,CAAC,gBAAgB,OAAOC,EAAM,MAAM,GAAG,eAAe,QAAQ,mBAAmBA,EAAM,mBAAmB,qBAAqBJ,EAAU,QAAQ,SAAS,OAAO,OAAO,MAAM,OAAO,SAAS,QAAQ,EAAE,MAAoB,gBAAK,MAAM,CAAC,MAAMG,CAAoB,EAAEC,EAAM,KAAK,CAAE,C,8CAAC,EAAgB,aAAa,CAAC,MAAM,qEAAqE,mBAAmB,QAAQ,EAAEP,EAAoBE,EAAgB,CAAC,MAAM,CAAC,KAAKD,EAAY,MAAM,MAAM,kBAAkB,EAAE,mBAAmB,CAAC,KAAKA,EAAY,KAAK,MAAM,sBAAsB,QAAQ,CAAC,SAAS,MAAM,SAAS,OAAO,QAAQ,WAAW,YAAY,cAAc,cAAc,EAAE,aAAa,CAAC,SAAS,MAAM,SAAS,OAAO,QAAQ,WAAW,YAAY,cAAc,cAAc,EAAE,aAAa,QAAQ,CAAC,CAAC,C"}