import{c as J,e as K,a as L,p as $,g as N,b as v,d as O,f,l as P,h as o,m as j,i as t,r,s as C,t as I,j as u,n as k,k as M,w}from"../../custom-element.js";import{i as Q}from"../../if.js";import{e as R,i as T}from"../../each.js";import{a as U}from"../../attributes.js";import{f as V}from"../../Condition20.js";import"../../branches.js";var W=f('<span class="mc-stepper-stacked__icon mc-stepper-stacked__icon--check svelte-wnz47h"><!></span>'),Y=f("<span></span>"),Z=f('<li><div class="mc-stepper-stacked__indicator svelte-wnz47h"><!></div> <div class="mc-stepper-stacked__content svelte-wnz47h"><span> </span> <span class="mc-stepper-stacked__additional svelte-wnz47h"> </span></div></li>'),ee=f('<nav><ol class="mc-stepper-stacked__container svelte-wnz47h"></ol></nav>');const te={hash:"svelte-wnz47h",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-stepper-stacked__container.svelte-wnz47h {display:flex;flex-direction:column;list-style:none;padding:0;margin:0;}.mc-stepper-stacked__indicator.svelte-wnz47h {display:flex;flex-direction:column;align-items:center;margin-right:0.5rem;position:relative;min-height:100%;padding-bottom:2rem;}.mc-stepper-stacked__indicator.svelte-wnz47h::after {content:"";position:absolute;top:1.5rem;bottom:0;width:0.125rem;background-color:var(--stepper-color-progress-bar-background, #c9d0de);left:50%;transform:translateX(-50%);}.mc-stepper-stacked__circle.svelte-wnz47h {box-sizing:border-box;width:1.5rem;height:1.5rem;border-radius:50%;border:0.125rem solid var(--stepper-color-step-item-default-border, #333333);display:flex;align-items:center;justify-content:center;font-size:var(--font-size-100, 0.875rem);font-weight:var(--font-weight-bold, 700);color:var(--stepper-color-information, #666666);background-color:var(--stepper-color-step-item-default-background, #ffffff);z-index:1;flex-shrink:0;transition:background-color 200ms ease, color 200ms ease, border-color 200ms ease;}.mc-stepper-stacked__circle.is-current.svelte-wnz47h {background-color:var(--stepper-color-step-item-active-background, #117f03);border-color:var(--stepper-color-step-item-active-background, #117f03);color:var(--stepper-color-step-item-active-text, #ffffff);
  animation: svelte-wnz47h-pop-in 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;}.mc-stepper-stacked__icon--check.svelte-wnz47h {width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;color:var(--stepper-color-step-item-default-icon, #666666);fill:currentcolor;border:0.125rem solid var(--stepper-color-step-item-default-border, #333333);border-radius:50%;box-sizing:border-box;background-color:var(--stepper-color-step-item-default-background, #ffffff);z-index:1;}.mc-stepper-stacked__content.svelte-wnz47h {display:flex;flex-direction:column;padding-top:0.25rem;}.mc-stepper-stacked__label.svelte-wnz47h {font-size:var(--font-size-100, 0.875rem);color:var(--stepper-color-step-label-default, #666666);line-height:var(--line-height-s, 1.3);transition:color 200ms ease;}.mc-stepper-stacked__label.is-current.svelte-wnz47h {font-weight:var(--font-weight-medium, 600);color:var(--stepper-color-step-label-active, #000000);}.mc-stepper-stacked__additional.svelte-wnz47h {font-size:var(--font-size-50, 0.75rem);color:var(--stepper-color-information, #666666);margin-top:0.25rem;}.mc-stepper-stacked__item.svelte-wnz47h {display:flex;position:relative;}.mc-stepper-stacked__item.has-additional.svelte-wnz47h .mc-stepper-stacked__indicator:where(.svelte-wnz47h),
.mc-stepper-stacked__item.has-additional.svelte-wnz47h .mc-stepper-stacked__content:where(.svelte-wnz47h) {padding-bottom:1rem;}.mc-stepper-stacked__item.svelte-wnz47h:last-child .mc-stepper-stacked__indicator:where(.svelte-wnz47h),
.mc-stepper-stacked__item.svelte-wnz47h:last-child .mc-stepper-stacked__content:where(.svelte-wnz47h) {padding-bottom:0;}.mc-stepper-stacked__item.svelte-wnz47h:last-child .mc-stepper-stacked__indicator:where(.svelte-wnz47h)::after {display:none;}

@keyframes svelte-wnz47h-pop-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}`};function se(b,p){K(p,!0),L(b,te);let i=$(p,"step",15,1),n=$(p,"steps",31,()=>N([])),D=P(p,["$$slots","$$events","$$legacy","$$host","step","steps"]);const z=w(()=>{if(typeof i()=="number")return Math.min(Math.max(i(),1),n().length)-1;{const e=n().findIndex(s=>s.id===i());return e===-1?0:e}}),E=w(()=>()=>n().map((e,s)=>({completed:s<t(z),current:s===t(z)})));var X={get step(){return i()},set step(e=1){i(e),j()},get steps(){return n()},set steps(e=[]){n(e),j()}},l=ee();U(l,()=>({class:"mc-stepper-stacked","aria-label":"Stepper",...D}),void 0,void 0,void 0,"svelte-wnz47h");var g=o(l);return R(g,21,n,T,(e,s,x,re)=>{const _=w(()=>t(E)()[x]);var d=Z(),h=o(d),q=o(h);{var A=c=>{var a=W(),H=o(a);V(H,{}),r(a),v(c,a)},B=c=>{var a=Y();a.textContent=x+1,I(()=>u(a,1,k({"mc-stepper-stacked__circle":!0,"is-current":t(_).current}),"svelte-wnz47h")),v(c,a)};Q(q,c=>{t(_).completed?c(A):c(B,-1)})}r(h);var y=C(h,2),m=o(y),F=o(m,!0);r(m);var S=C(m,2),G=o(S,!0);r(S),r(y),r(d),I(()=>{u(d,1,k({"mc-stepper-stacked__item":!0,"has-additional":t(s).additionalinfo}),"svelte-wnz47h"),u(m,1,k({"mc-stepper-stacked__label":!0,"is-current":t(_).current}),"svelte-wnz47h"),M(F,t(s).label),M(G,t(s).additionalinfo)}),v(e,d)}),r(g),r(l),v(b,l),O(X)}customElements.define("m-stepper-stacked",J(se,{step:{},steps:{}},[],[],{mode:"open"}));
//# sourceMappingURL=StepperStacked.js.map
