import { type EditorRecurrence, type RecurrenceFrequency, type RecurrenceWeekday } from './calendar.model'; export type CustomRecurrenceUnit = 'day' | 'week' | 'month' | 'year'; /** How a monthly Custom rule picks its day, read from the first date. */ export type CustomMonthlyBy = 'monthDay' | 'nthWeekday' | 'lastWeekday'; export interface CustomRecurrenceValue { /** Every N units; `null` while the field is empty (saved as 1). */ interval: number | null; unit: CustomRecurrenceUnit; /** Extra weekdays of a weekly rule. The first appointment's own day is * always added on top, so it is never stored here as a choice. */ weekdays: readonly RecurrenceWeekday[]; monthlyBy: CustomMonthlyBy; } export declare function defaultCustomRecurrence(): CustomRecurrenceValue; /** True when a saved rule needs the Custom fields to show it. */ export declare function isCustomRule(rule: EditorRecurrence): boolean; /** A saved rule back as Custom field values (the reverse of * `customRecurrenceRule`). Quarterly and six-monthly read as months. */ export declare function customRecurrenceFromRule(rule: EditorRecurrence): CustomRecurrenceValue; /** The rule fields a Custom value saves as, for the first date `start`. */ export declare function customRecurrenceRule(value: CustomRecurrenceValue, start: Date): Pick; /** "Every 3 weeks · Monday and Thursday · 5 appointments". */ export declare function useRecurrenceSummary({ frequency, custom, start, ends, count, untilDate, locale, }: { frequency: RecurrenceFrequency | 'custom'; custom: CustomRecurrenceValue; start: Date; ends: 'count' | 'until'; count: number | null; untilDate?: Date; locale: string; }): string; /** * The Custom rule's fields, as cells of the editor's form grid: Repeat * every N, the period, then the weekday chips (weekly) or the monthly * choice (monthly). Controlled; `start` is the first appointment's date, * from which the locked weekday and the monthly choices are read. */ export declare function CustomRecurrenceFields({ value, onChange, start, locale, fieldClassName, wideClassName, }: { value: CustomRecurrenceValue; onChange: (next: CustomRecurrenceValue) => void; start: Date; locale: string; /** The grid cell class of the "Repeat every" cell. It lays its two * fields out itself, so pass a class that sets no grid of its own. */ fieldClassName: string; /** The grid cell class of a full-width row. */ wideClassName: string; }): import("react/jsx-runtime").JSX.Element; /** The rule in one line, under the recurrence fields. */ export declare function RecurrenceSummaryLine({ summary, className, }: { summary: string; className: string; }): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=calendar-custom-recurrence.d.ts.map