import{c as A,e as D,a as F,p as t,s as Y,t as w,j as q,n as G,b as z,d as H,f as y,l as I,h as d,m as a,r as c,k as C,i as v}from"../../custom-element.js";import{i as J}from"../../if.js";import{e as K,i as N}from"../../each.js";import{a as O,d as P}from"../../attributes.js";import{c as Q}from"../../custom-element-forward-events.js";import"../../branches.js";var R=y('<option disabled="" selected=""> </option>'),T=y("<option> </option>"),U=y("<div><select><!><!></select></div>");const V={hash:"svelte-6nznl5",code:`/**
 * Do not edit directly, this file was auto-generated.
 */
/* stylelint-disable string-no-newline */.mc-select.svelte-6nznl5 {position:relative;display:block;width:100%;}.mc-select.svelte-6nznl5::after {content:"";pointer-events:none;position:absolute;top:50%;right:1rem;transform:translateY(-50%);width:1rem;height:1rem;background-color:var(--forms-color-icon-interactive, #000000);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='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%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='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-select__control.svelte-6nznl5 {appearance:none;font-family:inherit;transition:box-shadow 200ms ease;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);height:3rem;padding:0 3rem 0 0.75rem;background-position:right 1rem center;border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);display:block;width:100%;color:var(--forms-color-text-default, #000000);background-color:var(--forms-color-background-default, #ffffff);text-overflow:ellipsis;border-radius:var(--border-radius-s, 0.25rem);}.mc-select__control.svelte-6nznl5:hover {border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);}.mc-select__control.svelte-6nznl5:focus {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-select__control.svelte-6nznl5:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);border-color:transparent;cursor:not-allowed;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-select__control--readonly.svelte-6nznl5 {border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none;}.mc-select__control.is-invalid.svelte-6nznl5 {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);}.mc-select__control.is-invalid.svelte-6nznl5:hover {border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);}.mc-select--s.svelte-6nznl5 .mc-select__control:where(.svelte-6nznl5) {font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);height:2rem;padding:0 2rem 0 0.5rem;background-position:right 0.5rem center;}

/* stylelint-enable string-no-newline */`};function W(x,r){D(r,!0),F(x,V);let m=t(r,"id",7),u=t(r,"name",7),f=t(r,"value",15),s=t(r,"placeholder",7),h=t(r,"size",7,"m"),b=t(r,"isinvalid",7),g=t(r,"disabled",7),p=t(r,"readonly",7),_=t(r,"options",7),B=I(r,["$$slots","$$events","$$legacy","$$host","id","name","value","placeholder","size","isinvalid","disabled","readonly","options"]);var L={get id(){return m()},set id(e){m(e),a()},get name(){return u()},set name(e){u(e),a()},get value(){return f()},set value(e){f(e),a()},get placeholder(){return s()},set placeholder(e){s(e),a()},get size(){return h()},set size(e="m"){h(e),a()},get isinvalid(){return b()},set isinvalid(e){b(e),a()},get disabled(){return g()},set disabled(e){g(e),a()},get readonly(){return p()},set readonly(e){p(e),a()},get options(){return _()},set options(e){_(e),a()}},n=U(),i=d(n);O(i,()=>({id:m(),class:["mc-select__control",p()&&"mc-select__control--readonly",b()&&"is-invalid"],name:u(),disabled:g(),...B}),void 0,void 0,void 0,"svelte-6nznl5");var k=d(i);{var M=e=>{var o=R(),l=d(o);c(o),o.value=o.__value="",w(()=>C(l,`-- ${s()??""} --`)),z(e,o)};J(k,e=>{s()&&e(M)})}var S=Y(k);return K(S,17,_,N,(e,o)=>{var l=T(),j=d(l,!0);c(l);var E={};w(()=>{l.disabled=v(o).disabled,C(j,v(o).text),E!==(E=v(o).value)&&(l.value=(l.__value=v(o).value)??"")}),z(e,l)}),c(i),c(n),w(()=>q(n,1,G(["mc-select",`mc-select--${h()}`]),"svelte-6nznl5")),P(i,f),z(x,n),H(L)}customElements.define("m-select",A(W,{options:{attribute:"options",type:"Array"},isinvalid:{attribute:"isinvalid",reflect:!0,type:"Boolean"},disabled:{attribute:"disabled",reflect:!0,type:"Boolean"},readonly:{attribute:"readonly",reflect:!0,type:"Boolean"},id:{},name:{},value:{},placeholder:{},size:{}},[],[],{mode:"open"},Q));
//# sourceMappingURL=Select.js.map
