import{D as e,L as t,M as n,P as r,R as i,W as a,Y as o,_ as s,a as c,b as l,c as u,ft as d,it as f,j as p,l as m,n as h,ot as g,q as _,r as v,st as y,t as b,v as x,w as S}from"../../client.js";import{t as C}from"../../custom-element-forward-events.js";var w=r(`<span class="mc-text-input__addon svelte-5c9enb"> </span>`),T=r(`<span class="mc-text-input__addon svelte-5c9enb"> </span>`),E=r(`<div class="mc-controls-options svelte-5c9enb"><button type="button" class="mc-controls-options__button svelte-5c9enb"><svg class="mc-controls-options__icon svelte-5c9enb" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2ZM8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" class="svelte-5c9enb"></path></svg> <span class="mc-controls-options__label svelte-5c9enb"> </span></button></div>`),D=r(`<div><span class="mc-text-input__icon svelte-5c9enb"><!></span> <!> <input/> <!> <!></div>`),O={hash:`svelte-5c9enb`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-controls-options.svelte-5c9enb {align-items:center;display:inline-flex;justify-content:center;gap:0.5rem;}.mc-controls-options__button.svelte-5c9enb {background-color:transparent;border-width:0;color:initial;font-family:inherit;outline:none;appearance:none;cursor:pointer;padding:0;border-radius:var(--border-radius-full, 100%);}.mc-controls-options__button.svelte-5c9enb:hover .mc-controls-options__icon:where(.svelte-5c9enb) {fill:var(--forms-color-icon-clear-hover, #4d4d4d);}.mc-controls-options__button.svelte-5c9enb: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-controls-options__icon.svelte-5c9enb {fill:var(--forms-color-icon-clear, #666666);color:var(--forms-color-icon-clear, #666666);}.mc-controls-options__button.svelte-5c9enb, .mc-controls-options__icon.svelte-5c9enb {height:1.5rem;width:1.5rem;}.mc-controls-options__label.svelte-5c9enb {height:0;width:0;overflow:hidden;position:absolute;top:-1000px;left:-1000px;text-align:left;opacity:0;}.mc-controls-options__unit.svelte-5c9enb {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}

/* stylelint-disable string-no-newline */.mc-text-input.svelte-5c9enb {transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;color:var(--forms-color-text-default, #000000);display:block;width:100%;height:3rem;display:flex;align-items:center;gap:0.5rem;box-sizing:border-box;}.mc-text-input__control.svelte-5c9enb {background-color:transparent;border-width:0;font-family:inherit;outline:none;}.mc-text-input__control[type=number].svelte-5c9enb::-webkit-inner-spin-button, .mc-text-input__control[type=number].svelte-5c9enb::-webkit-outer-spin-button {appearance:none;margin:0;}.mc-text-input__control[type=number].svelte-5c9enb {
  /* For Gecko rendering engine */appearance:textfield;}.mc-text-input__control[type=search].svelte-5c9enb::-webkit-search-decoration, .mc-text-input__control[type=search].svelte-5c9enb::-webkit-search-cancel-button {appearance:none;}.mc-text-input__control.svelte-5c9enb {padding:0.75rem 0.6875rem;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);flex-grow:1;}.mc-text-input__control.svelte-5c9enb::placeholder {color:var(--forms-color-placeholder, #666666);}.mc-text-input__addon.svelte-5c9enb {font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}.mc-text-input__icon.svelte-5c9enb {fill:var(--forms-color-icon-default, #666666);height:1.5rem;width:1.5rem;flex-shrink:0;}.mc-text-input.svelte-5c9enb:focus-within {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-text-input.svelte-5c9enb:hover:not(:focus-within) {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-text-input.svelte-5c9enb:has(input:where(.svelte-5c9enb):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none;}.mc-text-input.svelte-5c9enb:has(input[readonly]:where(.svelte-5c9enb)) {border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none;}.mc-text-input.svelte-5c9enb:has(.mc-text-input__icon:where(.svelte-5c9enb)), .mc-text-input.svelte-5c9enb:has(.mc-text-input__addon:where(.svelte-5c9enb)) {padding-inline-start:0.6875rem;}.mc-text-input.svelte-5c9enb:has(.mc-text-input__icon:where(.svelte-5c9enb)) .mc-text-input__control:where(.svelte-5c9enb), .mc-text-input.svelte-5c9enb:has(.mc-text-input__addon:where(.svelte-5c9enb)) .mc-text-input__control:where(.svelte-5c9enb) {padding-inline-start:0;}.mc-text-input.svelte-5c9enb:has(.mc-controls-options:where(.svelte-5c9enb)), .mc-text-input.svelte-5c9enb:has(.mc-text-input__addon:where(.svelte-5c9enb)) {padding-inline-end:0.6875rem;}.mc-text-input.svelte-5c9enb:has(.mc-controls-options:where(.svelte-5c9enb)) .mc-text-input__control:where(.svelte-5c9enb), .mc-text-input.svelte-5c9enb:has(.mc-text-input__addon:where(.svelte-5c9enb)) .mc-text-input__control:where(.svelte-5c9enb) {padding-inline-end:0;}.mc-text-input--s.svelte-5c9enb {height:2rem;}.mc-text-input--s.svelte-5c9enb .mc-text-input__control:where(.svelte-5c9enb) {padding:0.375rem 0.6875rem;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);}.mc-text-input--s.svelte-5c9enb:has(.mc-text-input__icon:where(.svelte-5c9enb)) {padding-inline-start:0.4375rem;}.mc-text-input--s.svelte-5c9enb:has(.mc-controls-options:where(.svelte-5c9enb)) {padding-inline-end:0.4375rem;}.mc-text-input.is-invalid.svelte-5c9enb {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-text-input.is-invalid.svelte-5c9enb:hover:not(:focus-within) {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-text-input.svelte-5c9enb :where(.svelte-5c9enb) {box-sizing:border-box;}

/* stylelint-enable string-no-newline */.mc-text-input__icon.svelte-5c9enb:empty {display:none;}`};function k(t,r){y(r,!0),l(t,O);let b=h(r,`id`,7),C=h(r,`name`,7),k=h(r,`value`,15),A=h(r,`placeholder`,7),j=h(r,`inputtype`,7,`text`),M=h(r,`isinvalid`,7),N=h(r,`disabled`,7),P=h(r,`readonly`,7),F=h(r,`size`,7,`m`),I=h(r,`clearlabel`,7,`Clear content`),L=h(r,`isclearable`,7),R=h(r,`prefix`,7),z=h(r,`suffix`,7),B=h(r,`element`,15),V=h(r,`class`,7),H=v(r,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`name`,`value`,`placeholder`,`inputtype`,`isinvalid`,`disabled`,`readonly`,`size`,`clearlabel`,`isclearable`,`prefix`,`suffix`,`element`,`class`]),U=()=>k(``);var W={get id(){return b()},set id(e){b(e),f()},get name(){return C()},set name(e){C(e),f()},get value(){return k()},set value(e){k(e),f()},get placeholder(){return A()},set placeholder(e){A(e),f()},get inputtype(){return j()},set inputtype(e=`text`){j(e),f()},get isinvalid(){return M()},set isinvalid(e){M(e),f()},get disabled(){return N()},set disabled(e){N(e),f()},get readonly(){return P()},set readonly(e){P(e),f()},get size(){return F()},set size(e=`m`){F(e),f()},get clearlabel(){return I()},set clearlabel(e=`Clear content`){I(e),f()},get isclearable(){return L()},set isclearable(e){L(e),f()},get prefix(){return R()},set prefix(e){R(e),f()},get suffix(){return z()},set suffix(e){z(e),f()},get element(){return B()},set element(e){B(e),f()},get class(){return V()},set class(e){V(e),f()}},G=D(),K=_(G);S(_(K),r,`icon`,{},null),d(K);var q=o(K,2),J=e=>{var t=w(),r=_(t,!0);d(t),a(()=>p(r,R())),n(e,t)};e(q,e=>{R()&&e(J)});var Y=o(q,2);m(Y,()=>({class:`mc-text-input__control`,"aria-invalid":M(),name:C(),id:b(),type:j(),placeholder:A(),disabled:N(),readonly:P(),...H}),void 0,void 0,void 0,`svelte-5c9enb`,!0),c(Y,e=>B(e),()=>B());var X=o(Y,2),Z=e=>{var t=T(),r=_(t,!0);d(t),a(()=>p(r,z())),n(e,t)};e(X,e=>{z()&&e(Z)});var Q=o(X,2),$=e=>{var t=E(),r=_(t),s=o(_(r),2),c=_(s,!0);d(s),d(r),d(t),a(()=>p(c,I())),i(`click`,r,U),n(e,t)};return e(Q,e=>{L()&&k()&&e($)}),d(G),a(()=>s(G,1,x([`mc-text-input`,`mc-text-input--${F()}`,M()&&`is-invalid`,V()]),`svelte-5c9enb`)),u(Y,k),n(t,G),g(W)}t([`click`]),customElements.define(`m-textinput`,b(k,{isinvalid:{attribute:`isinvalid`,reflect:!0,type:`Boolean`},disabled:{attribute:`disabled`,reflect:!0,type:`Boolean`},readonly:{attribute:`readonly`,reflect:!0,type:`Boolean`},isclearable:{attribute:`isclearable`,reflect:!0,type:`Boolean`},id:{},name:{},value:{},placeholder:{},inputtype:{},size:{},clearlabel:{},prefix:{},suffix:{},element:{},class:{}},[`icon`],[],{mode:`open`},C));export{k as default};
//# sourceMappingURL=Textinput.js.map