import{j as e}from"./client-By3tlFYA.js";import{r as t}from"./index-TEHZzOO_.js";import{a4 as u,O as m}from"./useSelectableClick-C6FBaLSu.js";import{M as x}from"./message-CVkQtbZv.js";const f=[0,4],h={strategy:"fixed"},M=({description:i})=>{const a=t.useId(),l=t.useRef(null),[n,s]=t.useState(!1),c=t.useCallback(()=>{s(o=>!o)},[s]),r=t.useCallback(()=>{s(!1)},[s]),[d,p]=u(r);return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",ref:l,className:"media-gallery__alt__label",onClick:c,"aria-expanded":n,"aria-controls":a,children:"ALT"}),e.jsx(m,{rootClose:!0,onHide:r,show:n,target:l.current,placement:"top-end",flip:!0,offset:f,popperConfig:h,children:({props:o})=>e.jsx("div",{...o,className:"hover-card-controller",children:e.jsxs("div",{className:"info-tooltip dropdown-animation",role:"region",id:a,onMouseDown:d,onMouseUp:p,children:[e.jsx("h4",{children:e.jsx(x,{id:"alt_text_badge.title",defaultMessage:"Alt text"})}),e.jsx("p",{children:i})]})})})]})};export{M as A};
//# sourceMappingURL=alt_text_badge-BNcELapu.js.map
