'use strict';

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

var vue = require('vue');
require('../../../../../../utils/index.js');
require('../../../../base/formItem/index.js');
require('../../../../base/cascader/index.js');
var useWatchModelChange = require('../../composables/useWatchModelChange.js');
var searchFormCascader = require('./searchFormCascader.js');
var event = require('../../../../../../utils/src/elementPlus/event.js');
var cascader = require('../../../../base/cascader/cascader.js');
var exports$1 = require('../../../../../../utils/src/elementPlus/exports.js');
var formItem = require('../../../../base/formItem/formItem.js');

var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: searchFormCascader.SearchFormCascaderName
  },
  __name: "SearchFormCascader",
  props: /* @__PURE__ */ vue.mergeModels(searchFormCascader.searchFormCascaderProps, {
    "modelValue": {},
    "modelModifiers": {}
  }),
  emits: /* @__PURE__ */ vue.mergeModels(searchFormCascader.searchFormCascaderEmits, ["update:modelValue"]),
  setup(__props, { expose: __expose, emit: __emit }) {
    const modelValue = vue.useModel(__props, "modelValue");
    const props = __props;
    const emit = __emit;
    const cascaderEvents = event.getGmEvent(cascader.cascaderEmits, emit);
    useWatchModelChange.useWatchModelChange(modelValue, { prop: props.prop, noDefaultSync: props.noDefaultSync });
    const cascaderRef = vue.ref();
    const formItemRef = vue.ref();
    const { exposeFns: cascaderFns } = exports$1.getGmObjExports(cascaderRef, cascader.cascaderExposeNames);
    const { exposeFns: formItemFns } = exports$1.getGmObjExports(formItemRef, formItem.formItemExposeNames);
    __expose({
      cascaderExposes: {
        ...cascaderFns
      },
      formItemExposes: {
        ...formItemFns
      }
    });
    return (_ctx, _cache) => {
      const _component_gm_cascader = vue.resolveComponent("gm-cascader");
      const _component_gm_form_item = vue.resolveComponent("gm-form-item");
      return vue.openBlock(), vue.createBlock(_component_gm_form_item, {
        ref_key: "formItemRef",
        ref: formItemRef,
        prop: _ctx.prop
      }, {
        default: vue.withCtx(() => [
          vue.createVNode(_component_gm_cascader, vue.mergeProps({
            ref_key: "cascaderRef",
            ref: cascaderRef,
            modelValue: modelValue.value,
            "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
            options: _ctx.options,
            props: { ..._ctx.cascaderProps },
            clearable: "",
            filterable: "",
            disabled: _ctx.disabled,
            "collapse-tags": "",
            "collapse-tags-tooltip": "",
            class: "gm-w-full",
            placeholder: _ctx.label
          }, vue.toHandlers(vue.unref(cascaderEvents))), null, 16, ["modelValue", "options", "props", "disabled", "placeholder"])
        ]),
        _: 1
        /* STABLE */
      }, 8, ["prop"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=SearchFormCascader.vue2.js.map
