import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";var n=e(t(),1);function r(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=r.current;if(!t)return;if(!e){t.removeAttribute(`title`);return}let n=()=>{let e=i.current?.textContent??``;e?t.title=e:t.removeAttribute(`title`)};n();let a=new MutationObserver(n);return a.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>a.disconnect()},[e,t]),{titleRef:r,labelTextRef:i}}export{r as t};