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