{"version":3,"file":"CollectionPagination_Notice.ASptpxU9.mjs","names":["React.useState","React.useRef","__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","oe","_e","de","init_jsx_runtime","c","p","init_npm_react_18_3_1","ce","init_framer_DKgW_P28","DataObserverContext","CollectionPaginationNotice","totalItems","setTotalItems","currentPage","setCurrentPage","visible","setVisible","debounceRef","countItems","wrapper","timer","observer","totalPages","safePage","hideBefore","hideAfter","props","i","num","withCollectionPaginationNotice","C","init_CollectionPagination_Notice"],"sources":["https:/framerusercontent.com/modules/V6fvksH3DoRN792zhV61/RTaFjTHu1Mnon5a4n7DB/CollectionPagination_Notice.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";// ─────────────────────────────────────────\n// FAQ 페이지용 (6개)\n// ─────────────────────────────────────────\nexport function CollectionPaginationFAQ(props){const itemsPerPage=6;const[totalItems,setTotalItems]=React.useState(0);const[currentPage,setCurrentPage]=React.useState(1);const[visible,setVisible]=React.useState(true);const debounceRef=React.useRef(null);React.useEffect(()=>{const countItems=()=>{if(debounceRef.current)clearTimeout(debounceRef.current);setVisible(false);debounceRef.current=setTimeout(()=>{const wrapper=document.querySelector(\".framer-cms-wrapper\");if(wrapper){setTotalItems(wrapper.children.length);setCurrentPage(1);}setVisible(true);},300);};const timer=setTimeout(countItems,500);const observer=new MutationObserver(countItems);const wrapper=document.querySelector(\".framer-cms-wrapper\");if(wrapper){observer.observe(wrapper,{childList:true,subtree:false});}return()=>{clearTimeout(timer);if(debounceRef.current)clearTimeout(debounceRef.current);observer.disconnect();};},[]);const totalPages=Math.max(Math.ceil(totalItems/itemsPerPage),1);const safePage=Math.min(currentPage,totalPages);const hideBefore=(safePage-1)*itemsPerPage;const hideAfter=Math.min(safePage*itemsPerPage,totalItems)+1;return{children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .framer-cms-wrapper {\n                        opacity: ${visible?1:0};\n                        transition: opacity 0.25s ease;\n                    }\n                    .framer-cms-wrapper > *:nth-child(-n+${hideBefore}) {\n                        display: none !important;\n                    }\n                    .framer-cms-wrapper > *:nth-child(n+${hideAfter}) {\n                        display: none !important;\n                    }\n                `}),/*#__PURE__*/_jsx(\"div\",{className:\"framer-cms-wrapper\",style:{width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:\"16px\"},children:props.children}),totalItems>itemsPerPage&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"center\",gap:\"20px\",padding:\"40px 0\",width:\"100%\",userSelect:\"none\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{cursor:safePage===1?\"default\":\"pointer\",opacity:safePage===1?.2:1},onClick:()=>{if(safePage>1)setCurrentPage(safePage-1);},children:\"<\"}),Array.from({length:totalPages},(_,i)=>i+1).map(num=>/*#__PURE__*/_jsx(\"div\",{onClick:()=>setCurrentPage(num),style:{cursor:\"pointer\",fontWeight:safePage===num?800:400,color:safePage===num?\"#000\":\"#999\",width:\"30px\",textAlign:\"center\"},children:num},num)),/*#__PURE__*/_jsx(\"div\",{style:{cursor:safePage===totalPages?\"default\":\"pointer\",opacity:safePage===totalPages?.2:1},onClick:()=>{if(safePage<totalPages)setCurrentPage(safePage+1);},children:\">\"})]})]})};}// ─────────────────────────────────────────\n// 공지사항 페이지용 (10개)\n// ─────────────────────────────────────────\nexport function CollectionPaginationNotice(props){const itemsPerPage=10;const[totalItems,setTotalItems]=React.useState(0);const[currentPage,setCurrentPage]=React.useState(1);const[visible,setVisible]=React.useState(true);const debounceRef=React.useRef(null);React.useEffect(()=>{const countItems=()=>{if(debounceRef.current)clearTimeout(debounceRef.current);setVisible(false);debounceRef.current=setTimeout(()=>{const wrapper=document.querySelector(\".framer-cms-wrapper\");if(wrapper){setTotalItems(wrapper.children.length);setCurrentPage(1);}setVisible(true);},300);};const timer=setTimeout(countItems,500);const observer=new MutationObserver(countItems);const wrapper=document.querySelector(\".framer-cms-wrapper\");if(wrapper){observer.observe(wrapper,{childList:true,subtree:false});}return()=>{clearTimeout(timer);if(debounceRef.current)clearTimeout(debounceRef.current);observer.disconnect();};},[]);const totalPages=Math.max(Math.ceil(totalItems/itemsPerPage),1);const safePage=Math.min(currentPage,totalPages);const hideBefore=(safePage-1)*itemsPerPage;const hideAfter=Math.min(safePage*itemsPerPage,totalItems)+1;return{children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .framer-cms-wrapper {\n                        opacity: ${visible?1:0};\n                        transition: opacity 0.25s ease;\n                    }\n                    .framer-cms-wrapper > *:nth-child(-n+${hideBefore}) {\n                        display: none !important;\n                    }\n                    .framer-cms-wrapper > *:nth-child(n+${hideAfter}) {\n                        display: none !important;\n                    }\n                `}),/*#__PURE__*/_jsx(\"div\",{className:\"framer-cms-wrapper\",style:{width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:\"16px\"},children:props.children}),totalItems>itemsPerPage&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"center\",gap:\"20px\",padding:\"40px 0\",width:\"100%\",userSelect:\"none\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{cursor:safePage===1?\"default\":\"pointer\",opacity:safePage===1?.2:1},onClick:()=>{if(safePage>1)setCurrentPage(safePage-1);},children:\"<\"}),Array.from({length:totalPages},(_,i)=>i+1).map(num=>/*#__PURE__*/_jsx(\"div\",{onClick:()=>setCurrentPage(num),style:{cursor:\"pointer\",fontWeight:safePage===num?800:400,color:safePage===num?\"#000\":\"#999\",width:\"30px\",textAlign:\"center\"},children:num},num)),/*#__PURE__*/_jsx(\"div\",{style:{cursor:safePage===totalPages?\"default\":\"pointer\",opacity:safePage===totalPages?.2:1},onClick:()=>{if(safePage<totalPages)setCurrentPage(safePage+1);},children:\">\"})]})]})};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withCollectionPaginationFAQ(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...CollectionPaginationFAQ(props)});};}withCollectionPaginationFAQ.displayName=\"CollectionPaginationFAQ\";export function withCollectionPaginationNotice(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...CollectionPaginationNotice(props)});};}withCollectionPaginationNotice.displayName=\"CollectionPaginationNotice\";\nexport const __FramerMetadata__ = {\"exports\":{\"CollectionPaginationNotice\":{\"type\":\"override\",\"name\":\"CollectionPaginationNotice\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CollectionPaginationFAQ\":{\"type\":\"override\",\"name\":\"CollectionPaginationFAQ\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCollectionPaginationNotice\":{\"type\":\"reactHoc\",\"name\":\"withCollectionPaginationNotice\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCollectionPaginationFAQ\":{\"type\":\"reactHoc\",\"name\":\"withCollectionPaginationFAQ\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CollectionPagination_Notice.map"],"mappings":"A,+LAiBA,SAAgBe,EAA2B,EAAM,CAAC,GAA2B,CAACC,EAAWC,GAAejB,EAAe,CAAC,EAAO,CAACkB,EAAYC,GAAgBnB,EAAe,CAAC,EAAO,CAACoB,EAAQC,GAAYrB,EAAe,EAAI,EAAQsB,EAAYrB,EAAa,IAAI,EAAEW,MAAoB,CAAC,IAAMW,MAAe,CAAID,EAAY,SAAQ,aAAaA,EAAY,OAAO,EAAED,EAAW,EAAK,EAAE,EAAY,QAAQ,eAAe,CAAC,IAAMG,EAAQ,SAAS,cAAc,qBAAqB,EAAKA,IAASP,EAAcO,EAAQ,SAAS,MAAM,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