import { FocusEventHandler, InputHTMLAttributes, ReactNode } from 'react';
import { DateRange as ReactDayPickerDateRange } from 'react-day-picker';
import { RioglyphIconType } from '../rioglyph/RioglyphIconType';
export type DateRange = ReactDayPickerDateRange;
export type Modifiers = Record<string, boolean>;
export type DayPickerMode = 'single' | 'multiple' | 'range';
export type DayPickerSelection = Date | Date[] | DateRange | undefined;
export type DayPickerRangeSelectionVariant = 'default' | 'week' | 'month' | 'rolling';
export type DayPickerDateBefore = {
    before: Date;
};
export type DayPickerDateAfter = {
    after: Date;
};
export type DayPickerDateInterval = {
    before: Date;
    after: Date;
};
export type DayPickerDayOfWeek = {
    dayOfWeek: number | number[];
};
export type DayPickerDateMatcher = boolean | Date | Date[] | DateRange | DayPickerDateBefore | DayPickerDateAfter | DayPickerDateInterval | DayPickerDayOfWeek | ((date: Date) => boolean);
export type DayPickerDisabledDays = DayPickerDateMatcher | DayPickerDateMatcher[];
export type DayPickerHiddenDays = DayPickerDateMatcher | DayPickerDateMatcher[];
export type DayPickerCustomModifiers = Record<string, DayPickerDateMatcher | DayPickerDateMatcher[]>;
type CommonCalendarProps = {
    /**
     * Locale used for calendar labels and default input formatting.
     *
     * @default 'en-GB'
     */
    locale?: string;
    /**
     * Optional size variant for the rendered calendar density.
     *
     * Changes the size and spacing of the individual day cells instead of the outer wrapper.
     *
     * @default 'md'
     */
    size?: 'sm' | 'md' | 'lg';
    /**
     * Additional classes for the calendar root element.
     */
    className?: string;
    /**
     * Number of visible calendar months.
     *
     * @default 1
     */
    numberOfMonths?: 1 | 2;
    /**
     * Shows the days from adjacent months inside the current month grid.
     *
     * @default true
     */
    showOutsideDays?: boolean;
    /**
     * Keeps the calendar height stable by always rendering full weeks.
     *
     * @default true
     */
    fixedWeeks?: boolean;
    /**
     * Shows the calendar week number column.
     *
     * @default false
     */
    showWeekNumber?: boolean;
    /**
     * Overrides the first day of the week.
     *
     * `0` is Sunday, `1` is Monday, up to `6` for Saturday.
     */
    weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
    /**
     * Initial month shown when the calendar is first rendered.
     */
    defaultMonth?: Date;
    /**
     * Controlled currently visible month.
     */
    month?: Date;
    /**
     * Called when the visible month changes.
     */
    onMonthChange?: (month: Date) => void;
    /**
     * Lower month boundary for month navigation.
     */
    startMonth?: Date;
    /**
     * Upper month boundary for month navigation.
     */
    endMonth?: Date;
    /**
     * Days that cannot be selected.
     */
    disabledDays?: DayPickerDisabledDays;
    /**
     * Days that should not be rendered in the calendar grid.
     */
    hiddenDays?: DayPickerHiddenDays;
    /**
     * Custom day modifiers forwarded to the underlying calendar.
     */
    modifiers?: DayPickerCustomModifiers;
    /**
     * Additional CSS classes attached to custom modifiers.
     */
    modifiersClassNames?: Record<string, string>;
    /**
     * Renders optional custom content inside a day cell.
     *
     * Useful for icons, dots, tooltips or other domain-specific markers.
     */
    renderDayContent?: (date: Date, modifiers: Modifiers) => ReactNode;
};
export type SingleDayPickerCalendarProps = CommonCalendarProps & {
    /**
     * Enables single-date selection.
     *
     * @default 'single'
     */
    mode?: 'single';
    /**
     * Controlled single selected date.
     */
    value?: Date;
    /**
     * Initial single selected date for uncontrolled usage.
     */
    defaultValue?: Date;
    /**
     * Called when the selected date changes.
     */
    onChange?: (value: Date | undefined, modifiers: Modifiers) => void;
};
export type MultipleDayPickerCalendarProps = CommonCalendarProps & {
    /**
     * Enables multiple independent date selection.
     */
    mode: 'multiple';
    /**
     * Controlled list of selected dates.
     */
    value?: Date[];
    /**
     * Initial selected dates for uncontrolled usage.
     */
    defaultValue?: Date[];
    /**
     * Called when the selected dates change.
     */
    onChange?: (value: Date[] | undefined, modifiers: Modifiers) => void;
};
export type RangeDayPickerCalendarProps = CommonCalendarProps & {
    /**
     * Enables date-range selection.
     */
    mode: 'range';
    /**
     * Controlled selected date range.
     */
    value?: DateRange;
    /**
     * Initial selected date range for uncontrolled usage.
     */
    defaultValue?: DateRange;
    /**
     * Called when the selected range changes.
     */
    onChange?: (value: DateRange | undefined, modifiers: Modifiers) => void;
    /**
     * Selects how a range is created when clicking a day.
     *
     * `default` uses the built-in range behavior.
     * `week` selects the whole week of the clicked day.
     * `month` selects the whole month of the clicked day.
     * `rolling` selects a fixed-length range starting at the clicked day.
     *
     * @default 'default'
     */
    selectionVariant?: 'default' | 'week' | 'month' | 'rolling';
    /**
     * Fixed number of days used when `selectionVariant='rolling'`.
     *
     * @default 7
     */
    rollingDays?: number;
};
export type DayPickerCalendarProps = SingleDayPickerCalendarProps | MultipleDayPickerCalendarProps | RangeDayPickerCalendarProps;
export type DayPickerSlotRenderProps<TValue> = {
    /**
     * Currently committed value of the picker.
     */
    value: TValue | undefined;
    /**
     * Current draft value while the dropdown is open.
     *
     * In deferred mode, this can differ from `value` until `apply()` is called.
     */
    draftValue: TValue | undefined;
    /**
     * Updates the current draft value from custom slot content.
     */
    setDraftValue: (value: TValue | undefined) => void;
    /**
     * Commits the current draft value and closes the dropdown.
     */
    apply: () => void;
    /**
     * Clears the current selection.
     */
    clear: () => void;
    /**
     * Closes the dropdown without necessarily committing the current draft value.
     */
    close: () => void;
    /**
     * Active selection mode of the picker.
     */
    mode: DayPickerMode;
    /**
     * Active locale used for formatting and calendar labels.
     */
    locale: string;
};
export type DayPickerTriggerRenderProps<TValue> = DayPickerSlotRenderProps<TValue> & {
    /**
     * Optional id forwarded from the DayPicker props.
     */
    id?: string;
    /**
     * Optional form field name forwarded from the DayPicker props.
     */
    name?: string;
    /**
     * String currently shown by the default trigger input.
     */
    displayValue: string;
    /**
     * Whether the dropdown is currently open.
     */
    isOpen: boolean;
    /**
     * Opens the dropdown.
     */
    open: () => void;
    /**
     * Toggles the dropdown open state.
     */
    toggle: () => void;
};
type CommonDayPickerProps = Omit<CommonCalendarProps, 'size'> & {
    /**
     * Optional id forwarded to the default input trigger.
     */
    id?: string;
    /**
     * Optional form field name forwarded to the default input trigger.
     */
    name?: string;
    /**
     * Placeholder text shown in the default input trigger.
     */
    placeholder?: string;
    /**
     * Rioglyph icon shown in the default input trigger addon.
     *
     * @default 'rioglyph-calendar'
     */
    iconName?: RioglyphIconType;
    /**
     * Custom format string (e.g., 'yyyy-MM-dd') to override locale-based formatting.
     * If omitted, locale-based display is used for the input.
     */
    dateFormat?: string;
    /**
     * Called when the internal input loses focus.
     */
    onBlur?: FocusEventHandler<HTMLInputElement>;
    /**
     * Additional props forwarded to the default input element.
     *
     * Useful for attributes like `readOnly`, `disabled`, `required`, `autoFocus`, or custom ARIA labels.
     */
    inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'children' | 'value' | 'defaultValue' | 'onChange' | 'size'>;
    /**
     * Shows the built-in error styling and help block below the input.
     */
    errorMessage?: string | ReactNode;
    /**
     * Shows the built-in warning styling and help block below the input.
     */
    warningMessage?: string | ReactNode;
    /**
     * Controls white-space handling inside the built-in help block.
     *
     * @default 'normal'
     */
    messageWhiteSpace?: 'normal' | 'nowrap' | 'pre-line';
    /**
     * Additional classes for the text input element.
     */
    inputClassName?: string;
    /**
     * Additional classes for the dropdown container.
     */
    dropdownClassName?: string;
    /**
     * Additional classes for the left sidebar container.
     */
    leftSidebarClassName?: string;
    /**
     * Additional classes for the right sidebar container.
     */
    rightSidebarClassName?: string;
    /**
     * Additional classes for the footer container.
     */
    footerClassName?: string;
    /**
     * Renders the dropdown into a dedicated react portal.
     *
     * @default false
     */
    usePortal?: boolean;
    /**
     * Aligns the dropdown to the right edge of the input.
     *
     * @default false
     */
    alignRight?: boolean;
    /**
     * Shows a clear button inside the input.
     *
     * @default false
     */
    isClearable?: boolean;
    /**
     * Closes the dropdown after selecting a complete value.
     *
     * Range mode closes only after both dates are selected.
     *
     * @default true for `selectionBehavior='immediate'`, otherwise false
     */
    closeOnSelect?: boolean;
    /**
     * Closes the dropdown when clicking outside of the trigger and dropdown.
     *
     * @default true
     */
    closeOnOutsideClick?: boolean;
    /**
     * Defines whether the value is committed immediately or only when applied explicitly.
     *
     * @default 'immediate'
     */
    selectionBehavior?: 'immediate' | 'deferred';
};
/**
 * Props for a `DayPicker` with single-date selection.
 */
export type SingleDayPickerProps = CommonDayPickerProps & {
    /**
     * Enables single-date selection.
     *
     * @default 'single'
     */
    mode?: 'single';
    /**
     * Controlled single selected date.
     */
    value?: Date;
    /**
     * Initial single selected date for uncontrolled usage.
     */
    defaultValue?: Date;
    /**
     * Called when the selected date changes.
     */
    onChange?: (value: Date | undefined, modifiers: Modifiers) => void;
    /**
     * Called whenever the user changes the raw input value.
     * Useful for custom validation and form-library integration.
     */
    onInputChange?: (rawValue: string, parsedDate: Date | undefined, isValid: boolean) => void;
    /**
     * Custom parser for manual single-date input.
     * Overrides the built-in locale/dateFormat parsing.
     */
    parseInput?: (rawValue: string, locale: string) => Date | undefined;
    /**
     * Custom renderer for the value shown in the input.
     */
    renderValue?: (value: Date | undefined, locale: string) => string;
    /**
     * Replaces the default input trigger with custom trigger content.
     */
    trigger?: ReactNode | ((props: DayPickerTriggerRenderProps<Date>) => ReactNode);
    /**
     * Optional content rendered on the left side of the dropdown.
     */
    leftSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<Date>) => ReactNode);
    /**
     * Optional content rendered on the right side of the dropdown.
     */
    rightSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<Date>) => ReactNode);
    /**
     * Optional content rendered below the calendar inside the dropdown.
     */
    footer?: ReactNode | ((props: DayPickerSlotRenderProps<Date>) => ReactNode);
};
/**
 * Props for a `DayPicker` with multiple independent dates.
 */
export type MultipleDayPickerProps = CommonDayPickerProps & {
    /**
     * Enables multiple independent date selection.
     */
    mode: 'multiple';
    /**
     * Controlled list of selected dates.
     */
    value?: Date[];
    /**
     * Initial selected dates for uncontrolled usage.
     */
    defaultValue?: Date[];
    /**
     * Called when the selected dates change.
     */
    onChange?: (value: Date[] | undefined, modifiers: Modifiers) => void;
    /**
     * Custom renderer for the value shown in the input.
     */
    renderValue?: (value: Date[] | undefined, locale: string) => string;
    /**
     * Replaces the default input trigger with custom trigger content.
     */
    trigger?: ReactNode | ((props: DayPickerTriggerRenderProps<Date[]>) => ReactNode);
    /**
     * Optional content rendered on the left side of the dropdown.
     */
    leftSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<Date[]>) => ReactNode);
    /**
     * Optional content rendered on the right side of the dropdown.
     */
    rightSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<Date[]>) => ReactNode);
    /**
     * Optional content rendered below the calendar inside the dropdown.
     */
    footer?: ReactNode | ((props: DayPickerSlotRenderProps<Date[]>) => ReactNode);
};
/**
 * Props for a `DayPicker` with date-range selection.
 */
export type RangeDayPickerProps = CommonDayPickerProps & {
    /**
     * Enables date-range selection.
     */
    mode: 'range';
    /**
     * Controlled selected date range.
     */
    value?: DateRange;
    /**
     * Initial selected date range for uncontrolled usage.
     */
    defaultValue?: DateRange;
    /**
     * Called when the selected range changes.
     */
    onChange?: (value: DateRange | undefined, modifiers: Modifiers) => void;
    /**
     * Custom renderer for the value shown in the input.
     */
    renderValue?: (value: DateRange | undefined, locale: string) => string;
    /**
     * Selects how a range is created when clicking a day.
     *
     * `default` uses the built-in range behavior.
     * `week` selects the whole week of the clicked day.
     * `month` selects the whole month of the clicked day.
     * `rolling` selects a fixed-length range starting at the clicked day.
     *
     * @default 'default'
     */
    selectionVariant?: 'default' | 'week' | 'month' | 'rolling';
    /**
     * Fixed number of days used when `selectionVariant='rolling'`.
     *
     * @default 7
     */
    rollingDays?: number;
    /**
     * Replaces the default input trigger with custom trigger content.
     */
    trigger?: ReactNode | ((props: DayPickerTriggerRenderProps<DateRange>) => ReactNode);
    /**
     * Optional content rendered on the left side of the dropdown.
     */
    leftSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<DateRange>) => ReactNode);
    /**
     * Optional content rendered on the right side of the dropdown.
     */
    rightSidebar?: ReactNode | ((props: DayPickerSlotRenderProps<DateRange>) => ReactNode);
    /**
     * Optional content rendered below the calendar inside the dropdown.
     */
    footer?: ReactNode | ((props: DayPickerSlotRenderProps<DateRange>) => ReactNode);
};
export type DayPickerProps = SingleDayPickerProps | MultipleDayPickerProps | RangeDayPickerProps;
export declare const isSingleDayPickerProps: (props: DayPickerProps | DayPickerCalendarProps) => props is SingleDayPickerProps | SingleDayPickerCalendarProps;
export declare const isMultipleDayPickerProps: (props: DayPickerProps | DayPickerCalendarProps) => props is MultipleDayPickerProps | MultipleDayPickerCalendarProps;
export declare const isRangeDayPickerProps: (props: DayPickerProps | DayPickerCalendarProps) => props is RangeDayPickerProps | RangeDayPickerCalendarProps;
export {};
