import{c as I,e as J,a as K,p as i,b as f,d as L,f as g,h as s,m as v,r,s as m,l as M,i as S,w as T}from"../../custom-element.js";import{i as j}from"../../if.js";import{s as u}from"../../slot.js";import{a as q}from"../../attributes.js";import{N as A}from"../numberbadge/NumberBadge.js";import"../../branches.js";var O=g('<span class="mc-tabs__badge"><!></span>'),P=g('<button><span class="mc-tabs__icon svelte-g14hff"><!></span> <span class="mc-tabs__label svelte-g14hff"><!></span> <!></button>'),Q=g('<span class="mc-tabs__badge"><!></span>'),R=g('<a><span class="mc-tabs__icon svelte-g14hff"><!></span> <span class="mc-tabs__label svelte-g14hff"><!></span> <!></a>'),U=g('<li class="mc-tabs__item" role="presentation"><!></li>');const V={hash:"svelte-g14hff",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-tabs.svelte-g14hff {background-color:var(--tabs-color-background-default, #ffffff);position:relative;width:100%;height:3.5rem;}.mc-tabs__list.svelte-g14hff {list-style-type:none;padding-inline-start:0;margin-block:0;display:flex;gap:0.5rem;padding:var(--tabs-list-padding, 0.5rem 0.25rem);}.mc-tabs__tab.svelte-g14hff {font-size:var(--font-size-100, 0.875rem);font-weight:var(--font-weight-semi-bold, 600);align-items:center;background:none;border:none;border-radius:var(--border-radius-s, 0.25rem);color:var(--tabs-color-text-default, #404040);cursor:pointer;display:flex;gap:0.25rem;height:2.5rem;justify-content:center;outline:none;padding-left:0.75rem;padding-right:0.75rem;position:relative;text-decoration:none;}.mc-tabs__tab.svelte-g14hff:hover {background-color:var(--tabs-color-background-hover, rgba(0, 0, 0, 0.05));}.mc-tabs__tab.svelte-g14hff: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-tabs__tab--selected.svelte-g14hff {color:var(--tabs-color-text-selected, #006902);background-color:var(--tabs-color-background-selected, #ebf5de);}.mc-tabs__tab--selected.svelte-g14hff:hover {background-color:var(--tabs-color-background-selected-hover, #c5e39e);}.mc-tabs__tab--disabled.svelte-g14hff {color:var(--tabs-color-text-disabled, #b3b3b3);cursor:not-allowed;}.mc-tabs__tab--disabled.svelte-g14hff:hover {background:none;}.mc-tabs__label.svelte-g14hff {pointer-events:none;}.mc-tabs__icon.svelte-g14hff {fill:currentcolor;height:1.5rem;width:1.5rem;}.mc-tabs__icon.svelte-g14hff:empty {display:none;}`};function W(D,t){J(t,!0),K(D,V);let h=i(t,"tag",7,"button"),o=i(t,"selected",7,!1),p=i(t,"href",7),_=i(t,"disabled",7),b=i(t,"badge",7),E=M(t,["$$slots","$$events","$$legacy","$$host","tag","selected","href","disabled","badge"]);var C={get tag(){return h()},set tag(e="button"){h(e),v()},get selected(){return o()},set selected(e=!1){o(e),v()},get href(){return p()},set href(e){p(e),v()},get disabled(){return _()},set disabled(e){_(e),v()},get badge(){return b()},set badge(e){b(e),v()}},y=U(),F=s(y);{var G=e=>{var a=P();q(a,()=>({type:"button",role:"tab","aria-selected":o(),class:["mc-tabs__tab",o()&&"mc-tabs__tab--selected",_()&&"mc-tabs__tab--disabled"],...E}),void 0,void 0,void 0,"svelte-g14hff");var l=s(a),k=s(l);u(k,t,"icon",{},null),r(l);var n=m(l,2),w=s(n);u(w,t,"default",{},null),r(n);var x=m(n,2);{var B=d=>{var c=O(),z=s(c);{let N=T(()=>o()?"accent":"standard");A(z,{get label(){return b()},get appearance(){return S(N)}})}r(c),f(d,c)};j(x,d=>{b()&&d(B)})}r(a),f(e,a)},H=e=>{var a=R();q(a,()=>({href:p(),role:"tab","aria-selected":o(),class:["mc-tabs__tab",o()&&"mc-tabs__tab--selected",_()&&"mc-tabs__tab--disabled"],...E}),void 0,void 0,void 0,"svelte-g14hff");var l=s(a),k=s(l);u(k,t,"icon",{},null),r(l);var n=m(l,2),w=s(n);u(w,t,"default",{},null),r(n);var x=m(n,2);{var B=d=>{var c=Q(),z=s(c);{let N=T(()=>o()?"accent":"standard");A(z,{get label(){return b()},get appearance(){return S(N)}})}r(c),f(d,c)};j(x,d=>{b()&&d(B)})}r(a),f(e,a)};j(F,e=>{h()==="button"?e(G):e(H,-1)})}return r(y),f(D,y),L(C)}customElements.define("m-tab",I(W,{selected:{attribute:"selected",reflect:!0,type:"Boolean"},disabled:{attribute:"disabled",reflect:!0,type:"Boolean"},tag:{},href:{},badge:{}},["icon","default"],[],{mode:"open"}));
//# sourceMappingURL=Tab.js.map
