import{ref as e,watch as t}from"vue";function n({valueTexts:n,onTextChange:r}){let i=e(``);function a(e){i.value=e,r(e)}function o(){i.value=n.value[0]}return t(()=>[...n.value],(e,t=[])=>{e.join(`||`)!==t.join(`||`)&&n.value.every(e=>e!==i.value)&&o()},{immediate:!0}),[i,a,o]}export{n as default};