{"version":3,"file":"NestedSection.CCmlp7UE.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/xd8xLUPVEklTZDOpat4e/4AT08BINfH6eFlEJ7Znc/NestedScroll2Section.js","https:/framerusercontent.com/modules/Z0Y88iLVPOgG9DxWpCZ5/heTxZn81ydJvDpPRb27c/NestedSection.js"],"sourcesContent":["// © F4Framer. All rights reserved.\n// Visit https://f4.framer.website/\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function NestedScroll2Section(props){const{targetSection,children,offsetY}=props;const targetRef=useRef(null);useEffect(()=>{if(targetRef.current&&targetSection){const targetElement=document.getElementById(targetSection);if(targetElement){console.log(`Setting click event for section: ${targetSection}`)// Debugging log\n;targetRef.current.onclick=()=>{console.log(`Clicked! Scrolling to section: ${targetSection}`)// Debugging log\n;window.scrollTo({top:targetElement.getBoundingClientRect().top+window.pageYOffset-offsetY,behavior:\"smooth\"});};}else{console.error(`Target element with ID ${targetSection} not found`)// Debugging log\n;}}},[targetSection,offsetY]);return /*#__PURE__*/_jsx(\"div\",{ref:targetRef,style:{cursor:\"pointer\"},children:children});}addPropertyControls(NestedScroll2Section,{targetSection:{type:ControlType.String,title:\"Target Section\",placeholder:\"Enter section ID\"},children:{type:ControlType.ComponentInstance,title:\"Children\"},offsetY:{type:ControlType.Number,title:\"Offset Y\",defaultValue:0,min:0,max:1e3,unit:\"px\",description:\"By [F4Framer](https://f4.framer.website/)\"}});export default NestedScroll2Section// © F4Framer. All rights reserved.\n// Visit https://f4.framer.website/\n;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NestedScroll2Section\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NestedScroll2Section.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */function NestedSection(props){const{sectionID,children,style}=props;return /*#__PURE__*/_jsx(\"div\",{id:sectionID,style:{...style},children:children});}addPropertyControls(NestedSection,{sectionID:{type:ControlType.String,title:\"Section ID\",placeholder:\"Enter section ID\"},children:{type:ControlType.ComponentInstance,title:\"Children\",description:\"By [F4Framer](https://f4.framer.website/)\"}});export default NestedSection// © F4Framer. All rights reserved.\n// Visit https://f4.framer.website/\n;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NestedSection\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NestedSection.map"],"mappings":"+LAEmI,SAAS,EAAqB,EAAM,CAAC,GAAK,CAAC,gBAAc,WAAS,WAAS,EAAY,EAAUA,EAAO,IAAI,EAGjN,OAHmN,MAAc,CAAC,GAAG,EAAU,SAAS,EAAc,CAAC,IAAM,EAAc,SAAS,eAAe,CAAa,EAAK,GAAe,QAAQ,IAAI,oCAAoC,GAAe,EAChb,EAAU,QAAQ,YAAY,CAAC,QAAQ,IAAI,kCAAkC,GAAe,EAC5F,EAAO,SAAS,CAAC,IAAI,EAAc,sBAAsB,CAAC,CAAC,IAAI,EAAO,YAAY,EAAQ,SAAS,QAAQ,CAAC,CAAE,GAAQ,QAAQ,MAAM,0BAA0B,EAAc,WAAW,CACtL,CAAC,EAAE,CAAC,EAAc,CAAO,CAAC,EAAsB,EAAK,MAAM,CAAC,IAAI,EAAU,MAAM,CAAC,OAAO,SAAS,EAAW,UAAQ,CAAC,CAAE,qBAH/E,IAAoC,IAAoD,EAGR,EAAoB,EAAqB,CAAC,cAAc,CAAC,KAAK,EAAY,OAAO,MAAM,iBAAiB,YAAY,kBAAkB,EAAE,SAAS,CAAC,KAAK,EAAY,kBAAkB,MAAM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