{"version":3,"file":"Fixed_Background.ByejLUCD.mjs","names":["useState"],"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":"2LAAqI,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAGoH,OAHnH,MAAc,CAChP,IAAM,MAAiB,CAAC,EAAa,EAAO,YAAY,KAAK,EAEb,OAD7C,GAAc,CAChB,EAAO,iBAAiB,SAAS,EAAa,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,EAAE,CAAC,CAAwP,EAAK,MAAM,CAAC,MAAxO,CAAC,gBAAgB,OAAO,EAAM,MAAM,GAAG,eAAe,QAAQ,mBAAmB,EAAM,mBAAmB,qBAAqB,EAAU,QAAQ,SAAS,OAAO,OAAO,MAAM,OAAO,SAAS,SAAS,CAA4D,CAAC,EAAM,MAAM,sBAHlX,IAAsC,IAAoD,CAG0R,EAAgB,aAAa,CAAC,MAAM,qEAAqE,mBAAmB,SAAS,CAAC,EAAoB,EAAgB,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,mBAAmB,CAAC,mBAAmB,CAAC,KAAK,EAAY,KAAK,MAAM,sBAAsB,QAAQ,CAAC,SAAS,MAAM,SAAS,OAAO,QAAQ,WAAW,YAAY,cAAc,eAAe,CAAC,aAAa,CAAC,SAAS,MAAM,SAAS,OAAO,QAAQ,WAAW,YAAY,cAAc,eAAe,CAAC,aAAa,SAAS,CAAC,CAAC"}