"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Head = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const Typography_1 = require("../../../Typography");
const styles_1 = require("./styles");
const WORKDAYS = ['ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ'];
const MONDAY_FIRST_WEEKDAYS = [...WORKDAYS, 'СБ', 'ВС'];
const SUNDAY_FIRST_WEEKDAYS = ['ВС', ...WORKDAYS, 'СБ'];
const MONDAY_FIRST_HOLIDAYS = new Set([5, 6]);
const SUNDAY_FIRST_HOLIDAYS = new Set([0, 6]);
exports.Head = (0, react_1.memo)(({ isMondayFirst = true, hasHolidays, className, }) => {
    const holidaysSet = isMondayFirst
        ? MONDAY_FIRST_HOLIDAYS
        : SUNDAY_FIRST_HOLIDAYS;
    return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { role: "rowheader", className: className, children: (isMondayFirst ? MONDAY_FIRST_WEEKDAYS : SUNDAY_FIRST_WEEKDAYS).map((weekday, index) => ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", color: hasHolidays && holidaysSet.has(index) ? 'error' : 'grey', colorIntensity: hasHolidays && holidaysSet.has(index) ? '900' : '600', role: "cell", children: weekday }, weekday))) }));
});
exports.Head.displayName = 'DateDayPickerGridHead';
