'use strict';

const index$1 = require('./index-ce58ddc5.js');
const index = require('./index-7e3bc620.js');
const BaseField = require('./BaseField-d019ade6.js');

class BooleanField extends BaseField.BaseField {
  constructor(id, title, description, label) {
    super(id, 'boolean');
    this.id = id;
    this.title = title;
    this.description = description;
    this.label = label;
  }
  showPreview() {
    this.preview = true;
    return this;
  }
  getDisplayValue(value) {
    return value;
  }
}
BooleanField.type = 'boolean';

// component generator
const render = (field, value, errors, disabled, onFieldChange, onFieldBlur) => index$1.h("dvn-field-input-boolean", { disabled: disabled, field: field, errors: errors, onChange: (e) => onFieldChange(field, e.detail), onBlur: () => onFieldBlur(field), value: value });
// register 'text' field for json form generations
index.registerField('boolean', render);

exports.BooleanField = BooleanField;
