"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _getLocale = require("../../../../../utils/getLocale");

var _utils = require("../../../utils");

var _dateRows = _interopRequireDefault(require("./date-rows"));

require("./index.css");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var getWeekDayData = function getWeekDayData() {
  return [(0, _getLocale.getLocale)('Mod_Sun'), (0, _getLocale.getLocale)('Mod_Mon'), (0, _getLocale.getLocale)('Mod_Tues'), (0, _getLocale.getLocale)('Mod_Wed'), (0, _getLocale.getLocale)('Mod_Thur'), (0, _getLocale.getLocale)('Mod_Fri'), (0, _getLocale.getLocale)('Mod_Sat')];
};

var DatePanelBody = function DatePanelBody(props) {
  var enableScrollHandler = props.enableScrollHandler,
      mergeDate = props.mergeDate,
      onSelect = props.onSelect,
      setEnableScrollHandler = props.setEnableScrollHandler,
      setMergeDate = props.setMergeDate,
      _props$weekStartDay = props.weekStartDay,
      weekStartDay = _props$weekStartDay === void 0 ? 'SUNDAY' : _props$weekStartDay;
  var weekStartDaySun = weekStartDay === 'SUNDAY';
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])(_utils.PickerBodyClass)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(_utils.PickerBodyClass, "__calendar-header"))
  }, weekStartDaySun && /*#__PURE__*/_react["default"].createElement("div", {
    className: _utils.PickerCellClass
  }, (0, _getLocale.getLocale)('Mod_Sun')), getWeekDayData().slice(1).map(function (day) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: _utils.PickerCellClass,
      key: day
    }, day);
  }), !weekStartDaySun && /*#__PURE__*/_react["default"].createElement("div", {
    className: _utils.PickerCellClass
  }, (0, _getLocale.getLocale)('Mod_Sun'))), /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(_utils.PickerBodyClass, "__calendar"))
  }, /*#__PURE__*/_react["default"].createElement(_dateRows["default"], {
    enableScrollHandler: enableScrollHandler,
    mergeDate: mergeDate,
    onSelect: onSelect,
    setEnableScrollHandler: setEnableScrollHandler,
    setMergeDate: setMergeDate
  })));
};

var _default = DatePanelBody;
exports["default"] = _default;