import { r as registerInstance, h } from './index-b7735e0d.js';

let DvnFieldInputMultipleChoice = class {
  constructor(hostRef) {
    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 (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 => (h("dvn-select-option", { value: option.value }, option.label)))));
    }
    if (field.inputType === 'tag-cloud') {
      return (h("dvn-tag-cloud", { disabled: disabled || field.disabled, editable: true, options: field.options, value: value }));
    }
    return (h("dvn-checkbox-group", { options: field.options, value: value }));
  }
};

export { DvnFieldInputMultipleChoice as dvn_field_input_multiple_choice };
