import { h } from './index-102043e0.js';
import { r as registerField } from './index-336ef773.js';
import { B as BaseField } from './BaseField-461b6d0c.js';

class BooleanField extends 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) => 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
registerField('boolean', render);

export { BooleanField as B };
