import React from 'react';
import PropTypes from 'prop-types';
import Days from './MonthView/Days';
import Weekdays from './MonthView/Weekdays';
import WeekNumbers from './MonthView/WeekNumbers';
import { CALENDAR_TYPES, CALENDAR_TYPE_LOCALES } from './shared/const';
import { isCalendarType } from './shared/propTypes';
function getCalendarTypeFromLocale(locale) {
return (
Object.keys(CALENDAR_TYPE_LOCALES)
.find((calendarType) => CALENDAR_TYPE_LOCALES[calendarType].includes(locale))
|| CALENDAR_TYPES.ISO_8601
);
}
export default function MonthView(props) {
const {
activeStartDate,
locale,
onMouseLeave,
showFixedNumberOfWeeks,
} = props;
const {
calendarType = getCalendarTypeFromLocale(locale),
formatShortWeekday,
onClickWeekNumber,
showWeekNumbers,
...childProps
} = props;
function renderWeekdays() {
return (