'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-6e6e9b7c.js');
const index$1 = require('./index-680e4e32.js');

const bsInputFieldCss = "bs-input-field{display:block;width:100%}";

const BsInputField = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /** Native attributes to pass through to the input element. */
    this.attrs = {};
    this.disabled = false;
    this.error = undefined;
    this.hints = undefined;
    this.label = undefined;
    this.passAttrs = '';
    this.placeholder = undefined;
    this.required = undefined;
    this.type = 'text';
    this.value = undefined;
    this.hintId = null;
  }
  componentWillLoad() {
    this.hintId = this.hints ? index$1.v4() : null;
    this.attrs = index$1.getHostAttrsWithId(this.hostEl, [
      'autocomplete',
      'max',
      'min',
      'maxlength',
      'minlength',
      'name',
      ...this.passAttrs.split(',')
    ]);
  }
  render() {
    return (index.h(index.Host, null, index.h("bs-field-layout", { disabled: this.disabled, error: this.error, hints: this.hints, label: this.label, "label-for": this.attrs.id, required: this.required, hintId: this.hintId }, index.h("bs-input", Object.assign({ type: this.type, disabled: this.disabled, error: this.error, placeholder: this.placeholder, required: this.required, value: this.value, hintId: this.hintId }, this.attrs)))));
  }
  get hostEl() { return index.getElement(this); }
};
BsInputField.style = bsInputFieldCss;

exports.bs_input_field = BsInputField;

//# sourceMappingURL=bs-input-field.cjs.entry.js.map