'use strict';

var swapModule_entry = require('./swap-module-BZ0C_ywD.js');
var index = require('./index-CAgSYWnN.js');
var ifDefined = require('./if-defined-C8-lLqpT.js');
require('./index-l_GugSCx.js');

var styles = swapModule_entry.i$1 `
  :host {
    position: relative;
    display: inline-block;
    width: 100%;
  }
`;

var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let WuiEmailInput = class WuiEmailInput extends swapModule_entry.i {
    constructor() {
        super(...arguments);
        this.disabled = false;
    }
    render() {
        return swapModule_entry.b `
      <wui-input-text
        type="email"
        placeholder="Email"
        icon="mail"
        size="lg"
        .disabled=${this.disabled}
        .value=${this.value}
        data-testid="wui-email-input"
        tabIdx=${ifDefined.o(this.tabIdx)}
      ></wui-input-text>
      ${this.templateError()}
    `;
    }
    templateError() {
        if (this.errorMessage) {
            return swapModule_entry.b `<wui-text variant="sm-regular" color="error">${this.errorMessage}</wui-text>`;
        }
        return null;
    }
};
WuiEmailInput.styles = [swapModule_entry.resetStyles, styles];
__decorate([
    index.n()
], WuiEmailInput.prototype, "errorMessage", void 0);
__decorate([
    index.n({ type: Boolean })
], WuiEmailInput.prototype, "disabled", void 0);
__decorate([
    index.n()
], WuiEmailInput.prototype, "value", void 0);
__decorate([
    index.n()
], WuiEmailInput.prototype, "tabIdx", void 0);
WuiEmailInput = __decorate([
    index.customElement('wui-email-input')
], WuiEmailInput);
//# sourceMappingURL=index-DpWtRdOC.js.map

//# sourceMappingURL=index-DpWtRdOC.js.map