import{t as g,q as f,A as N,Z as r,w as _,z as w,B as R,C as x,I as m,aN as D,F as V,O as k}from"./en-DoRaEZbE.js";import{s as C,t as $}from"./main-hqm5HLPr.js";const q=g({__name:"chat-rename-dialog",props:{chatName:{}},emits:["select","validate"],setup(d,{emit:u}){const{chatsNameMaxLength:o}=$,{$tr:s}=f(N),c=d,l=u,a=r({oldName:c.chatName,newName:c.chatName}),i=r(!1);function h(e){return!!e||s("validation.text.required")}function p(e){return C(e)<o||s("validation.text.length",{length:o.toString()})}function v(){l("select",a.value)}return l("select",a.value),_(()=>i.value,e=>l("validate",e),{immediate:!0}),(e,t)=>(w(),R("div",{class:V(e.$style.chatRenameDialog)},[x(m(D),{modelValue:a.value.newName,"onUpdate:modelValue":t[0]||(t[0]=n=>a.value.newName=n),rules:[h,p],placeholder:m(s)("chat.rename.dialog.input.placeholder"),onChange:v,"onUpdate:valid":t[1]||(t[1]=n=>i.value=n)},null,8,["modelValue","rules","placeholder"])],2))}}),y="_chatRenameDialog_ovbsh_1",z={chatRenameDialog:y},B={$style:z},L=k(q,[["__cssModules",B]]);export{L as default};
