{"version":3,"file":"CollapsableButtonOverride.DSr6OxLe.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/sJgZke2ZWFQXspXYvqiR/CFNnQKa4taPHLQKZ2q3t/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(\"span\",{className:`CustomFocus ${props.className}`,ref:wrapeprRef,style:{...props?.style},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":"qLAA8N,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAWA,EAAO,EACtJ,OADwJ,MAAc,CAAI,GAAY,SAAS,EAAW,QAAQ,cAAc,cAAc,aAAa,YAAY,QAAQ,CAAG,EAAE,CAAC,CAAC,EAAE,MAAc,CAAC,GAAG,GAAY,QAAQ,CAAC,IAAM,EAAiB,EAAyB,EAAW,OAAO,EAAM,EAAS,EAAW,QAAQ,cAAc,6BAA6B,EACxoB,AAAc,IAAS,EAAW,QAAQ,cAAc,cAAc,cAAc,6BAA6B,EAAG,EAAiB,aAAa,gBAAgB,CAAC,CAAC,CAAQ,CAAE,CAAC,EAAE,CAAC,CAAK,CAAC,EAAsB,EAAK,OAAO,CAAC,UAAU,eAAe,EAAM,YAAY,IAAI,EAAW,MAAM,CAAC,GAAG,GAAO,KAAK,EAAE,SAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,CAAK,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,iBADjU,IAA+C,IAAoI"}