import{d as C,u as g,b as w,e as B,i as v,f as S,h as l,P as o,E as x,q as r,k as f,o as t,T as i,a2 as P,_ as E}from"./index-D92x6h1h.js";const F={class:"wizard-footer"},L={class:"wizard-footer__meta"},_={class:"wizard-footer__primary"},N=C({__name:"WizardFooter",props:{prevStep:{},isFinal:{type:Boolean,default:!1},showSkip:{type:Boolean,default:!1},saving:{type:Boolean,default:!1},helpPage:{default:"firstconfig"},hideSave:{type:Boolean,default:!1},skipLabel:{default:"Skip"},skipEmphasized:{type:Boolean,default:!1}},emits:["previous","cancel","skip","save"],setup(e,{emit:k}){const d=e,n=k,{t:a}=g(),{ask:y}=w(),c=P(),h=f(()=>d.isFinal?a("Finish"):a("Save & Next")),u=f(()=>c.isOpen.value);function m(){d.helpPage&&c.toggle(d.helpPage).catch(()=>{})}async function b(){await y(a("Cancelling will exit the setup wizard, but any settings you have already saved on previous steps will remain. Continue?"),{header:a("Cancel setup wizard?"),acceptLabel:a("Cancel wizard"),rejectLabel:a("Continue setup")})&&n("cancel")}return(z,s)=>(t(),B("div",F,[v("div",L,[S(l(i),{label:l(a)("Cancel"),severity:"secondary",text:"",class:"wizard-footer__cancel",onClick:b},null,8,["label"]),e.helpPage?(t(),o(l(i),{key:0,label:l(a)("Help"),severity:"secondary",text:"",class:x(["wizard-footer__help",{"wizard-footer__help--active":u.value}]),"aria-pressed":u.value,onClick:m},null,8,["label","class","aria-pressed"])):r("",!0)]),v("div",_,[e.prevStep?(t(),o(l(i),{key:0,label:l(a)("Previous"),severity:"secondary",outlined:"",onClick:s[0]||(s[0]=p=>n("previous"))},null,8,["label"])):r("",!0),e.showSkip?(t(),o(l(i),{key:1,label:l(a)(e.skipLabel),severity:e.skipEmphasized?void 0:"secondary",outlined:!e.skipEmphasized,onClick:s[1]||(s[1]=p=>n("skip"))},null,8,["label","severity","outlined"])):r("",!0),e.hideSave?r("",!0):(t(),o(l(i),{key:2,label:h.value,loading:e.saving,disabled:e.saving,class:"wizard-footer__save",onClick:s[2]||(s[2]=p=>n("save"))},null,8,["label","loading","disabled"]))])]))}}),V=E(N,[["__scopeId","data-v-ce1c9d79"]]);export{V as W};
