import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; import { SlotComponentProps } from '@mui/utils/types'; import { PickersActionBar, PickersActionBarProps } from "../PickersActionBar/index.js"; import { BaseToolbarProps, ExportedBaseToolbarProps } from "../internals/models/props/toolbar.js"; import { ExportedBaseTabsProps } from "../internals/models/props/tabs.js"; import { PickersLayoutClasses } from "./pickersLayoutClasses.js"; import { PickersShortcutsProps } from "../PickersShortcuts/index.js"; import { ExportedPickersShortcutProps, PickersShortcuts } from "../PickersShortcuts/PickersShortcuts.js"; import { PickerOwnerState } from "../models/index.js"; import { PickerValidValue } from "../internals/models/index.js"; export interface ExportedPickersLayoutSlots { /** * Custom component for the action bar, it is placed below the Picker views. * @default PickersActionBar */ actionBar?: React.ElementType; /** * Custom component for the shortcuts. * @default PickersShortcuts */ shortcuts?: React.JSXElementConstructor>; /** * Custom component for wrapping the layout. * It wraps the toolbar, views, action bar, and shortcuts. */ layout?: React.JSXElementConstructor & React.RefAttributes>; } export interface PickerLayoutOwnerState extends PickerOwnerState { /** * The direction of the layout. * Is equal to "ltr" when the layout is in left-to-right direction. * Is equal to "rtl" when the layout is in right-to-left direction. */ layoutDirection: 'ltr' | 'rtl'; } export interface ExportedPickersLayoutSlotProps { /** * Props passed down to the action bar component. */ actionBar?: SlotComponentProps; /** * Props passed down to the shortcuts component. */ shortcuts?: SlotComponentProps; /** * Props passed down to the layoutRoot component. */ layout?: Partial>; } export interface PickersLayoutSlots extends ExportedPickersLayoutSlots { /** * Tabs enabling toggling between views. */ tabs?: React.ElementType<{}>; /** * Custom component for the toolbar. * It is placed above the Picker views. */ toolbar?: React.JSXElementConstructor; } export interface PickersLayoutSlotProps extends ExportedPickersLayoutSlotProps { /** * Props passed down to the tabs component. */ tabs?: ExportedBaseTabsProps; /** * Props passed down to the toolbar component. */ toolbar?: ExportedBaseToolbarProps; } export interface PickersLayoutProps { className?: string; children?: React.ReactNode; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps; /** * Override or extend the styles applied to the component. */ classes?: Partial; /** * Overridable component slots. * @default {} */ slots?: PickersLayoutSlots; /** * The props used for each component slot. * @default {} */ slotProps?: PickersLayoutSlotProps; } export interface SubComponents { toolbar: React.ReactElement | null; content: React.ReactNode; tabs: React.ReactElement | null; actionBar: React.ReactElement; shortcuts: React.ReactElement> | null; }