import * as React from 'react'; import { OverrideProps } from '@mui/types'; import { SlotComponentProps } from '@mui/utils'; import { ViewStyle } from '../types'; import { PickerDateType } from '../models/pickers'; import { BaseDateValidationProps, MonthValidationProps } from '../models/validation'; import { FormProps } from '../models/formProps'; import { SlotCommonProps } from '../../types/slot'; /** * Props exported by MonthCalendar for use by parent components */ export interface ExportedMonthCalendarProps { } export interface MonthCalendarComponentProps extends ExportedMonthCalendarProps, MonthValidationProps, Required, FormProps { /** * The currently selected date. */ date: PickerDateType; /** * The year to display in the calendar. */ viewDate: PickerDateType; /** * Callback for when a month is selected. */ onChange: (month: number) => void; /** * Optional callback for when the year changes. */ onYearChange?: (year: number) => void; /** * Months rendered per row. * @default 3 */ monthsPerRow?: 3 | 4; /** * The style of the month view. * @default 'grid' */ viewStyle?: ViewStyle; } export interface MonthCalendarSlots { /** * The component used for the root element. * @default 'div' */ root?: React.ElementType; } export interface MonthCalendarSlotProps { root?: SlotComponentProps<'div', object, MonthCalendarOwnerState>; } export interface MonthCalendarTypeMap

{ props: P & MonthCalendarComponentProps & { /** * The slots for customizing the component appearance. */ slots?: MonthCalendarSlots; /** * The props used for each slot. */ slotProps?: MonthCalendarSlotProps; }; defaultComponent: D; } export type MonthCalendarProps = OverrideProps, D> & SlotCommonProps; export type MonthCalendarOwnerState = MonthCalendarProps;