{"version":3,"file":"Alt_Text.BQ8_McMt.mjs","names":["useState","useRef","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","_e","de","withImageAlt","altText","setAltText","ref","img","Component","props","init_Alt_Text"],"sources":["https:/framerusercontent.com/modules/7Qqk2l7zNfLb8PRVgU48/XPn6KJBkM8nf7ViawpTS/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;const img=parent?.querySelector(\"img\");if(img?.alt){setAltText(img.alt);}},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:altText?\"block\":\"none\"},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,EAAmN,OAAjNG,MAAc,CAAC,GAAG,CAACQ,EAAI,QAAQ,OAAmG,IAAMC,GAArFD,EAAI,QAAQ,QAAQ,8BAA8B,GAAGA,EAAI,QAAQ,cAAA,EAAgC,cAAc,KAAK,EAAKC,GAAK,KAAKF,EAAWE,EAAI,GAAG,CAAG,EAAE,CAAC,CAAC,EAAsB,gBAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQH,EAAQ,QAAQ,MAAM,EAAE,SAAsB,gBAAKI,EAAU,CAAC,GAAGC,EAAM,KAAKL,CAAO,CAAC,CAAC,CAAC,CAAE,CAAE,C"}