{"version":3,"file":"Alt_Text.BJ96AIeV.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/viUK78cZ2dp3iQ898T38/cqUcQsNM82bMR0vhgvuL/Alt_Text.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";export function withImageAlt(Component){return props=>{const[altText,setAltText]=useState(\"\");const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const parent=ref.current.closest(\"[data-framer-component-type]\")||ref.current.parentElement.parentElement;const img=parent?.querySelector(\"img\");if(img?.alt){setAltText(img.alt);}},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:altText?\"block\":\"none\",width:\"100%\"},children:/*#__PURE__*/_jsx(Component,{...props,text:altText})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withImageAlt\":{\"type\":\"reactHoc\",\"name\":\"withImageAlt\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Alt_Text.map"],"mappings":"gIAAwF,SAAgB,EAAa,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAG,CAAO,EAAIC,EAAO,KAAK,CAAgO,OAA/N,MAAc,CAAC,GAAG,CAAC,EAAI,QAAQ,OAAiH,IAAM,GAAnG,EAAI,QAAQ,QAAQ,+BAA+B,EAAE,EAAI,QAAQ,cAAc,gBAAgC,cAAc,MAAM,CAAI,GAAK,KAAK,EAAW,EAAI,IAAI,EAAI,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQ,EAAQ,QAAQ,OAAO,MAAM,OAAO,CAAC,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAQ,CAAC,CAAC,CAAC,mBAA5hB,IAA6C"}