import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createVNode, mergeProps, toHandlers, unref, mergeModels } from 'vue';
import '../../../../../../utils/index.mjs';
import '../../../numberInterval/index.mjs';
import { useWatchModelChange } from '../../composables/useWatchModelChange.mjs';
import { searchFormNumberIntervalEmits, searchFormNumberIntervalProps, SearchFormNumberIntervalName } from './searchFormNumberInterval.mjs';
import { getGmEvent } from '../../../../../../utils/src/elementPlus/event.mjs';
import { numIntervalEmits } from '../../../numberInterval/numberInterval.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: SearchFormNumberIntervalName
  },
  __name: "SearchFormNumberInterval",
  props: /* @__PURE__ */ mergeModels(searchFormNumberIntervalProps, {
    "modelValue": {},
    "modelModifiers": {}
  }),
  emits: /* @__PURE__ */ mergeModels(searchFormNumberIntervalEmits, ["update:modelValue"]),
  setup(__props, { emit: __emit }) {
    const props = __props;
    const modelValue = useModel(__props, "modelValue");
    const emit = __emit;
    const numberIntervalEvents = getGmEvent(numIntervalEmits, emit);
    useWatchModelChange(modelValue, { prop: props.prop, noDefaultSync: props.noDefaultSync });
    return (_ctx, _cache) => {
      const _component_gm_number_interval = resolveComponent("gm-number-interval");
      const _component_gm_form_item = resolveComponent("gm-form-item");
      return openBlock(), createBlock(_component_gm_form_item, { prop: _ctx.prop }, {
        default: withCtx(() => [
          createVNode(_component_gm_number_interval, mergeProps({
            modelValue: modelValue.value,
            "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
            disabled: _ctx.disabled,
            separator: _ctx.separator,
            modelSeparator: _ctx.modelSeparator,
            minPlaceholder: `${_ctx.label}\u6700\u5C0F\u503C`,
            maxPlaceholder: `${_ctx.label}\u6700\u5927\u503C`,
            multiple: false,
            clearable: ""
          }, toHandlers(unref(numberIntervalEvents))), null, 16, ["modelValue", "disabled", "separator", "modelSeparator", "minPlaceholder", "maxPlaceholder"])
        ]),
        _: 1
        /* STABLE */
      }, 8, ["prop"]);
    };
  }
});

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