"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./query-assigned-elements-8EurZY45.js"),c=require("./property-DYTC_2-m.js"),o=require("./textfield-lDKLLJ_h.js");require("./circular-progress.js");const h=require("./class-map-DTzB8z-1.js");var u=Object.defineProperty,x=Object.getOwnPropertyDescriptor,a=(n,e,i,r)=>{for(var t=r>1?void 0:r?x(e,i):e,s=n.length-1,d;s>=0;s--)(d=n[s])&&(t=(r?d(e,i,t):d(t))||t);return r&&t&&u(e,i,t),t};exports.CovalentTextField=class extends o.TextFieldBase{constructor(){super(...arguments),this.loading=!1,this.loaderDensity=-6,this.outlined=!0}render(){const e=this.charCounter&&this.maxLength!==-1,i=!!this.helper||!!this.validationMessage||e,r={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned,"cv-text-field--loading":this.loading};return l.x`
      <label class="mdc-text-field ${h.o(r)}">
        ${this.renderRipple()}
        ${this.outlined?this.renderOutline():this.renderLabel()}
        ${this.renderLeadingIcon()} ${this.renderPrefix()}
        ${this.renderInput(i)} ${this.renderSuffix()}
        ${this.renderTrailingIcon()} ${this.renderLineRipple()}
      </label>
      ${this.renderHelperText(i,e)}
    `}renderTrailingIcon(){return this.loading?l.x`<cv-circular-progress
        class="text-field-loading"
        indeterminate
        progress="0"
        density="${this.loaderDensity}"
      >
      </cv-circular-progress>`:this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}};exports.CovalentTextField.styles=[o.styles,l.i`
      ${l.r(o.styles$1)}
    `];a([c.n({type:Boolean,reflect:!0})],exports.CovalentTextField.prototype,"loading",2);a([c.n({type:Number})],exports.CovalentTextField.prototype,"loaderDensity",2);exports.CovalentTextField=a([l.e("cv-textfield")],exports.CovalentTextField);const p=exports.CovalentTextField;exports.default=p;
