import{c as M,e as O,a as Q,p as i,s as E,t as y,k as z,b,h as a,d as R,f as m,A as S,m as c,r as s}from"../../custom-element.js";import{i as V}from"../../if.js";import{b as T}from"../../this.js";import{B as k}from"../button/Button.js";import{D as U}from"../divider/Divider.js";import"../../branches.js";import"../../slot.js";import"../../attributes.js";import"../loader/Loader.js";var W=m('<span class="mc-button__label svelte-nje7f7"> </span>'),X=m('<span class="mc-stepper-bottom-bar__button--text"><!></span>'),Y=m('<span class="mc-button__label svelte-nje7f7"> </span>'),Z=m('<span class="mc-stepper-bottom-bar__button"><!></span>'),$=m('<span class="mc-button__label svelte-nje7f7"> </span>'),ee=m('<div class="mc-stepper-bottom-bar svelte-nje7f7"><!> <div class="mc-stepper-bottom-bar__left svelte-nje7f7"><!></div> <div class="mc-stepper-bottom-bar__right svelte-nje7f7"><!> <span class="mc-stepper-bottom-bar__button"><!></span></div></div>');const te={hash:"svelte-nje7f7",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-stepper-bottom-bar.svelte-nje7f7 {position:fixed;box-sizing:border-box;bottom:0;left:0;width:100%;height:4rem;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;background-color:var(--action-bottom-bar-color-background, #ffffff);z-index:var(--stepper-bottom-bar-z-index, 3);}
@media screen and (min-width: 679px) {
}
@media screen and (min-width: 679px) {
}.mc-stepper-bottom-bar__left.svelte-nje7f7 {padding-left:1.25rem;}
@media screen and (min-width: 679px) {.mc-stepper-bottom-bar__left.svelte-nje7f7 {padding-left:0.5rem;}
}.mc-stepper-bottom-bar__right.svelte-nje7f7 {margin-left:auto;padding:0.25rem 0.5rem 0.25rem 0;display:flex;gap:0.5rem;}
@media screen and (min-width: 679px) {.mc-stepper-bottom-bar__right.svelte-nje7f7 {padding:0.5rem 1rem 0.5rem 0;}
}.mc-button__label.svelte-nje7f7 {font-size:var(--font-size-150, 1rem);}.mc-divider {width:100%;}`};function ae(C,n){O(n,!0),Q(C,te);let t=i(n,"step",15,0),v=i(n,"steps",15,0),f=i(n,"cancel",7,!0),_=i(n,"cancellabel",7,"Cancel"),h=i(n,"previouslabel",7,"Previous"),g=i(n,"nextlabel",7,"Next"),x=i(n,"validatelabel",7,"Validate"),p;function A(){const e=new CustomEvent("cancel",{bubbles:!0,composed:!0});p.dispatchEvent(e)}function q(){if(t()>0){S(t,-1);const e=new CustomEvent("change",{detail:t(),bubbles:!0,composed:!0});p.dispatchEvent(e)}}function F(){if(t()<v()){S(t);const e=new CustomEvent("change",{detail:t(),bubbles:!0,composed:!0});p.dispatchEvent(e)}else{const e=new CustomEvent("validate",{bubbles:!0,composed:!0});p.dispatchEvent(e)}}var G={get step(){return t()},set step(e=0){t(e),c()},get steps(){return v()},set steps(e=0){v(e),c()},get cancel(){return f()},set cancel(e=!0){f(e),c()},get cancellabel(){return _()},set cancellabel(e="Cancel"){_(e),c()},get previouslabel(){return h()},set previouslabel(e="Previous"){h(e),c()},get nextlabel(){return g()},set nextlabel(e="Next"){g(e),c()},get validatelabel(){return x()},set validatelabel(e="Validate"){x(e),c()}},u=ee(),P=a(u);U(P,{});var j=E(P,2),H=a(j);{var I=e=>{var r=X(),l=a(r);k(l,{ghost:!0,size:"s",onclick:A,children:(d,L)=>{var o=W(),w=a(o,!0);s(o),y(()=>z(w,_())),b(d,o)},$$slots:{default:!0}}),s(r),b(e,r)};V(H,e=>{f()&&e(I)})}s(j);var B=E(j,2),N=a(B);{var J=e=>{var r=Z(),l=a(r);k(l,{outlined:!0,size:"s",onclick:q,children:(d,L)=>{var o=Y(),w=a(o,!0);s(o),y(()=>z(w,h())),b(d,o)},$$slots:{default:!0}}),s(r),b(e,r)};V(N,e=>{t()>0&&e(J)})}var D=E(N,2),K=a(D);return k(K,{appearance:"accent",size:"s",onclick:F,children:(e,r)=>{var l=$(),d=a(l,!0);s(l),y(()=>z(d,t()<v()?g():x())),b(e,l)},$$slots:{default:!0}}),s(D),s(B),s(u),T(u,e=>p=e,()=>p),b(C,u),R(G)}customElements.define("m-stepper-bottom-bar",M(ae,{step:{attribute:"step",reflect:!0,type:"Number"},steps:{attribute:"steps",reflect:!0,type:"Number"},cancel:{attribute:"cancel",reflect:!0,type:"Boolean"},cancellabel:{},previouslabel:{},nextlabel:{},validatelabel:{}},[],[],{mode:"open"}));
//# sourceMappingURL=StepperBottomBar.js.map
