import { h } from './index-acdc1ac0.js';
import { r as registerField } from './index-d9d18e9c.js';
import { B as BaseField } from './BaseField-d94c5b14.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 };
