"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const dayjs_min = require("../../../../../../dayjs@1.11.5/node_modules/dayjs/dayjs.min.js");
const is = require("../_util/is.js");
function getAvailableDayjsLength(value) {
  if (!value) {
    return 0;
  }
  if (is.isArray(value)) {
    if (is.isDayjs(value[0]) && is.isDayjs(value[1])) {
      return 2;
    }
    if (!is.isDayjs(value[0]) && !is.isDayjs(value[1])) {
      return 0;
    }
    return 1;
  }
  return 0;
}
function isDisabledDate(date, disabledDate, mode, originMode) {
  if (typeof disabledDate !== "function") {
    return false;
  }
  if (!originMode || originMode === mode) {
    return disabledDate(date);
  }
  return disabledDate(date.startOf(mode)) && disabledDate(date.endOf(mode));
}
function getDefaultWeekStart(dayjsLocale) {
  var _a, _b;
  return ((_b = (_a = dayjs_min.Ls) === null || _a === void 0 ? void 0 : _a[dayjsLocale]) === null || _b === void 0 ? void 0 : _b.weekStart) || 0;
}
function getLocaleDayjsValue(date, dayjsLocale) {
  return date ? date.locale(dayjsLocale) : date;
}
exports.getAvailableDayjsLength = getAvailableDayjsLength;
exports.getDefaultWeekStart = getDefaultWeekStart;
exports.getLocaleDayjsValue = getLocaleDayjsValue;
exports.isDisabledDate = isDisabledDate;
//# sourceMappingURL=util.js.map
