import{E as e,L as t,M as n,P as r,R as i,T as a,V as o,W as s,_ as c,a as l,b as u,d,ft as f,it as p,j as m,n as h,ot as g,q as _,st as v,t as y,v as b}from"../../client.js";var x=r(`<button type="button" role="radio"> </button>`),S=r(`<div role="radiogroup"></div>`),C={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 w(t,r){v(r,!0),u(t,C);let y=h(r,`selected`,15,0),w=h(r,`full`,7),T=h(r,`size`,7,`s`),E=h(r,`segments`,7),D=h(r,`onChange`,7),O,k=(e,t)=>{let n=typeof y()==`string`?t||``:e;y(n),D()?.(e);let r=new CustomEvent(`change`,{detail:n,bubbles:!0,composed:!0});O.dispatchEvent(r)},A=(e,t)=>{let n=typeof y()==`string`?t||``:e;return y()===n};var j={get selected(){return y()},set selected(e=0){y(e),p()},get full(){return w()},set full(e){w(e),p()},get size(){return T()},set size(e=`s`){T(e),p()},get segments(){return E()},set segments(e){E(e),p()},get onChange(){return D()},set onChange(e){D(e),p()}},M=S();return a(M,21,E,e,(e,t,r)=>{var a=x(),l=_(a,!0);f(a),s((e,n,r)=>{c(a,1,e,`svelte-1p6odhf`),d(a,`tabindex`,n),d(a,`aria-checked`,r),m(l,o(t).label)},[()=>b([`mc-segmented-control__segment`,A(r,o(t).id)&&`mc-segmented-control__segment--selected`]),()=>A(r,o(t).id)?0:-1,()=>A(r,o(t).id)?`true`:`false`]),i(`click`,a,()=>k(r,o(t).id)),n(e,a)}),f(M),l(M,e=>O=e,()=>O),s(()=>c(M,1,b([`mc-segmented-control`,`mc-segmented-control--${T()}`,w()&&`mc-segmented-control--full`]),`svelte-1p6odhf`)),n(t,M),g(j)}t([`click`]),customElements.define(`m-segmented-control`,y(w,{full:{attribute:`full`,reflect:!0,type:`Boolean`},selected:{},size:{},segments:{},onChange:{}},[],[],{mode:`open`}));
//# sourceMappingURL=SegmentedControl.js.map