import{c as G,e as H,a as J,p as r,s as L,b as s,d as M,f as W,h as S,m as c,r as P,y as B,x as E,i as j,aW as O,aZ as Q,t as R,k as T,w as U}from"../../custom-element.js";import{i as D}from"../../if.js";import{e as V,i as X}from"../../each.js";import{c as K}from"../../svelte-component.js";import{a as Y}from"../../attributes.js";import{b as tt}from"../../this.js";import{B as et}from"../button/Button.js";import{I as ot}from"../iconbutton/IconButton.js";import{P as at,x as it}from"../../Condition20.js";import"../../branches.js";import"../../slot.js";import"../loader/Loader.js";var nt=W('<li class="mc-navigation-indicator__item svelte-1u324yb"><button></button></li>'),rt=W('<div class="mc-navigation-indicator svelte-1u324yb" role="navigation" aria-label="Navigations steps"><ul class="mc-navigation-indicator__list svelte-1u324yb"></ul> <!></div>');const st={hash:"svelte-1u324yb",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-navigation-indicator.svelte-1u324yb {display:flex;align-items:center;gap:0.5rem;max-width:42rem;overflow:scroll;}.mc-navigation-indicator__list.svelte-1u324yb {display:flex;align-items:center;gap:0.25rem;list-style:none;margin:0;padding:0;}.mc-navigation-indicator__item.svelte-1u324yb {display:flex;align-items:center;justify-content:center;}.mc-navigation-indicator__button.svelte-1u324yb {transition:box-shadow 200ms ease;width:1.5rem;height:0.5rem;border:none;border-radius:var(--border-radius-l, 1rem);background-color:var(--navigation-indicator-color-background-default, #c9d0de);cursor:pointer;transition:height 0.2s ease, height 0.2s ease, background-color 0.2s ease;}.mc-navigation-indicator__button.svelte-1u324yb:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-navigation-indicator__button--active.svelte-1u324yb {width:3rem;height:0.75rem;background-color:var(--navigation-indicator-color-background-active, #464e63);}`};function ct(I,a){H(a,!0),J(I,st);let g=r(a,"steps",7),l=r(a,"selected",15),b=r(a,"action",7,"resume"),d=r(a,"label",7),p=r(a,"player",7,!0),_=r(a,"onAction",7),y;const C=U(()=>b()==="pause"?at:it);function N(t){l(t)}function Z(t,u){t.key==="Enter"&&N(u)}function z(){_()?.(),y.dispatchEvent(new CustomEvent("action",{bubbles:!0,composed:!0}))}var $={get steps(){return g()},set steps(t){g(t),c()},get selected(){return l()},set selected(t){l(t),c()},get action(){return b()},set action(t="resume"){b(t),c()},get label(){return d()},set label(t){d(t),c()},get player(){return p()},set player(t=!0){p(t),c()},get onAction(){return _()},set onAction(t){_(t),c()}},v=rt(),h=S(v);V(h,21,()=>Array.from({length:g()}),X,(t,u,n)=>{var m=nt(),k=S(m),e=()=>N(n),i=f=>Z(f,n);Y(k,()=>({class:{"mc-navigation-indicator__button":!0,"mc-navigation-indicator__button--active":l()==n},"aria-label":"Navigation step button",...l()==n?{"aria-current":"step"}:{},onclick:e,onkeydown:i}),void 0,void 0,void 0,"svelte-1u324yb"),P(m),s(t,m)}),P(h);var q=L(h,2);{var F=t=>{var u=B(),n=E(u);{var m=e=>{et(e,{size:"s",iconposition:"left",ghost:!0,onclick:z,children:(i,f)=>{O();var o=Q();R(()=>T(o,d())),s(i,o)},$$slots:{default:!0,icon:(i,f)=>{var o=B(),w=E(o);K(w,()=>j(C),(x,A)=>{A(x,{slot:"icon"})}),s(i,o)}}})},k=e=>{ot(e,{size:"s",ghost:!0,onclick:z,$$slots:{icon:(i,f)=>{var o=B(),w=E(o);K(w,()=>j(C),(x,A)=>{A(x,{slot:"icon"})}),s(i,o)}}})};D(n,e=>{d()?e(m):e(k,-1)})}s(t,u)};D(q,t=>{p()&&t(F)})}return P(v),tt(v,t=>y=t,()=>y),s(I,v),M($)}customElements.define("m-navigation-indicator",G(ct,{player:{attribute:"player",reflect:!0,type:"Boolean"},steps:{},selected:{},action:{},label:{},onAction:{}},[],[],{mode:"open"}));
//# sourceMappingURL=NavigationIndicator.js.map
