import { BaseField } from '../../BaseField';
export class TextField extends BaseField {
  constructor(id, title, placeholder, description, inputType, lines = 1, linesMax = 1) {
    super(id, 'text');
    this.format = 'raw';
    this.id = id;
    this.title = title;
    this.placeholder = placeholder;
    this.description = description;
    this.inputType = inputType;
    this.lines = lines;
    this.linesMax = linesMax;
  }
  showPreview() {
    this.preview = true;
    return this;
  }
  getDisplayValue(value) {
    return value;
  }
  setInputType(inputType) {
    this.inputType = inputType;
    return this;
  }
  setFormat(format) {
    this.format = format;
    return this;
  }
  setLines(lines) {
    this.lines = lines;
    return this;
  }
  setLinesMax(linesMax) {
    this.linesMax = linesMax;
    return this;
  }
  setAutoComplete(autoComplete) {
    this.autoComplete = autoComplete;
    return this;
  }
}
TextField.type = 'text';
