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