import{d as _,i as y,r as n,w as F,c as V,o as h,a as k,u as r,b as q,n as w,j as x,_ as j}from"./index-Bl2zIsHs.js";const C=_({__name:"update-folder-name-dialog",props:{name:{}},emits:["select","validate"],setup(i,{emit:c}){const d=i,u=c,{$tr:l}=y(x),o=n(),t=n({oldName:d.name,newName:d.name}),s=n(!1);function m(e){return!!e||l("validation.text.required")}function p(e){return e!==t.value.oldName||l("validation.text.equality")}function f(e){s.value=e}function v(){u("select",t.value)}return F([()=>{var e;return(e=o.value)==null?void 0:e.isDirty},()=>s.value],()=>{var a;const e=((a=o.value)==null?void 0:a.isDirty)&&s.value;u("validate",e)},{immediate:!0}),(e,a)=>(h(),V("div",{class:w(e.$style.updateFolderName)},[k(r(q),{ref_key:"inp",ref:o,modelValue:t.value.newName,"onUpdate:modelValue":[a[0]||(a[0]=N=>t.value.newName=N),v],autofocus:!0,rules:[m,p],placeholder:r(l)("update.folder.name.input.placeholder"),"onUpdate:valid":f},null,8,["modelValue","rules","placeholder"])],2))}}),D="_updateFolderName_nyrls_1",U={updateFolderName:D},$={$style:U},B=j(C,[["__cssModules",$]]);export{B as default};
