import{o as B,c as D,e as q,a as A,p as d,t as p,j as v,n as b,b as _,d as F,f as y,m as a,h as G,r as k,i as c,k as H,u as I}from"../../custom-element.js";import{e as J,i as K}from"../../each.js";import{s as x}from"../../attributes.js";import{b as L}from"../../this.js";var M=y('<button type="button" role="radio"> </button>'),N=y('<div role="radiogroup"></div>');const O={hash:"svelte-1p6odhf",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-segmented-control.svelte-1p6odhf {display:inline-flex;background-color:var(--segmented-control-color-background-default, #ffffff);border:1px solid var(--segmented-control-color-border, #cccccc);border-radius:3rem;height:2rem;padding:0.25rem;box-sizing:border-box;gap:0.25rem;}.mc-segmented-control__segment.svelte-1p6odhf {display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;color:var(--segmented-control-color-text-default, #666666);cursor:pointer;font-family:inherit;font-weight:var(--font-weight-semi-bold, 600);font-size:var(--font-size-100, 0.875rem);padding:0 1rem;border-radius:3rem;height:1.5rem;width:100%;transition:background-color 0.3s ease;white-space:nowrap;}.mc-segmented-control__segment.svelte-1p6odhf:not(.mc-segmented-control__segment--selected):hover {background-color:var(--segmented-control-color-background-hover, rgba(0, 0, 0, 0.05));}.mc-segmented-control__segment--selected.svelte-1p6odhf {color:var(--segmented-control-color-text-selected, #ffffff);background-color:var(--segmented-control-color-background-selected, #464e63);}.mc-segmented-control__segment.svelte-1p6odhf: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-segmented-control--m.svelte-1p6odhf {height:3rem;padding:0.5rem;}.mc-segmented-control--m.svelte-1p6odhf .mc-segmented-control__segment:where(.svelte-1p6odhf) {height:2rem;}.mc-segmented-control--full.svelte-1p6odhf {display:flex;}`};function P(h,n){q(n,!0),A(h,O);let s=d(n,"selected",15,0),m=d(n,"full",7),i=d(n,"size",7,"s"),f=d(n,"segments",7),g;const w=(e,t)=>{const o=typeof s()=="string"?t||"":e;s(o);const r=new CustomEvent("change",{detail:o,bubbles:!0,composed:!0});g.dispatchEvent(r)},u=(e,t)=>{const o=typeof s()=="string"?t||"":e;return s()===o};var z={get selected(){return s()},set selected(e=0){s(e),a()},get full(){return m()},set full(e){m(e),a()},get size(){return i()},set size(e="s"){i(e),a()},get segments(){return f()},set segments(e){f(e),a()}},l=N();return J(l,21,f,K,(e,t,o)=>{var r=M(),S=G(r,!0);k(r),p((C,E,j)=>{v(r,1,C,"svelte-1p6odhf"),x(r,"tabindex",E),x(r,"aria-checked",j),H(S,c(t).label)},[()=>b(["mc-segmented-control__segment",u(o,c(t).id)&&"mc-segmented-control__segment--selected"]),()=>u(o,c(t).id)?0:-1,()=>u(o,c(t).id)?"true":"false"]),I("click",r,()=>w(o,c(t).id)),_(e,r)}),k(l),L(l,e=>g=e,()=>g),p(()=>v(l,1,b(["mc-segmented-control",`mc-segmented-control--${i()}`,m()&&"mc-segmented-control--full"]),"svelte-1p6odhf")),_(h,l),F(z)}B(["click"]);customElements.define("m-segmented-control",D(P,{full:{attribute:"full",reflect:!0,type:"Boolean"},selected:{},size:{},segments:{}},[],[],{mode:"open"}));
//# sourceMappingURL=SegmentedControl.js.map
