import{E as e,N as t,O as n,Q as r,Rt as i,S as a,_t as o,b as s,dt as c,ft as l,kt as u,n as d,q as f,u as p,v as m,x as h,y as g}from"./vue-i18n-Bp4YYb-2.js";import{Br as _,C as v,D as y,F as b,Lt as x,ir as S,ya as C}from"./index-BOiiIZox.js";var w={class:`flex flex-col justify-between min-w-96 w-[40vw] min-h-max h-[40vh]`},T={class:`flex flex-col gap-y-4`},E={class:`mt-0`},D={class:`ml-3 font-light text-sm`},O={class:`mt-0 flex flex-col`},k={class:`flex flex-row justify-between mt-4`},A=n({__name:`NewMode`,emits:[`close`],setup(n,{emit:h}){let A=x(),j=S(),M=C(),{t:N}=d(),P=h,F=t(`emitter`),I=u(`New Mode`),L=m(()=>I.value.length<1||I.value.length>40),R=async()=>{let e=await j.createMode(I.value);e!=null&&(F.emit(`mode-add-menu`,{modeUID:e}),await M.push({name:`modes`,params:{modeUID:e}}),P(`close`))};return(t,n)=>{let u=r(`tooltip`);return f(),a(`div`,w,[g(`div`,T,[g(`div`,null,o(i(N)(`layout.menu.tooltips.createMode`))+`:`,1),g(`div`,E,[g(`small`,D,o(i(N)(`common.name`))+`: `,1),g(`div`,O,[e(i(y),{modelValue:I.value,"onUpdate:modelValue":n[0]||(n[0]=e=>I.value=e),placeholder:i(N)(`common.name`),ref:`inputArea`,id:`property-name`,class:`w-full h-11`,invalid:L.value,"input-style":{background:`rgb(var(--colors-bg-one))`},autofocus:``,onKeydown:p(R,[`enter`])},null,8,[`modelValue`,`placeholder`,`invalid`])])])]),g(`div`,k,[e(i(b),{class:`w-24 bg-bg-one`,label:i(N)(`common.cancel`),onClick:n[1]||(n[1]=e=>P(`close`))},null,8,[`label`]),l((f(),s(i(b),{class:`bg-accent/80 hover:!bg-accent w-32`,label:i(N)(`common.apply`),onClick:R},{default:c(()=>[e(i(v),{class:`outline-0`,type:`mdi`,path:i(_),size:i(A).getREMSize(1.5)},null,8,[`path`,`size`])]),_:1},8,[`label`])),[[u,i(N)(`views.speed.applySetting`),void 0,{top:!0}]])])])}}}),j=n({__name:`Wizard`,setup(e){let n=t(`dialogRef`),r=()=>{n.value.close()},i=u(1);return(e,t)=>i.value===1?(f(),s(A,{key:0,onClose:r})):h(``,!0)}});export{j as default};