"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

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

var _bem = require("@zarm-design/bem");

var _configProvider = require("../config-provider");

var Week = /*#__PURE__*/(0, _react.forwardRef)(function (_props, ref) {
  var _globalLocal$Calendar;

  var _useContext = (0, _react.useContext)(_configProvider.ConfigContext),
      prefixCls = _useContext.prefixCls,
      globalLocal = _useContext.locale;

  var weeks = globalLocal === null || globalLocal === void 0 ? void 0 : (_globalLocal$Calendar = globalLocal.Calendar) === null || _globalLocal$Calendar === void 0 ? void 0 : _globalLocal$Calendar.weeks;
  var bem = (0, _bem.createBEM)('calendar', {
    prefixCls: prefixCls
  });
  var content = weeks === null || weeks === void 0 ? void 0 : weeks.map(function (week) {
    return /*#__PURE__*/_react.default.createElement("li", {
      key: week
    }, week);
  });
  return /*#__PURE__*/_react.default.createElement("ul", {
    className: bem('week'),
    ref: ref
  }, content);
});

var _default = /*#__PURE__*/_react.default.memo(Week);

exports.default = _default;