"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CalendarDayInMonth = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var CAL_DAY_CLASSNAME_BY_MODE = {
  'normal': '',
  'muted': 'text-muted',
  'selected': 'bg-primary',
  'current': 'text-primary'
};
var CalendarDayInMonth = _ref => {
  var {
    day,
    mode,
    onDayClick,
    cellPadding,
    roundedCorners
  } = _ref;
  var handleClick = ev => {
    if (mode != 'muted') {
      onDayClick(ev);
    }
  };
  return /*#__PURE__*/_react.default.createElement("td", {
    "data-day": day,
    onClick: handleClick,
    style: {
      cursor: mode == 'muted' ? 'default' : 'pointer',
      padding: cellPadding,
      borderRadius: roundedCorners ? '5px' : '0px'
    },
    className: CAL_DAY_CLASSNAME_BY_MODE[mode]
  }, day);
};
exports.CalendarDayInMonth = CalendarDayInMonth;