'use strict';

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

var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');

var LOCALES = {
  ru: 'ru-RU',
  en: 'en-US'
};
var MONTHS = /*#__PURE__*/Array.from({
  length: 12
}, function (_, i) {
  return i + 1;
});
var WEEKS = /*#__PURE__*/Array.from({
  length: 7
}, function (_, i) {
  return i + 1;
});
var callbackDayFormatter = function callbackDayFormatter(locale, options) {
  var dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
  return function (index) {
    // INFO: Start for monday
    var day = new Date(Date.UTC(2024, 0, index));
    var _dateFormatter$format = dateFormatter.format(day),
      _dateFormatter$format2 = _rollupPluginBabelHelpers.toArray(_dateFormatter$format),
      first = _dateFormatter$format2[0],
      rest = _dateFormatter$format2.slice(1);
    return first.toUpperCase() + rest.join('');
  };
};
var callbackMonthFormatter = function callbackMonthFormatter(locale, options) {
  var dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
  return function (month) {
    var data = new Date(Date.UTC(2024, month - 1));
    var _dateFormatter$format3 = dateFormatter.format(data),
      _dateFormatter$format4 = _rollupPluginBabelHelpers.toArray(_dateFormatter$format3),
      first = _dateFormatter$format4[0],
      rest = _dateFormatter$format4.slice(1);
    return first.toUpperCase() + rest.join('').replace('.', '');
  };
};
var ROW_STEP = 6;
var ROW_MONTH_STEP = 4;
var ROW_YEAR_STEP = 4;
var ROW_QUARTER_STEP = 2;
var YEAR_RENDER_COUNT = 12;
var offsetMap = {
  Days: ROW_STEP,
  Months: ROW_MONTH_STEP,
  Years: ROW_YEAR_STEP,
  Quarters: ROW_QUARTER_STEP
};
var QUARTER_NAMES = ['Q1', 'Q2', 'Q3', 'Q4'];
var quarterDates = {
  Q1: {
    monthIndex: 0,
    day: 1
  },
  Q2: {
    monthIndex: 3,
    day: 1
  },
  Q3: {
    monthIndex: 6,
    day: 1
  },
  Q4: {
    monthIndex: 9,
    day: 1
  }
};
var SHORT_DAY_NAMES = {
  ru: /*#__PURE__*/WEEKS.map(/*#__PURE__*/callbackDayFormatter('ru', {
    weekday: 'short'
  })),
  en: /*#__PURE__*/WEEKS.map(/*#__PURE__*/callbackDayFormatter('en', {
    weekday: 'short'
  }))
};
var FULL_DAY_NAMES = {
  ru: {
    Пн: 'Понедельник',
    Вт: 'Вторник',
    Ср: 'Среда',
    Чт: 'Четверг',
    Пт: 'Пятница',
    Сб: 'Суббота',
    Вс: 'Воскресенье'
  },
  en: {
    Mon: 'Monday',
    Tue: 'Tuesday',
    Wed: 'Wednesday',
    Thu: 'Thursday',
    Fri: 'Friday',
    Sat: 'Saturday',
    Sun: 'Sunday'
  }
};
var SHORT_MONTH_NAME = {
  ru: /*#__PURE__*/MONTHS.map(/*#__PURE__*/callbackMonthFormatter('ru', {
    month: 'short'
  })),
  en: /*#__PURE__*/MONTHS.map(/*#__PURE__*/callbackMonthFormatter('en', {
    month: 'short'
  }))
};
var MONTH_NAMES = {
  ru: /*#__PURE__*/MONTHS.map(/*#__PURE__*/callbackMonthFormatter('ru', {
    month: 'long'
  })),
  en: /*#__PURE__*/MONTHS.map(/*#__PURE__*/callbackMonthFormatter('en', {
    month: 'long'
  }))
};
var I18N = {
  next: {
    ru: 'Следующий',
    en: 'Next'
  },
  previous: {
    ru: 'Предыдущий',
    en: 'Previous'
  },
  selectDate: {
    ru: 'Выбор даты',
    en: 'Date selection'
  },
  navigationByShift: {
    ru: 'Для навигации только по доступным датам удерживайте клавишу Shift.',
    en: 'To navigate exclusively among the available dates, hold down the Shift key.'
  },
  year: {
    ru: 'год',
    en: 'year'
  },
  period: {
    ru: 'период',
    en: 'period'
  },
  month: {
    ru: 'месяц',
    en: 'month'
  }
};

exports.FULL_DAY_NAMES = FULL_DAY_NAMES;
exports.I18N = I18N;
exports.MONTHS = MONTHS;
exports.MONTH_NAMES = MONTH_NAMES;
exports.QUARTER_NAMES = QUARTER_NAMES;
exports.ROW_MONTH_STEP = ROW_MONTH_STEP;
exports.ROW_QUARTER_STEP = ROW_QUARTER_STEP;
exports.ROW_STEP = ROW_STEP;
exports.ROW_YEAR_STEP = ROW_YEAR_STEP;
exports.SHORT_DAY_NAMES = SHORT_DAY_NAMES;
exports.SHORT_MONTH_NAME = SHORT_MONTH_NAME;
exports.YEAR_RENDER_COUNT = YEAR_RENDER_COUNT;
exports.offsetMap = offsetMap;
exports.quarterDates = quarterDates;
