import { r as registerInstance, h } from './index-0a3acb15.js';

const eclTextareaEcCss = ".ecl-text-area.sc-ecl-textarea-ec{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #707070;border-radius:0;box-shadow:none;box-sizing:border-box;color:#404040;display:block;font:normal normal 400 1rem/1.25rem arial, sans-serif;margin:0;max-width:100%;padding:calc(0.75rem - 1px) calc(0.75rem - 1px)}.ecl-text-area.sc-ecl-textarea-ec::-moz-placeholder{color:#9f9f9f;font:normal normal 400 1rem/1.25rem arial, sans-serif;opacity:1}.ecl-text-area.sc-ecl-textarea-ec::placeholder{color:#9f9f9f;font:normal normal 400 1rem/1.25rem arial, sans-serif;opacity:1}.ecl-text-area.sc-ecl-textarea-ec:hover{border-color:#004494;box-shadow:none}.ecl-text-area.sc-ecl-textarea-ec:focus-visible,.ecl-text-area.sc-ecl-textarea-ec:active{border-color:#004494;border-width:3px;box-shadow:none;outline:none;padding:calc(0.75rem - 3px) calc(0.75rem - 3px)}.ecl-text-area--m.sc-ecl-textarea-ec{width:100%}@media (min-width: 768px){.ecl-text-area--m.sc-ecl-textarea-ec{width:50%}}@media (min-width: 996px){.ecl-text-area--m.sc-ecl-textarea-ec{width:253px}}.ecl-text-area--l.sc-ecl-textarea-ec{width:100%}@media (min-width: 996px){.ecl-text-area--l.sc-ecl-textarea-ec{width:443px}}.ecl-text-area[disabled].sc-ecl-textarea-ec,.ecl-text-area--disabled.sc-ecl-textarea-ec,.ecl-text-area[readonly].sc-ecl-textarea-ec,.ecl-text-area--readonly.sc-ecl-textarea-ec{background-color:#fff;border-color:rgba(112, 112, 112, 0.5);box-shadow:none;cursor:not-allowed}.ecl-text-area[disabled].sc-ecl-textarea-ec::-moz-placeholder,.ecl-text-area--disabled.sc-ecl-textarea-ec::-moz-placeholder,.ecl-text-area[readonly].sc-ecl-textarea-ec::-moz-placeholder,.ecl-text-area--readonly.sc-ecl-textarea-ec::-moz-placeholder{color:rgba(159, 159, 159, 0.5)}.ecl-text-area[disabled].sc-ecl-textarea-ec::placeholder,.ecl-text-area--disabled.sc-ecl-textarea-ec::placeholder,.ecl-text-area[readonly].sc-ecl-textarea-ec::placeholder,.ecl-text-area--readonly.sc-ecl-textarea-ec::placeholder{color:rgba(159, 159, 159, 0.5)}.ecl-text-area[disabled].sc-ecl-textarea-ec:hover,.ecl-text-area--disabled.sc-ecl-textarea-ec:hover,.ecl-text-area[readonly].sc-ecl-textarea-ec:hover,.ecl-text-area--readonly.sc-ecl-textarea-ec:hover{border-color:rgba(112, 112, 112, 0.5);box-shadow:none}.ecl-text-area[disabled].sc-ecl-textarea-ec:focus,.ecl-text-area[disabled].sc-ecl-textarea-ec:active,.ecl-text-area--disabled.sc-ecl-textarea-ec:focus,.ecl-text-area--disabled.sc-ecl-textarea-ec:active,.ecl-text-area[readonly].sc-ecl-textarea-ec:focus,.ecl-text-area[readonly].sc-ecl-textarea-ec:active,.ecl-text-area--readonly.sc-ecl-textarea-ec:focus,.ecl-text-area--readonly.sc-ecl-textarea-ec:active{border-color:rgba(112, 112, 112, 0.5);border-width:1px;padding:calc(0.75rem - 1px) calc(0.75rem - 1px)}.ecl-text-area--invalid.sc-ecl-textarea-ec{border-color:#da2131}.ecl-text-area--invalid.sc-ecl-textarea-ec:hover{border-color:#981722}.ecl-text-area--invalid.sc-ecl-textarea-ec:active,.ecl-text-area--invalid.sc-ecl-textarea-ec:focus-visible{border-color:#004494}.ecl-text-area.sc-ecl-textarea-ec.sc-ecl-textarea-ec{margin-top:0.75rem}";

const eclTextareaEuCss = ".ecl-text-area.sc-ecl-textarea-eu{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #515560;border-radius:4px;box-shadow:0 2px 4px rgba(9, 49, 142, 0.08) inset, 0 0 10px rgba(9, 49, 142, 0.04) inset, 0 4px 5px rgba(9, 49, 142, 0.04) inset, 0 -4px 4px rgba(9, 49, 142, 0.04) inset;box-sizing:border-box;color:#171a22;display:block;font:normal normal 400 1rem/1.25rem arial, sans-serif;margin:0;max-width:100%;padding:calc(0.75rem - 1px) calc(1rem - 1px)}.ecl-text-area.sc-ecl-textarea-eu::-moz-placeholder{color:#a8aaaf;font:normal normal 400 1rem/1.25rem arial, sans-serif;opacity:1}.ecl-text-area.sc-ecl-textarea-eu::placeholder{color:#a8aaaf;font:normal normal 400 1rem/1.25rem arial, sans-serif;opacity:1}.ecl-text-area.sc-ecl-textarea-eu:hover{border-color:#515560;box-shadow:0 3px 5px rgba(9, 49, 142, 0.04) inset, 0 0 18px rgba(9, 49, 142, 0.04) inset, 0 6px 10px rgba(9, 49, 142, 0.04) inset, 0 -4px 4px rgba(9, 49, 142, 0.04) inset}.ecl-text-area.sc-ecl-textarea-eu:focus-visible,.ecl-text-area.sc-ecl-textarea-eu:active{border-color:#0e47cb;border-width:2px;box-shadow:0 3px 5px rgba(9, 49, 142, 0.04) inset, 0 0 18px rgba(9, 49, 142, 0.04) inset, 0 6px 10px rgba(9, 49, 142, 0.04) inset, 0 -4px 4px rgba(9, 49, 142, 0.04) inset;outline:none;padding:calc(0.75rem - 2px) calc(1rem - 2px)}.ecl-text-area--m.sc-ecl-textarea-eu{width:100%}@media (min-width: 768px){.ecl-text-area--m.sc-ecl-textarea-eu{width:50%}}@media (min-width: 996px){.ecl-text-area--m.sc-ecl-textarea-eu{width:253px}}.ecl-text-area--l.sc-ecl-textarea-eu{width:100%}@media (min-width: 996px){.ecl-text-area--l.sc-ecl-textarea-eu{width:443px}}.ecl-text-area[disabled].sc-ecl-textarea-eu,.ecl-text-area--disabled.sc-ecl-textarea-eu,.ecl-text-area[readonly].sc-ecl-textarea-eu,.ecl-text-area--readonly.sc-ecl-textarea-eu{background-color:#fff;border-color:rgba(81, 85, 96, 0.5);box-shadow:0 2px 4px rgba(9, 49, 142, 0.08) inset, 0 0 10px rgba(9, 49, 142, 0.04) inset, 0 4px 5px rgba(9, 49, 142, 0.04) inset, 0 -4px 4px rgba(9, 49, 142, 0.04) inset;cursor:not-allowed}.ecl-text-area[disabled].sc-ecl-textarea-eu::-moz-placeholder,.ecl-text-area--disabled.sc-ecl-textarea-eu::-moz-placeholder,.ecl-text-area[readonly].sc-ecl-textarea-eu::-moz-placeholder,.ecl-text-area--readonly.sc-ecl-textarea-eu::-moz-placeholder{color:rgba(168, 170, 175, 0.5)}.ecl-text-area[disabled].sc-ecl-textarea-eu::placeholder,.ecl-text-area--disabled.sc-ecl-textarea-eu::placeholder,.ecl-text-area[readonly].sc-ecl-textarea-eu::placeholder,.ecl-text-area--readonly.sc-ecl-textarea-eu::placeholder{color:rgba(168, 170, 175, 0.5)}.ecl-text-area[disabled].sc-ecl-textarea-eu:hover,.ecl-text-area--disabled.sc-ecl-textarea-eu:hover,.ecl-text-area[readonly].sc-ecl-textarea-eu:hover,.ecl-text-area--readonly.sc-ecl-textarea-eu:hover{border-color:rgba(81, 85, 96, 0.5);box-shadow:0 2px 4px rgba(9, 49, 142, 0.08) inset, 0 0 10px rgba(9, 49, 142, 0.04) inset, 0 4px 5px rgba(9, 49, 142, 0.04) inset, 0 -4px 4px rgba(9, 49, 142, 0.04) inset}.ecl-text-area[disabled].sc-ecl-textarea-eu:focus,.ecl-text-area[disabled].sc-ecl-textarea-eu:active,.ecl-text-area--disabled.sc-ecl-textarea-eu:focus,.ecl-text-area--disabled.sc-ecl-textarea-eu:active,.ecl-text-area[readonly].sc-ecl-textarea-eu:focus,.ecl-text-area[readonly].sc-ecl-textarea-eu:active,.ecl-text-area--readonly.sc-ecl-textarea-eu:focus,.ecl-text-area--readonly.sc-ecl-textarea-eu:active{border-color:rgba(81, 85, 96, 0.5);border-width:1px;padding:calc(0.75rem - 1px) calc(1rem - 1px)}.ecl-text-area--invalid.sc-ecl-textarea-eu{border-color:#bf0036}.ecl-text-area--invalid.sc-ecl-textarea-eu:hover{border-color:#ef0044}.ecl-text-area--invalid.sc-ecl-textarea-eu:active,.ecl-text-area--invalid.sc-ecl-textarea-eu:focus-visible{border-color:#0e47cb}.ecl-text-area.sc-ecl-textarea-eu.sc-ecl-textarea-eu{margin-top:0.75rem}";

const EclTextarea = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.theme = 'ec';
    this.styleClass = undefined;
    this.disabled = false;
    this.required = false;
    this.invalid = false;
    this.width = 'm';
    this.textareaId = undefined;
    this.name = undefined;
    this.rows = 4;
    this.placeholder = undefined;
  }
  getClass() {
    const styleClasses = [
      `ecl-text-area`,
      `ecl-text-area--${this.width}`,
      this.styleClass
    ];
    if (this.disabled) {
      styleClasses.push('ecl-text-area--disabled');
    }
    if (this.invalid) {
      styleClasses.push('ecl-text-area--invalid');
    }
    return styleClasses.join(' ');
  }
  render() {
    let attributes = {
      class: this.getClass(),
      id: this.textareaId,
      name: this.name,
      required: this.required,
      disabled: this.disabled,
      placeholder: this.placeholder,
      rows: this.rows,
    };
    return (h("textarea", Object.assign({}, attributes), h("slot", null)));
  }
};
EclTextarea.style = {
  ec: eclTextareaEcCss,
  eu: eclTextareaEuCss
};

export { EclTextarea as ecl_textarea };

//# sourceMappingURL=ecl-textarea.entry.js.map