"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CalendarBody = void 0;
var _react = _interopRequireDefault(require("react"));
var _CalendarDayOutOfMonth = require("./CalendarDayOutOfMonth");
var _CalendarDayInMonth = require("./CalendarDayInMonth");
var _CalendarWeekNum = require("./CalendarWeekNum");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var CalendarBody = _ref => {
  var {
    calendarDays,
    showWeeks,
    onDayClick,
    cellPadding,
    roundedCorners
  } = _ref;
  if (!calendarDays) {
    return /*#__PURE__*/_react.default.createElement("tbody", null);
  }
  return /*#__PURE__*/_react.default.createElement("tbody", null, calendarDays.map((week, weekIndex) => /*#__PURE__*/_react.default.createElement("tr", {
    key: "rdp_calendar_week_".concat(weekIndex)
  }, showWeeks ? /*#__PURE__*/_react.default.createElement(_CalendarWeekNum.CalendarWeekNum, {
    key: "rdp_calendar_week_".concat(weekIndex, "_weeknum"),
    weekNum: week.weekNum,
    cellPadding: cellPadding
  }) : null, week.weekDays.map((weekDay, weekDayIndex) => weekDay.inMonth ? /*#__PURE__*/_react.default.createElement(_CalendarDayInMonth.CalendarDayInMonth, {
    key: "rdp_calendar_week_".concat(weekIndex, "_day_").concat(weekDayIndex),
    day: weekDay.day,
    mode: weekDay.mode,
    onDayClick: onDayClick,
    cellPadding: cellPadding,
    roundedCorners: roundedCorners
  }) : /*#__PURE__*/_react.default.createElement(_CalendarDayOutOfMonth.CalendarDayOutOfMonth, {
    key: "rdp_calendar_week_".concat(weekIndex, "_day_").concat(weekDayIndex)
  })))));
};
exports.CalendarBody = CalendarBody;