import{c as q,a as L,p as n,b as p,d as V,f as u,e as $,g as j,h as _,s as A,i as l,r as c,t as x,j as D,k as F,l as G,m as d}from"../../custom-element.js";import{i as S}from"../../if.js";import{e as T}from"../../each.js";import{a as Y,r as H,s as k}from"../../attributes.js";import{b as I}from"../../input.js";import{c as J}from"../../custom-element-forward-events.js";import"../../branches.js";var K=u('<span class="mc-toggle__label svelte-1p7hz9f"> </span>'),N=u('<div><label class="mc-toggle__container svelte-1p7hz9f"><input class="mc-toggle__input svelte-1p7hz9f" type="checkbox"/> <!></label></div>'),O=u("<div></div>");const P={hash:"svelte-1p7hz9f",code:`/**
 * Do not edit directly, this file was auto-generated.
 */
/* stylelint-disable string-no-newline */.mc-field__label.svelte-1p7hz9f, .mc-field__legend.svelte-1p7hz9f {font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--field-color-label, #000000);}.mc-field__legend.svelte-1p7hz9f {padding-inline:0;}.mc-field__requirement.svelte-1p7hz9f, .mc-field__help.svelte-1p7hz9f {font-size:var(--font-size-50, 0.75rem);line-height:var(--line-height-m, 1.5);font-weight:var(--font-weight-regular, 400);vertical-align:top;color:var(--field-color-requirement, #666666);}.mc-field__help.svelte-1p7hz9f {display:block;margin-top:0.125rem;}.mc-field__content.svelte-1p7hz9f {margin-top:0.5rem;}.mc-field__validation-message.svelte-1p7hz9f {font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-m, 1.5);display:inline-flex;gap:0.25rem;margin-top:0.25rem;}.mc-field__validation-message.is-valid.svelte-1p7hz9f::before, .mc-field__validation-message.is-invalid.svelte-1p7hz9f::before {content:"";height:1.25rem;width:1.25rem;}.mc-field__validation-message.is-valid.svelte-1p7hz9f {color:var(--field-color-validation-valid, #117f03);}.mc-field__validation-message.is-valid.svelte-1p7hz9f::before {background-color:var(--field-color-validation-valid, #117f03);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M3.25 10c0-3.72792 3.02208-6.75 6.75-6.75 3.7279 0 6.75 3.02208 6.75 6.75 0 3.7279-3.0221 6.75-6.75 6.75-3.72792 0-6.75-3.0221-6.75-6.75ZM10 1.75c-4.55635 0-8.25 3.69365-8.25 8.25 0 4.5563 3.69365 8.25 8.25 8.25 4.5563 0 8.25-3.6937 8.25-8.25 0-4.55635-3.6937-8.25-8.25-8.25Zm4.2803 6.697c.2929-.2929.2929-.76777 0-1.06066-.2929-.2929-.7677-.2929-1.0606 0L9.16667 11.4393 7.197 9.46967c-.2929-.29289-.76777-.29289-1.06066 0-.2929.29289-.2929.76773 0 1.06063l2.5 2.5c.29289.2929.76776.2929 1.06066 0l4.5833-4.5833Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M3.25 10c0-3.72792 3.02208-6.75 6.75-6.75 3.7279 0 6.75 3.02208 6.75 6.75 0 3.7279-3.0221 6.75-6.75 6.75-3.72792 0-6.75-3.0221-6.75-6.75ZM10 1.75c-4.55635 0-8.25 3.69365-8.25 8.25 0 4.5563 3.69365 8.25 8.25 8.25 4.5563 0 8.25-3.6937 8.25-8.25 0-4.55635-3.6937-8.25-8.25-8.25Zm4.2803 6.697c.2929-.2929.2929-.76777 0-1.06066-.2929-.2929-.7677-.2929-1.0606 0L9.16667 11.4393 7.197 9.46967c-.2929-.29289-.76777-.29289-1.06066 0-.2929.29289-.2929.76773 0 1.06063l2.5 2.5c.29289.2929.76776.2929 1.06066 0l4.5833-4.5833Z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-field__validation-message.is-invalid.svelte-1p7hz9f {color:var(--field-color-validation-invalid, #c61112);}.mc-field__validation-message.is-invalid.svelte-1p7hz9f::before {background-color:var(--field-color-validation-invalid, #c61112);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 3.25c-3.72792 0-6.75 3.02208-6.75 6.75 0 3.7279 3.02208 6.75 6.75 6.75 3.7279 0 6.75-3.0221 6.75-6.75 0-3.72792-3.0221-6.75-6.75-6.75ZM1.75 10c0-4.55635 3.69365-8.25 8.25-8.25 4.5563 0 8.25 3.69365 8.25 8.25 0 4.5563-3.6937 8.25-8.25 8.25-4.55635 0-8.25-3.6937-8.25-8.25ZM10 5.91667c.4142 0 .75.33578.75.75v4.16663c0 .4142-.3358.75-.75.75-.41421 0-.75-.3358-.75-.75V6.66667c0-.41422.33579-.75.75-.75Zm0 8.25003c.4602 0 .8333-.3731.8333-.8334 0-.4602-.3731-.8333-.8333-.8333-.46024 0-.83333.3731-.83333.8333 0 .4603.37309.8334.83333.8334Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 3.25c-3.72792 0-6.75 3.02208-6.75 6.75 0 3.7279 3.02208 6.75 6.75 6.75 3.7279 0 6.75-3.0221 6.75-6.75 0-3.72792-3.0221-6.75-6.75-6.75ZM1.75 10c0-4.55635 3.69365-8.25 8.25-8.25 4.5563 0 8.25 3.69365 8.25 8.25 0 4.5563-3.6937 8.25-8.25 8.25-4.55635 0-8.25-3.6937-8.25-8.25ZM10 5.91667c.4142 0 .75.33578.75.75v4.16663c0 .4142-.3358.75-.75.75-.41421 0-.75-.3358-.75-.75V6.66667c0-.41422.33579-.75.75-.75Zm0 8.25003c.4602 0 .8333-.3731.8333-.8334 0-.4602-.3731-.8333-.8333-.8333-.46024 0-.83333.3731-.83333.8333 0 .4603.37309.8334.83333.8334Z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-field__validation-message.is-loading.svelte-1p7hz9f {color:var(--field-color-validation-loading, #666666);}.mc-field--group.svelte-1p7hz9f {border-width:0;margin-inline:0;padding:0;}

/* stylelint-enable string-no-newline */.mc-toggle.svelte-1p7hz9f {width:fit-content;}.mc-toggle__container.svelte-1p7hz9f {display:flex;align-items:center;cursor:pointer;gap:0.5rem;position:relative;padding:0.25rem;}.mc-toggle__container.svelte-1p7hz9f::before, .mc-toggle__container.svelte-1p7hz9f::after {content:"";}.mc-toggle__container.svelte-1p7hz9f::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-1p7hz9f::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-1p7hz9f {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}.mc-toggle__label.svelte-1p7hz9f {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-1p7hz9f:has(:where(.svelte-1p7hz9f):checked) .mc-toggle__container:where(.svelte-1p7hz9f)::before {background-color:var(--forms-color-background-checked, #117f03);}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):checked) .mc-toggle__container:where(.svelte-1p7hz9f)::after {transform:translate(1rem, -50%);}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):disabled) .mc-toggle__container:where(.svelte-1p7hz9f) {cursor:not-allowed;}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):disabled) .mc-toggle__container:where(.svelte-1p7hz9f)::before {background-color:var(--forms-color-background-disabled, #d9d9d9);}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):disabled) .mc-toggle__container:where(.svelte-1p7hz9f)::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):disabled) .mc-toggle__label:where(.svelte-1p7hz9f) {color:var(--forms-color-text-disabled, #737373);}.mc-toggle.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):focus-visible) .mc-toggle__container:where(.svelte-1p7hz9f)::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-1p7hz9f .mc-toggle__container:where(.svelte-1p7hz9f)::before {height:2rem;width:3.5rem;}.mc-toggle--m.svelte-1p7hz9f .mc-toggle__container:where(.svelte-1p7hz9f)::after {height:1.5rem;width:1.5rem;left:0.5rem;}.mc-toggle--m.svelte-1p7hz9f:has(:where(.svelte-1p7hz9f):checked) .mc-toggle__container:where(.svelte-1p7hz9f)::after {transform:translate(1.5rem, -50%);}.mc-toggle--hide-label.svelte-1p7hz9f .mc-toggle__label:where(.svelte-1p7hz9f) {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}.mc-field__content.svelte-1p7hz9f:where(.mc-field__content--inline:where(.svelte-1p7hz9f)) {display:flex;flex-flow:row wrap;gap:0.25rem 1rem;}`};function Q(w,i){$(i,!0),L(w,P);const y=[];let f=n(i,"name",7),a=n(i,"value",31,()=>j([])),h=n(i,"options",7),m=n(i,"inline",7),E=G(i,["$$slots","$$events","$$legacy","$$host","name","value","options","inline"]);var Z={get name(){return f()},set name(e){f(e),d()},get value(){return a()},set value(e=[]){a(e),d()},get options(){return h()},set options(e){h(e),d()},get inline(){return m()},set inline(e){m(e),d()}},o=O();return Y(o,()=>({class:["mc-field__content",m()&&"mc-field__content--inline"],...E}),void 0,void 0,void 0,"svelte-1p7hz9f"),T(o,21,h,e=>e.id,(e,t)=>{var s=N(),b=_(s),r=_(b);H(r);var z,C=A(r,2);{var M=v=>{var g=K(),B=_(g,!0);c(g),x(()=>F(B,l(t).label)),p(v,g)};S(C,v=>{l(t).label&&v(M)})}c(b),c(s),x(()=>{D(s,1,`mc-toggle mc-field__item ${l(t).label?"":" mc-toggle--hide-label"} ${l(t).size==="m"?" mc-toggle--m":""}`,"svelte-1p7hz9f"),k(r,"id",l(t).id),k(r,"name",f()),r.disabled=l(t).disabled,z!==(z=l(t).value)&&(r.value=(r.__value=l(t).value)??"")}),I(y,[],r,()=>(l(t).value,a()),a),p(e,s)}),c(o),p(w,o),V(Z)}customElements.define("m-toggle-group",q(Q,{options:{attribute:"options",reflect:!0,type:"Array"},inline:{attribute:"inline",reflect:!0,type:"Boolean"},name:{},value:{}},[],[],{mode:"open"},J));
//# sourceMappingURL=ToggleGroup.js.map
