"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get FULL_DAY_NAMES () {
        return FULL_DAY_NAMES;
    },
    get I18N () {
        return I18N;
    },
    get MONTHS () {
        return MONTHS;
    },
    get MONTH_NAMES () {
        return MONTH_NAMES;
    },
    get QUARTER_NAMES () {
        return QUARTER_NAMES;
    },
    get ROW_MONTH_STEP () {
        return ROW_MONTH_STEP;
    },
    get ROW_QUARTER_STEP () {
        return ROW_QUARTER_STEP;
    },
    get ROW_STEP () {
        return ROW_STEP;
    },
    get ROW_YEAR_STEP () {
        return ROW_YEAR_STEP;
    },
    get SHORT_DAY_NAMES () {
        return SHORT_DAY_NAMES;
    },
    get SHORT_MONTH_NAME () {
        return SHORT_MONTH_NAME;
    },
    get YEAR_RENDER_COUNT () {
        return YEAR_RENDER_COUNT;
    },
    get offsetMap () {
        return offsetMap;
    },
    get quarterDates () {
        return quarterDates;
    }
});
const LOCALES = {
    ru: 'ru-RU',
    en: 'en-US'
};
const MONTHS = Array.from({
    length: 12
}, (_, i)=>i + 1);
const WEEKS = Array.from({
    length: 7
}, (_, i)=>i + 1);
const callbackDayFormatter = (locale, options)=>{
    const dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
    return (index)=>{
        // INFO: Start for monday
        const day = new Date(Date.UTC(2024, 0, index));
        const [first, ...rest] = dateFormatter.format(day);
        return first.toUpperCase() + rest.join('');
    };
};
const callbackMonthFormatter = (locale, options)=>{
    const dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
    return (month)=>{
        const data = new Date(Date.UTC(2024, month - 1));
        const [first, ...rest] = dateFormatter.format(data);
        return first.toUpperCase() + rest.join('').replace('.', '');
    };
};
const ROW_STEP = 6;
const ROW_MONTH_STEP = 4;
const ROW_YEAR_STEP = 4;
const ROW_QUARTER_STEP = 2;
const YEAR_RENDER_COUNT = 12;
const offsetMap = {
    Days: ROW_STEP,
    Months: ROW_MONTH_STEP,
    Years: ROW_YEAR_STEP,
    Quarters: ROW_QUARTER_STEP
};
const QUARTER_NAMES = [
    'Q1',
    'Q2',
    'Q3',
    'Q4'
];
const quarterDates = {
    Q1: {
        monthIndex: 0,
        day: 1
    },
    Q2: {
        monthIndex: 3,
        day: 1
    },
    Q3: {
        monthIndex: 6,
        day: 1
    },
    Q4: {
        monthIndex: 9,
        day: 1
    }
};
const SHORT_DAY_NAMES = {
    ru: WEEKS.map(callbackDayFormatter('ru', {
        weekday: 'short'
    })),
    en: WEEKS.map(callbackDayFormatter('en', {
        weekday: 'short'
    }))
};
const FULL_DAY_NAMES = {
    ru: {
        Пн: 'Понедельник',
        Вт: 'Вторник',
        Ср: 'Среда',
        Чт: 'Четверг',
        Пт: 'Пятница',
        Сб: 'Суббота',
        Вс: 'Воскресенье'
    },
    en: {
        Mon: 'Monday',
        Tue: 'Tuesday',
        Wed: 'Wednesday',
        Thu: 'Thursday',
        Fri: 'Friday',
        Sat: 'Saturday',
        Sun: 'Sunday'
    }
};
const SHORT_MONTH_NAME = {
    ru: MONTHS.map(callbackMonthFormatter('ru', {
        month: 'short'
    })),
    en: MONTHS.map(callbackMonthFormatter('en', {
        month: 'short'
    }))
};
const MONTH_NAMES = {
    ru: MONTHS.map(callbackMonthFormatter('ru', {
        month: 'long'
    })),
    en: MONTHS.map(callbackMonthFormatter('en', {
        month: 'long'
    }))
};
const 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'
    }
};
