"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const Select = require("../select/Select.vue.js");
const _sfc_main = /* @__PURE__ */ Object.assign({
  inheritAttrs: false
}, {
  __name: "MultipleSelection",
  props: {
    config: {
      type: Object,
      required: true
    },
    modelValue: {
      type: Array,
      default: () => []
    },
    placeholder: {
      type: String,
      default: "请选择"
    },
    disabled: {
      type: Boolean,
      default: false
    },
    readonly: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: true
    },
    filterable: {
      type: Boolean,
      default: false
    },
    options: {
      type: Array,
      default: () => []
    },
    optionConfig: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["update:modelValue", "change"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const inputValue = Vue.computed({
      get: () => props.modelValue,
      set: (val) => {
        emit("update:modelValue", val);
        emit("change", val);
      }
    });
    const options = Vue.computed(() => {
      var _a;
      return ((_a = props.optionConfig) == null ? void 0 : _a.options) || [];
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createBlock(Select.default, {
        modelValue: inputValue.value,
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
        placeholder: __props.placeholder,
        disabled: __props.disabled,
        readonly: __props.readonly,
        multiple: true,
        clearable: __props.clearable,
        filterable: __props.filterable,
        options: options.value,
        "option-config": __props.optionConfig,
        config: __props.config
      }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "clearable", "filterable", "options", "option-config", "config"]);
    };
  }
});
exports.default = _sfc_main;
