import{D as e,M as t,P as n,W as r,Y as i,_ as a,b as o,d as s,ft as c,it as l,j as u,l as d,n as f,o as p,ot as m,q as h,r as g,st as _,t as v,v as y}from"../../client.js";import{t as b}from"../../custom-element-forward-events.js";var x=n(`<span class="mc-toggle__label svelte-26wadt"> </span>`),S=n(`<div><label class="mc-toggle__container svelte-26wadt"><input/> <!></label></div>`),C={hash:`svelte-26wadt`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-toggle.svelte-26wadt {width:fit-content;}.mc-toggle__container.svelte-26wadt {display:flex;align-items:center;cursor:pointer;gap:0.5rem;position:relative;padding:0.25rem;}.mc-toggle__container.svelte-26wadt::before, .mc-toggle__container.svelte-26wadt::after {content:"";}.mc-toggle__container.svelte-26wadt::before {transition:box-shadow 200ms ease;height:1.5rem;width:2.5rem;background-color:var(--forms-color-background-unchecked, #666666);border-radius:var(--border-radius-l, 1rem);flex-shrink:0;}.mc-toggle__container.svelte-26wadt::after {height:1.25rem;width:1.25rem;background-color:var(--forms-color-icon-inverse, #ffffff);border-radius:var(--border-radius-full, 100%);background-position:center;left:0.375rem;position:absolute;top:50%;transform:translateY(-50%);}.mc-toggle__input.svelte-26wadt {height:0;width:0;overflow:hidden;position:absolute;top:-1000px;left:-1000px;text-align:left;opacity:0;}.mc-toggle__label.svelte-26wadt {color:var(--forms-color-text-default, #000000);font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);line-height:var(--line-height-m, 1.5);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):checked) .mc-toggle__container:where(.svelte-26wadt)::before {background-color:var(--forms-color-background-checked, #117f03);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):checked) .mc-toggle__container:where(.svelte-26wadt)::after {transform:translate(1rem, -50%);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):disabled) .mc-toggle__container:where(.svelte-26wadt) {cursor:not-allowed;}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):disabled) .mc-toggle__container:where(.svelte-26wadt)::before {background-color:var(--forms-color-background-disabled, #d9d9d9);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):disabled) .mc-toggle__container:where(.svelte-26wadt)::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):disabled) .mc-toggle__label:where(.svelte-26wadt) {color:var(--forms-color-text-disabled, #737373);}.mc-toggle.svelte-26wadt:has(:where(.svelte-26wadt):focus-visible) .mc-toggle__container:where(.svelte-26wadt)::before {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-toggle--m.svelte-26wadt .mc-toggle__container:where(.svelte-26wadt)::before {height:2rem;width:3.5rem;}.mc-toggle--m.svelte-26wadt .mc-toggle__container:where(.svelte-26wadt)::after {height:1.5rem;width:1.5rem;left:0.5rem;}.mc-toggle--m.svelte-26wadt:has(:where(.svelte-26wadt):checked) .mc-toggle__container:where(.svelte-26wadt)::after {transform:translate(1.5rem, -50%);}.mc-toggle--hide-label.svelte-26wadt .mc-toggle__label:where(.svelte-26wadt) {height:0;width:0;overflow:hidden;position:absolute;top:-1000px;left:-1000px;text-align:left;opacity:0;}`};function w(n,v){_(v,!0),o(n,C);let b=f(v,`id`,7),w=f(v,`name`,7),T=f(v,`label`,7),E=f(v,`checked`,15,!1),D=f(v,`disabled`,7),O=f(v,`size`,7,`s`),k=f(v,`class`,7),A=g(v,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`name`,`label`,`checked`,`disabled`,`size`,`class`]);var j={get id(){return b()},set id(e){b(e),l()},get name(){return w()},set name(e){w(e),l()},get label(){return T()},set label(e){T(e),l()},get checked(){return E()},set checked(e=!1){E(e),l()},get disabled(){return D()},set disabled(e){D(e),l()},get size(){return O()},set size(e=`s`){O(e),l()},get class(){return k()},set class(e){k(e),l()}},M=S(),N=h(M),P=h(N);d(P,()=>({id:b(),type:`checkbox`,class:`mc-toggle__input`,name:w(),disabled:D(),...A}),void 0,void 0,void 0,`svelte-26wadt`,!0);var F=i(P,2),I=e=>{var n=x(),i=h(n,!0);c(n),r(()=>u(i,T())),t(e,n)};return e(F,e=>{T()&&e(I)}),c(N),c(M),r(()=>{a(M,1,y([`mc-toggle`,`mc-toggle--${O()}`,k()]),`svelte-26wadt`),s(N,`for`,b())}),p(P,E),t(n,M),m(j)}customElements.define(`m-toggle`,v(w,{checked:{attribute:`checked`,reflect:!0,type:`Boolean`},disabled:{attribute:`disabled`,reflect:!0,type:`Boolean`},id:{},name:{},label:{},size:{},class:{}},[],[],{mode:`open`},b));
//# sourceMappingURL=Toggle.js.map