import { n as SelectionUnit, t as SelectionMode } from "./selection-types-DhmKlruR.cjs"; import { t as CalendarTime } from "./calendar-time-BhGHLeqY.cjs"; import { r as CalendarConfig } from "./ui-context-DB9n2b8E.cjs"; import { r as DateRuleEngine, t as DateRuleConfig } from "./date-rule-engine-C_YwRB2v.cjs"; //#region src/react/config.d.ts /** * User-friendly options for {@link createCalendarConfig} — the ergonomic layer * over the compiled `CalendarConfig` the `Calendar` root consumes. Dates are JS * `Date` (the public boundary), rule sets are plain {@link DateRuleConfig} * objects (or precompiled engines), and everything defaults sensibly. */ type CalendarConfigOptions = { /** Selection mode. Default `"single"`. */ mode?: SelectionMode; /** Selection unit. Default `"day"`. */ unit?: SelectionUnit; /** BCP-47 locale for month/weekday names and digits. */ locale?: string; /** * Week start (0 = Sunday .. 6 = Saturday). Omit to derive from `locale` * (`Intl.Locale.getWeekInfo`), falling back to Monday. */ firstDayOfWeek?: number; /** Earliest / latest selectable day (inclusive). */ min?: Date; max?: Date; /** Days that cannot be selected (rules or a `createDisabled` engine). */ disabled?: DateRuleConfig | DateRuleEngine; /** Days excluded from emitted spans (business-day cuts). */ exclude?: DateRuleConfig | DateRuleEngine; /** What to do when a span endpoint is excluded. Default `"snap-inward"`. */ excludedEndpointPolicy?: "snap-inward" | "reject"; readOnly?: boolean; /** Clicking the selected day deselects it. Default `true`. */ deselectOnReclick?: boolean; /** Selected values carry a time of day. */ withTime?: boolean; /** 12-hour clock with AM/PM. */ hour12?: boolean; /** Localized AM/PM labels for `hour12` surfaces. */ ampmLabels?: { am: string; pm: string; }; /** Time applied to a freshly picked day (when `withTime`). */ defaultTime?: Partial; /** Inclusive selectable time-of-day window (when `withTime`). */ minTime?: Partial; maxTime?: Partial; /** Weekend columns for highlighting (0 = Sunday .. 6). Default Sat/Sun. */ weekendDays?: readonly number[]; /** Min/max span length in `unit`s (range modes). */ minSpan?: number; maxSpan?: number; /** Cap on point selections (multiple mode). */ maxDates?: number; /** Cap on spans (multi-range mode). */ maxRanges?: number; /** IANA time zone for "today" resolution. */ timeZone?: string; }; /** * Build a compiled {@link CalendarConfig} from friendly options. This is THE * way to hand a config to ``: * * ```tsx * const config = createCalendarConfig({ mode: "range", locale: "de-DE", * min: new Date(2026, 0, 1), disabled: { weekends: true } }); * * ``` */ declare function createCalendarConfig(options?: CalendarConfigOptions): CalendarConfig; //#endregion export { createCalendarConfig as n, type CalendarConfigOptions as t };