'use strict';

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

var vue = require('vue');
require('../../../../utils/index.js');
var datePicker = require('./datePicker.js');
var event = require('../../../../utils/src/elementPlus/event.js');
var exports$1 = require('../../../../utils/src/elementPlus/exports.js');
var dateShortcuts = require('../../../../utils/src/date/dateShortcuts.js');

var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: "GmDatePicker"
  },
  __name: "DatePicker",
  props: datePicker.datePickerProps,
  emits: datePicker.datePickerEmits,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = vue.useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = event.getGmEvent(datePicker.elDatePickerEmits, emit);
    const elRef = vue.ref();
    const exposeEvents = ["focus", "handleOpen", "handleClose"];
    const { exposeFns } = exports$1.getGmExports(elRef, exposeEvents);
    const shortcutList = vue.computed(() => Array.isArray(props.shortcuts) ? props.shortcuts : dateShortcuts.getDateShortcuts(props.type));
    __expose({
      elRef,
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_date_picker = vue.resolveComponent("el-date-picker");
      return vue.openBlock(), vue.createBlock(_component_el_date_picker, vue.mergeProps({
        ref_key: "elRef",
        ref: elRef
      }, props, { shortcuts: shortcutList.value }, vue.toHandlers(vue.unref(elEvents))), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.unref(slots).default ? {
          name: "default",
          fn: vue.withCtx((slotValue) => [
            vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(slotValue)))
          ]),
          key: "0"
        } : void 0,
        vue.unref(slots)["range-separator"] ? {
          name: "range-separator",
          fn: vue.withCtx((slotValue) => [
            vue.renderSlot(_ctx.$slots, "range-separator", vue.normalizeProps(vue.guardReactiveProps(slotValue)))
          ]),
          key: "1"
        } : void 0
      ]), 1040, ["shortcuts"]);
    };
  }
});

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