'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-ce58ddc5.js');

let DvnFieldInputMultipleChoice = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  render() {
    const { disabled, errors, field, value } = this;
    const { options = [] } = field;
    const hasError = errors && errors.length > 0;
    // const error = hasError ? errors![0] : undefined;
    if (field.inputType === 'select') {
      return (index.h("dvn-select", {
        // dataAdapter={field.dataAdapter}
        // dataProvider={field.dataProvider}
        disabled: disabled || field.disabled, feedback: hasError ? 'error' : undefined, leaned: true, multiple: true, enableSearch: true, value: value, width: "100%"
      }, options.map(option => (index.h("dvn-select-option", { value: option.value }, option.label)))));
    }
    if (field.inputType === 'tag-cloud') {
      return (index.h("dvn-tag-cloud", { disabled: disabled || field.disabled, editable: true, options: field.options, value: value }));
    }
    return (index.h("dvn-checkbox-group", { options: field.options, value: value }));
  }
};

exports.dvn_field_input_multiple_choice = DvnFieldInputMultipleChoice;
