"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getVisibleDate = void 0;
var _locale = require("@mirai/locale");
var _helpers = require("../../../../helpers");
const getVisibleDate = function (scrollPercentage) {
  let totalMonths = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _helpers.MONTHS_IN_MOBILE;
  if (scrollPercentage === undefined) return;
  const today = new Date();
  const percentagePerItem = 100 / (totalMonths - 1);
  const months = Math.floor(scrollPercentage / percentagePerItem);
  return months ? (0, _locale.dateCalc)(today, months, 'months') : today;
};
exports.getVisibleDate = getVisibleDate;
//# sourceMappingURL=getVisibleDate.js.map