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