import{d as h,M as p,h as r,x as f,o as N,c as _,e as g,u as x,_ as k}from"./address-utils-hEfxg3NW.js";import{b as w,X as E,l as q,v as B}from"./main-BNudzuV8.js";const L={class:"chat-rename-dialog"},M=h({__name:"chat-rename-dialog",props:{chatName:{}},emits:["select","validate"],setup(d,{emit:m}){const{chatsNameMaxLength:n}=B,{$tr:o}=p(w),l=d,c=m,t=r({oldName:l.chatName,newName:l.chatName}),i=r(!1),u=e=>!!e||o("validation.text.required"),v=e=>q.size(e)<n||o("validation.text.length",{length:n.toString()});return c("select",t.value),f(()=>i.value,e=>c("validate",e),{immediate:!0}),(e,a)=>(N(),_("div",L,[g(x(E),{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"])]))}}),V=k(M,[["__scopeId","data-v-6d405426"]]);export{V as default};
