"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatePickerWeekRow = void 0;
const react_1 = __importDefault(require("react"));
const responsive_1 = require("../../../primitives/responsive");
const typography_1 = require("../../../typography");
const utils_external_1 = require("../../../utils-external");
const Date_locale_1 = require("../../Date.locale");
const DatePicker_WeekNumber_1 = require("./DatePicker.WeekNumber");
const DatePickerWeekRow = ({ onWeekNumberClick, weeks, }) => {
    const translate = (0, Date_locale_1.useDateTranslationContext)().translate;
    const labelId = (0, utils_external_1.useId)();
    if (!onWeekNumberClick) {
        return null;
    }
    return (react_1.default.createElement(responsive_1.Show, { below: "sm", asChild: true },
        react_1.default.createElement("table", { className: "rdp-table", role: "grid" },
            react_1.default.createElement("tbody", { className: "rdp-tbody" },
                react_1.default.createElement("tr", { className: "rdp-row aksel-date__week-row" },
                    react_1.default.createElement(typography_1.Detail, { as: "th", weight: "semibold", className: "rdp-cell aksel-date__week-cell" },
                        react_1.default.createElement("span", { className: "aksel-date__week-wrapper", id: labelId }, translate("week"))), weeks === null || weeks === void 0 ? void 0 :
                    weeks.map((week) => (react_1.default.createElement(DatePicker_WeekNumber_1.DatePickerWeekNumber, { key: week.weekNumber, week: week, onWeekNumberClick: onWeekNumberClick, showOnDesktop: false, className: "aksel-date__week-wrapper" }))))))));
};
exports.DatePickerWeekRow = DatePickerWeekRow;
//# sourceMappingURL=DatePicker.WeekRow.js.map