{"version":3,"file":"UtilityOverrides.C6KmMe4o.mjs","names":[],"sources":["https:/framerusercontent.com/modules/0n8lAoZmGIKTGOSrztxX/B9aRousWtBi3c9KBsErh/UtilityOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nexport function withLogProps(Component){return props=>{console.log(props);return /*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",onClick:console.log(\"Hello World\",props.link)});};}export function withHiddenContent(Component){return props=>{const cardCount=3;function hideChildrenCardWhenExceedsTheCount(){const filterElements=document.querySelectorAll(\".filter-cms-content-resource\");filterElements.forEach(parentNode=>{if(!parentNode)return;const children=Array.from(parentNode.children).filter(child=>!child.classList.contains(\"no-results-message\"));children.forEach((filterElement,index)=>{filterElement.style.display=index<cardCount?\"\":\"none\";});});}useLayoutEffect(()=>{hideChildrenCardWhenExceedsTheCount();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withFilterContent(Component){return props=>{const clsName=`${props.className} search-text-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:clsName});};}export function withFilterContainer(Component){return props=>{const newCls=`${props.className} filter-cms-content-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:newCls});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHiddenContent\":{\"type\":\"reactHoc\",\"name\":\"withHiddenContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogProps\":{\"type\":\"reactHoc\",\"name\":\"withLogProps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContent\":{\"type\":\"reactHoc\",\"name\":\"withFilterContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContainer\":{\"type\":\"reactHoc\",\"name\":\"withFilterContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UtilityOverrides.map"],"mappings":"2GACA,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,QAAQ,IAAI,EAAM,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,iBAAiB,QAAQ,QAAQ,IAAI,cAAc,EAAM,KAAK,CAAC,CAAC,EAAilB,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAQ,GAAG,EAAM,UAAU,uBAAuB,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAQ,CAAC,EAAI,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAO,GAAG,EAAM,UAAU,8BAA8B,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAO,CAAC,mBAD1lC,IAAmC"}