{"version":3,"file":"CollapsableButtonOverride.CGbUlgAV.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":"oLAA8N,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAWA,GAAQ,CACvJ,OADwJ,MAAc,CAAI,GAAY,SAAS,EAAW,QAAQ,cAAc,cAAc,aAAa,YAAY,SAAS,EAAI,EAAE,CAAC,CAAC,MAAc,CAAC,GAAG,GAAY,QAAQ,CAAC,IAAM,EAAiB,EAAyB,EAAW,QAAQ,CAAK,EAAS,EAAW,QAAQ,cAAc,8BAA8B,CACzoB,AAAc,IAAS,EAAW,QAAQ,cAAc,cAAc,cAAc,8BAA8B,CAAE,EAAiB,aAAa,gBAAgB,CAAC,CAAC,EAAS,GAAI,CAAC,EAAM,CAAC,CAAqB,EAAK,OAAO,CAAC,UAAU,eAAe,EAAM,YAAY,IAAI,EAAW,MAAM,CAAC,GAAG,GAAO,MAAM,CAAC,SAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,CAAC,CAAC,CAAC,EAAG,kBAD/T,IAA+C,IAAoI"}