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, YearValidationProps } from '../models/validation'; import { FormProps } from '../models/formProps'; import { SlotCommonProps } from '../../types/slot'; /** * Props exported by YearCalendar for use by parent components */ export interface ExportedYearCalendarProps { } export interface YearCalendarComponentProps extends ExportedYearCalendarProps, YearValidationProps, Required, FormProps { /** * The currently selected date. */ date: PickerDateType; /** * The date to display in the calendar. */ viewDate: PickerDateType; /** * Callback for when a year is selected. */ onChange: (year: number) => void; /** * Callback for when the year range changes (typically for pagination). */ onYearRangeChange: (date: PickerDateType) => void; /** * The style of the year view. * @default 'grid' */ viewStyle?: ViewStyle; } export interface YearCalendarSlots { /** * The component used for the root element. * @default 'div' */ root?: React.ElementType; } export interface YearCalendarSlotProps { root?: SlotComponentProps<'div', object, YearCalendarOwnerState>; } export interface YearCalendarTypeMap

{ props: P & YearCalendarComponentProps & { /** * The slots for customizing the component appearance. */ slots?: YearCalendarSlots; /** * The props used for each slot. */ slotProps?: YearCalendarSlotProps; }; defaultComponent: D; } export type YearCalendarProps = OverrideProps, D> & SlotCommonProps; export type YearCalendarOwnerState = YearCalendarProps;