import{d as _,B as p,e as i,D as v,o as h,h as g,m as f,v as N,l as x,E as b,A as k}from"./index-95fce38e.js";const w={class:"chat-rename-dialog"},E=_({__name:"chat-rename-dialog",props:{chatName:{}},emits:["select","validate"],setup(r,{emit:s}){const o=r,{chatsNameMaxLength:l}=b,{$tr:c}=p("i18n"),t=i({oldName:o.chatName,newName:o.chatName}),d=i(!1),m=e=>!!e||c("validation.text.required"),u=e=>x.size(e)<l||c("validation.text.length",{length:l.toString()});return s("select",t.value),v(()=>d.value,e=>s("validate",e),{immediate:!0}),(e,a)=>(h(),g("div",w,[f(N,{value:t.value.newName,"onUpdate:value":a[0]||(a[0]=n=>t.value.newName=n),rules:[m,u],placeholder:"Enter chat name","onUpdate:valid":a[1]||(a[1]=n=>d.value=n)},null,8,["value","rules"])]))}});const D=k(E,[["__scopeId","data-v-b8f2d2db"]]);export{D as default};
