import { r as registerInstance, c as createEvent, h } from './index-b7735e0d.js';

let DvnFieldInputText = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.blur = createEvent(this, "blur", 7);
    this.change = createEvent(this, "change", 7);
  }
  render() {
    const { disabled, errors, field, value } = this;
    const hasError = errors && errors.length > 0;
    // const error = hasError ? errors![0] : undefined;
    const isLongText = field.linesMax > 1 && field.linesMax >= field.lines;
    return (h("dvn-input", { id: field.id, type: field.inputType || 'text', disabled: disabled || field.disabled, placeholder: field.placeholder, onBlur: () => this.blur.emit(), value: value, feedback: hasError ? 'error' : undefined, leaned: true, long: isLongText, autoComplete: field.autoComplete, overrideStyle: { width: '100%' } }));
  }
};

export { DvnFieldInputText as dvn_field_input_text };
