import { defineComponent, useModel, resolveComponent, createBlock, openBlock, unref, mergeModels } from 'vue';
import '../../../../hooks/index.mjs';
import { companyCategoryCascaderEmits } from './companyCategoryCascader.mjs';
import { useCompanyCategoryListStore } from '../../../../hooks/store/useCompanyCategoryList/index.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmCompanyCategoryCascader"
  },
  __name: "CompanyCategoryCascader",
  props: {
    "modelValue": {},
    "modelModifiers": {}
  },
  emits: /* @__PURE__ */ mergeModels(companyCategoryCascaderEmits, ["update:modelValue"]),
  setup(__props, { emit: __emit }) {
    const categoryList = useModel(__props, "modelValue");
    const emit = __emit;
    const companyCategoryListStore = useCompanyCategoryListStore();
    return (_ctx, _cache) => {
      const _component_gm_cascader = resolveComponent("gm-cascader");
      return openBlock(), createBlock(_component_gm_cascader, {
        modelValue: categoryList.value,
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => categoryList.value = $event),
        options: unref(companyCategoryListStore).companyCategoryList,
        props: { value: "id", label: "name", children: "_child", expandTrigger: "hover" },
        placeholder: "\u516C\u53F8\u5206\u7C7B",
        filterable: "",
        clearable: "",
        onChange: _cache[1] || (_cache[1] = ($event) => emit("change", $event))
      }, null, 8, ["modelValue", "options"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=CompanyCategoryCascader.vue2.mjs.map
