"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const shared_esmBundler = require("../../../../../@vue/shared/dist/shared.esm-bundler.js");
const runtime = require("../../../utils/vue/props/runtime.js");
const utils = require("../../time-picker/src/utils.js");
const getPrevMonthLastDays = (date, count) => {
  const lastDay = date.subtract(1, "month").endOf("month").date();
  return utils.rangeArr(count).map((_, index) => lastDay - (count - index - 1));
};
const getMonthDays = (date) => {
  return utils.rangeArr(date.daysInMonth()).map((_, index) => index + 1);
};
const toNestedArr = (days) => utils.rangeArr(days.length / 7).map((index) => {
  const start = index * 7;
  return days.slice(start, start + 7);
});
const dateTableProps = runtime.buildProps({
  selectedDay: { type: runtime.definePropType(Object) },
  range: { type: runtime.definePropType(Array) },
  date: {
    type: runtime.definePropType(Object),
    required: true
  },
  hideHeader: { type: Boolean }
});
const dateTableEmits = { pick: (value) => shared_esmBundler.isObject(value) };
exports.dateTableEmits = dateTableEmits;
exports.dateTableProps = dateTableProps;
exports.getMonthDays = getMonthDays;
exports.getPrevMonthLastDays = getPrevMonthLastDays;
exports.toNestedArr = toNestedArr;
