{"version":3,"file":"Alt_Text.DiY-Iv87.mjs","names":["useState","useRef","__esmMin","init_npm_react_18_3_1","_e","c","init_jsx_runtime","ce","de","withImageAlt","altText","setAltText","ref","img","Component","props","init_Alt_Text"],"sources":["https:/framerusercontent.com/modules/HUI2rxs9fMfdy7ac952W/897WAgAa4Xb0iByN8njn/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":"A,gIAAwF,SAAgBS,EAAa,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAACC,EAAQC,GAAYX,EAAS,EAAE,EAAQY,EAAIX,EAAO,IAAI,EAAiO,OAA/NM,MAAc,CAAC,GAAG,CAACK,EAAI,QAAQ,OAAiH,IAAMC,GAAnGD,EAAI,QAAQ,QAAQ,8BAA8B,GAAGA,EAAI,QAAQ,cAAc,cAAA,EAAgC,cAAc,KAAK,EAAKC,GAAK,KAAKF,EAAWE,EAAI,GAAG,CAAG,EAAE,CAAC,CAAC,EAAsB,gBAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQH,EAAQ,QAAQ,OAAO,MAAM,MAAM,EAAE,SAAsB,gBAAKI,EAAU,CAAC,GAAGC,EAAM,KAAKL,CAAO,CAAC,CAAC,CAAC,CAAE,CAAE,C"}