{"version":3,"file":"CollapsableButtonOverride.DU57EC4C.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/sJgZke2ZWFQXspXYvqiR/5Fy7OW7icbYuTT3goGY9/CollapsableButtonOverride.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";import{getFirstFocusableElement}from\"https://framerusercontent.com/modules/6mZD1mkIUALd1E2W5DL8/cOrZhXPvCgxix4JUXL87/FocusUtils.js\";export function withAccessibility(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const wrapeprRef=useRef();useEffect(()=>{if(wrapeprRef?.current){wrapeprRef.current.parentElement.parentElement.setAttribute(\"aria-live\",\"polite\");}},[]);useEffect(()=>{if(wrapeprRef?.current){const focusableElement=getFirstFocusableElement(wrapeprRef.current);let hasChild=wrapeprRef.current.querySelector('[data-framer-name=\"Answer\"]');// Different acordeons are implemented differnetly, so we need to cover multiple cases\nif(!hasChild){hasChild=wrapeprRef.current.parentElement.parentElement.querySelector('[data-framer-name=\"Answer\"]');}focusableElement.setAttribute(\"aria-expanded\",!!hasChild);}},[props]);return /*#__PURE__*/_jsx(\"div\",{className:`CustomFocus ${props.className}`,ref:wrapeprRef,children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAccessibility\":{\"type\":\"reactHoc\",\"name\":\"withAccessibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CollapsableButtonOverride.map"],"mappings":"mQAA8N,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAWA,IAC/I,OADwJ,MAAc,CAAI,GAAY,SAAS,EAAW,QAAQ,cAAc,cAAc,aAAa,YAAY,SAAY,EAAC,EAAE,EAAE,MAAc,CAAC,GAAG,GAAY,QAAQ,CAAC,IAAM,EAAiB,EAAyB,EAAW,SAAa,EAAS,EAAW,QAAQ,cAAc,+BAC3mB,AAAc,IAAS,EAAW,QAAQ,cAAc,cAAc,cAAc,+BAAgC,EAAiB,aAAa,gBAAgB,CAAC,CAAC,EAAW,CAAC,EAAC,CAAC,EAAM,EAAsB,EAAK,MAAM,CAAC,UAAU,eAAe,EAAM,YAAY,IAAI,EAAW,SAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,EAAE,CAAG,EAAG"}