import{c as y,e as M,a as Z,p as i,s as B,t as g,j as q,n as H,b,d as L,f as p,l as V,h as u,m as r,r as _,k as j}from"../../custom-element.js";import{i as D}from"../../if.js";import{a as F,s as S}from"../../attributes.js";import{a as A}from"../../input.js";import{c as G}from"../../custom-element-forward-events.js";import"../../branches.js";var I=p('<label class="mc-checkbox__label svelte-zknfk3"> </label>'),J=p("<div><input/> <!></div>");const K={hash:"svelte-zknfk3",code:`/**
 * Do not edit directly, this file was auto-generated.
 */
/* stylelint-disable string-no-newline */.mc-checkbox.svelte-zknfk3 {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-checkbox--indented.svelte-zknfk3 {margin-left:1.75rem;}.mc-checkbox__label.svelte-zknfk3 {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-text-default, #000000);cursor:pointer;}.mc-checkbox__input.svelte-zknfk3 {appearance:none;margin:0;cursor:pointer;flex-shrink:0;transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;height:1.25rem;width:1.25rem;position:relative;}.mc-checkbox__input.svelte-zknfk3::after {content:"";position:absolute;inset:0;background-color:var(--forms-color-icon-inverse, #ffffff);opacity:0;transform:scale(0.6);transition:0.15s ease;}.mc-checkbox__input.svelte-zknfk3:hover {border-color:var(--forms-color-border-hover, #4d4d4d);}.mc-checkbox__input.svelte-zknfk3: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-checkbox__input.svelte-zknfk3:checked::after {opacity:1;transform:scale(1);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%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='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-checkbox__input.svelte-zknfk3:indeterminate::after {opacity:1;transform:scale(1);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%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='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-checkbox__input.svelte-zknfk3:checked, .mc-checkbox__input.svelte-zknfk3:indeterminate {background-color:var(--forms-color-background-checked, #117f03);background-size:1rem 1rem;background-position:center;}.mc-checkbox__input.svelte-zknfk3:checked, .mc-checkbox__input.svelte-zknfk3:indeterminate, .mc-checkbox__input.svelte-zknfk3:disabled {border-color:transparent;}.mc-checkbox__input.svelte-zknfk3:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;}.mc-checkbox__input.svelte-zknfk3:disabled:checked::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-checkbox__input.svelte-zknfk3:disabled:indeterminate::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-checkbox__input.svelte-zknfk3:disabled + .mc-checkbox__label:where(.svelte-zknfk3) {color:var(--forms-color-text-disabled, #737373);cursor:not-allowed;}.mc-checkbox__input.svelte-zknfk3:not(:disabled):checked:hover, .mc-checkbox__input.svelte-zknfk3:not(:disabled):indeterminate:hover {background-color:var(--forms-color-background-checked-hover, #006902);}.mc-checkbox__input.is-invalid.svelte-zknfk3:not(:checked, :indeterminate) {border-color:var(--forms-color-border-invalid, #ea302d);}.mc-checkbox__input.is-invalid.svelte-zknfk3:not(:checked, :indeterminate):hover {border-color:var(--forms-color-border-invalid-hover, #c61112);}

/* stylelint-enable string-no-newline */
/* stylelint-disable string-no-newline */.mc-field__label.svelte-zknfk3, .mc-field__legend.svelte-zknfk3 {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-zknfk3 {padding-inline:0;}.mc-field__requirement.svelte-zknfk3, .mc-field__help.svelte-zknfk3 {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-zknfk3 {display:block;margin-top:0.125rem;}.mc-field__content.svelte-zknfk3 {margin-top:0.5rem;}.mc-field__validation-message.svelte-zknfk3 {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-zknfk3::before, .mc-field__validation-message.is-invalid.svelte-zknfk3::before {content:"";height:1.25rem;width:1.25rem;}.mc-field__validation-message.is-valid.svelte-zknfk3 {color:var(--field-color-validation-valid, #117f03);}.mc-field__validation-message.is-valid.svelte-zknfk3::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-zknfk3 {color:var(--field-color-validation-invalid, #c61112);}.mc-field__validation-message.is-invalid.svelte-zknfk3::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-zknfk3 {color:var(--field-color-validation-loading, #666666);}.mc-field--group.svelte-zknfk3 {border-width:0;margin-inline:0;padding:0;}

/* stylelint-enable string-no-newline */`};function N(h,t){M(t,!0),Z(h,K);let a=i(t,"id",7),c=i(t,"name",7),n=i(t,"label",7),s=i(t,"checked",15,!1),m=i(t,"indeterminate",7),v=i(t,"disabled",7),o=i(t,"isinvalid",7),f=i(t,"indented",7),w=V(t,["$$slots","$$events","$$legacy","$$host","id","name","label","checked","indeterminate","disabled","isinvalid","indented"]);var x={get id(){return a()},set id(e){a(e),r()},get name(){return c()},set name(e){c(e),r()},get label(){return n()},set label(e){n(e),r()},get checked(){return s()},set checked(e=!1){s(e),r()},get indeterminate(){return m()},set indeterminate(e){m(e),r()},get disabled(){return v()},set disabled(e){v(e),r()},get isinvalid(){return o()},set isinvalid(e){o(e),r()},get indented(){return f()},set indented(e){f(e),r()}},l=J(),k=u(l);F(k,()=>({id:a(),type:"checkbox",class:["mc-checkbox__input",o()&&"is-invalid"],"aria-invalid":o(),name:c(),disabled:v(),indeterminate:m(),...w}),void 0,void 0,void 0,"svelte-zknfk3",!0);var z=B(k,2);{var E=e=>{var d=I(),C=u(d,!0);_(d),g(()=>{S(d,"for",a()),j(C,n())}),b(e,d)};D(z,e=>{n()&&e(E)})}return _(l),g(()=>q(l,1,H(["mc-checkbox",f()&&"mc-checkbox--indented"]),"svelte-zknfk3")),A(k,s),b(h,l),L(x)}customElements.define("m-checkbox",y(N,{checked:{attribute:"checked",reflect:!0,type:"Boolean"},indeterminate:{attribute:"indeterminate",reflect:!0,type:"Boolean"},isinvalid:{attribute:"isinvalid",reflect:!0,type:"Boolean"},disabled:{attribute:"disabled",reflect:!0,type:"Boolean"},indented:{attribute:"indented",reflect:!0,type:"Boolean"},id:{},name:{},label:{}},[],[],{mode:"open"},G));export{N as C};
//# sourceMappingURL=Checkbox.js.map
