import { Adapter } from '@mui/x-scheduler-internals/use-adapter'; import { SchedulerProcessedEventRecurrenceRule, RecurringEventUpdateScope, RecurringEventWeekDayCode, SchedulerEventUpdatedProperties, SchedulerProcessedEvent, TemporalSupportedObject } from '@mui/x-scheduler-internals/models'; import type { UpdateEventsParameters } from '@mui/x-scheduler-internals/internals'; export declare function updateRecurringEvent(adapter: Adapter, originalEvent: SchedulerProcessedEvent, occurrenceStart: TemporalSupportedObject, changes: SchedulerEventUpdatedProperties, scope: RecurringEventUpdateScope): UpdateEventsParameters; /** * Applies a "this and following" update to a recurring series by splitting it into: * - the original series truncated up to the day before the edited occurrence, and * - a new series starting at the edited occurrence with the requested changes. * @returns The updated list of events with the split applied. */ export declare function applyRecurringUpdateFollowing(adapter: Adapter, originalEvent: SchedulerProcessedEvent, occurrenceStart: TemporalSupportedObject, changes: SchedulerEventUpdatedProperties): UpdateEventsParameters; /** * Applies an "all events" update to a recurring series. * * Rules: * - If the edited occurrence is not the first, keeps the original DTSTART * and adjusts the RRULE pattern (e.g. weekday swap) so all past and future * events follow the new pattern. * - If the edited occurrence is the first of the series, updates DTSTART/DTEND directly. * - When only the time changes, merges the new time into the original date. * @returns The updated list of events. */ export declare function applyRecurringUpdateAll(adapter: Adapter, originalEvent: SchedulerProcessedEvent, occurrenceStart: TemporalSupportedObject, changes: SchedulerEventUpdatedProperties): UpdateEventsParameters; /** * Applies a "only-this" update to a recurring series by: * - creating a detached one-off event with the requested changes, and * - adding an EXDATE to the original event to exclude the occurrence from the series. * @returns The updated list of events. */ export declare function applyRecurringUpdateOnlyThis(adapter: Adapter, originalEvent: SchedulerProcessedEvent, occurrenceStart: TemporalSupportedObject, changes: SchedulerEventUpdatedProperties): UpdateEventsParameters; /** * Adjusts a recurring event's RRULE when applying an "all" update that changes the weekday. * * Rules: * - WEEKLY: realign BYDAY by swapping the weekday of the edited occurrence * with the weekday of the destination. * - MONTHLY: * - If BYMONTHDAY is used → set it to the new start date's day of month. * - If BYDAY (ordinal) is used → recompute the ordinal (e.g. 2TU → 3WE) based on the new start. * @returns The adjusted RRULE object, or the original rrule if no change is needed. */ export declare function adjustRRuleForAllMove(adapter: Adapter, rrule: SchedulerProcessedEventRecurrenceRule, occurrenceStart: TemporalSupportedObject, newStart: TemporalSupportedObject): SchedulerProcessedEventRecurrenceRule; /** * Decides the RRULE for the split (new) segment when editing "this and following". * * Rules: * - If user provided changes.rrule → use it as-is (preserve COUNT/UNTIL). * - If changes.rrule is explicitly undefined → non-recurring one-off. * - If changes.rrule is omitted → inherit pattern and recompute boundaries: * * WEEKLY: if `changes.start` is provided, realign BYDAY by swapping the weekday of the * edited occurrence with the weekday of the new start (dedupe if needed). * * MONTHLY: * - If BYMONTHDAY is present: set it to the day of `changes.start`. * - If BYDAY (ordinal) is present: recompute `{ord}{code}` using `computeMonthlyOrdinal` * and the weekday of `changes.start`. * * Boundaries: * - If original had COUNT: set COUNT = remaining occurrences from the split day. * - If original had UNTIL: keep the same UNTIL. */ export declare function decideSplitRRule(adapter: Adapter, originalRule: SchedulerProcessedEventRecurrenceRule, originalSeriesStart: TemporalSupportedObject, splitStart: TemporalSupportedObject, changes: Partial): SchedulerProcessedEventRecurrenceRule | undefined; /** * Realigns a WEEKLY BYDAY pattern when splitting “this and following”. * Swaps the weekday of the edited occurrence (oldRefDay) with the weekday of the new * series start (newStart), preserving the rest of the pattern and avoiding duplicates. * @returns {RecurringEventByDayValue[]} - The realigned BYDAY list (deduplicated). */ export declare function realignWeeklyByDay(adapter: Adapter, weekDayCodes: RecurringEventWeekDayCode[], oldRefDay: TemporalSupportedObject, newStart: TemporalSupportedObject): RecurringEventWeekDayCode[];