import{ref as p,watch as V,onBeforeUnmount as v}from"vue";import r from"../../_util/raf.mjs";import x from"./useValueTexts.mjs";function h(a,{formatList:f,generateConfig:l,locale:c}){const n=p(null);let t;function o(e,m=!1){if(r.cancel(t),m){n.value=e;return}t=r(()=>{n.value=e})}const[,i]=x(n,{formatList:f,generateConfig:l,locale:c});function s(e){o(e)}function u(e=!1){o(null,e)}return V(a,()=>{u(!0)}),v(()=>{r.cancel(t)}),[i,s,u]}export{h as default};
