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