import { B as BaseField } from './BaseField-461b6d0c.js';

var DateDataType;
(function (DateDataType) {
  DateDataType["Unix"] = "unix";
  DateDataType["ISO"] = "iso";
})(DateDataType || (DateDataType = {}));
class DateField extends BaseField {
  constructor(id, title, placeholder, description) {
    super(id, 'date');
    this.dateFormat = 'YYYY-MM-DD';
    this.timeFormat = 'HH:mm:ss';
    this.inputType = 'date';
    this.dateDataType = DateDataType.ISO;
    this.title = title;
    this.placeholder = placeholder;
    this.description = description;
  }
  setDataType(dateDataType) {
    this.dateDataType = dateDataType;
    return this;
  }
  setDateFormat(format) {
    this.dateFormat = format;
    return this;
  }
  setInputType(inputType) {
    this.inputType = inputType;
    return this;
  }
  setTimeFormat(format) {
    this.timeFormat = format;
    return this;
  }
  setTimePlaceholder(placeholder) {
    this.timePlaceholder = placeholder;
    return this;
  }
  showPreview() {
    this.preview = true;
    return this;
  }
}
DateField.type = 'date';

export { DateField as D, DateDataType as a };
