import type { SchedulerState, SchedulerParameters, SchedulerChangeEventDetails } from '@mui/x-scheduler-internals/internals'; import type { EventTimelinePremiumPreset } from "../models/preset.js"; import type { EventTimelinePremiumPreferences } from "../models/preferences.js"; import type { SchedulerDependenciesParameters, SchedulerDependenciesState } from "../models/dependency.js"; export interface EventTimelinePremiumState extends SchedulerState, SchedulerDependenciesState { /** * 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; } /** * Parameters accepted by the timeline store, including the dependencies parameters * that are not publicly exposed yet. * `dependencies` / `onDependenciesChange` move to `EventTimelinePremiumParameters` * when the dependencies feature becomes public. * @internal */ export interface EventTimelinePremiumStoreParameters extends EventTimelinePremiumParameters, SchedulerDependenciesParameters {}