import { SchedulerState, SchedulerParameters, SchedulerChangeEventDetails } from '@mui/x-scheduler-internals/internals'; import { EventTimelinePremiumPreset } from "../models/preset.js"; import { EventTimelinePremiumPreferences } from "../models/preferences.js"; export interface EventTimelinePremiumState extends SchedulerState { /** * The preset displayed in the timeline. */ preset: EventTimelinePremiumPreset; /** * The presets available in the timeline. */ presets: readonly EventTimelinePremiumPreset[]; /** * Preferences for the timeline. */ preferences: Partial; /** * `false` until the first parameters→state mapping has applied, then `true`. * Gates the lazy-loading plugin's first fetch so it doesn't run against the * constructor-only initial state. * @internal */ hasInitialized: boolean; } export interface EventTimelinePremiumParameters extends SchedulerParameters { /** * The preset currently displayed in the timeline. */ preset?: EventTimelinePremiumPreset; /** * The preset initially displayed in the timeline. * To render a controlled timeline, use the `preset` prop. * @default "dayAndHour" */ defaultPreset?: EventTimelinePremiumPreset; /** * The presets available in the timeline. * The order is canonical (from most-zoomed-in to most-zoomed-out) and enforced internally, * so a future zoom API (`zoomIn()` / `zoomOut()`) behaves consistently regardless of the order * in which the presets are provided. * @default ["dayAndHour", "dayAndMonth", "dayAndWeek", "monthAndYear", "year"] */ presets?: EventTimelinePremiumPreset[]; /** * Event handler called when the preset changes. */ onPresetChange?: (preset: EventTimelinePremiumPreset, eventDetails: SchedulerChangeEventDetails) => void; /** * The default preferences for the timeline. * To use controlled preferences, use the `preferences` prop. * @default { ampm: true } */ defaultPreferences?: Partial; /** * Preferences currently displayed in the timeline. */ preferences?: Partial; /** * Event handler called when the preferences change. */ onPreferencesChange?: (preferences: Partial, event: React.UIEvent | Event) => void; }