import { DateValue } from 'reka-ui';
import { Matcher } from 'reka-ui/date';
/**
 * Layout options for the calendar header.
 * Controls which dropdown selectors are shown for quick navigation.
 *
 * - `'month-and-year'` - Show dropdowns for both month and year
 * - `'month-only'` - Show dropdown for month only
 * - `'year-only'` - Show dropdown for year only
 */
export type UiCalendarLayout = 'month-and-year' | 'month-only' | 'year-only';
/**
 * Format options for weekday labels displayed in the calendar header.
 *
 * - `'narrow'` - Single letter (e.g., "M", "T", "W")
 * - `'short'` - Abbreviated (e.g., "Mon", "Tue", "Wed")
 * - `'long'` - Full name (e.g., "Monday", "Tuesday", "Wednesday")
 */
export type UiCalendarWeekdayFormat = 'narrow' | 'short' | 'long';
/**
 * Day of the week to start the calendar on.
 *
 * - `0` - Sunday
 * - `1` - Monday
 * - `2` - Tuesday
 * - `3` - Wednesday
 * - `4` - Thursday
 * - `5` - Friday
 * - `6` - Saturday
 */
export type UiCalendarWeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
/**
 * Reading direction for the calendar.
 */
export type UiCalendarDirection = 'ltr' | 'rtl';
/**
 * A date picker calendar for selecting single or multiple dates. Use for
 * booking forms, event scheduling, or any date selection needs.
 * @category Form Inputs
 * @useCases date selection, booking form, event picker, birthday input, schedule
 * @keywords calendar, date, picker, datepicker, schedule, booking, day, month
 * @related UiRangeCalendar, UiPopover
 */
export interface UiCalendarProps {
    /**
     * The controlled selected date value.
     * Use with v-model for two-way binding.
     * When `multiple` is true, this should be an array of DateValue.
     */
    modelValue?: DateValue | DateValue[];
    /**
     * The default selected date when first rendered.
     * Use when you don't need controlled state.
     */
    defaultValue?: DateValue;
    /**
     * The placeholder date used to determine which month/year to display.
     * Defaults to today's date if not provided.
     */
    placeholder?: DateValue;
    /**
     * The default placeholder date when first rendered.
     */
    defaultPlaceholder?: DateValue;
    /**
     * The minimum selectable date.
     * Dates before this will be disabled.
     */
    minValue?: DateValue;
    /**
     * The maximum selectable date.
     * Dates after this will be disabled.
     */
    maxValue?: DateValue;
    /**
     * Whether the calendar is disabled.
     * @default false
     */
    disabled?: boolean;
    /**
     * Whether the calendar is read-only.
     * Users can navigate but not select dates.
     * @default false
     */
    readonly?: boolean;
    /**
     * The locale to use for formatting dates and weekday names.
     * @default 'en'
     * @example 'de', 'fr', 'es'
     */
    locale?: string;
    /**
     * The day of the week to start on.
     * @default 0
     */
    weekStartsOn?: UiCalendarWeekStartsOn;
    /**
     * The number of months to display at once.
     * @default 1
     */
    numberOfMonths?: number;
    /**
     * Whether to navigate by page (all visible months) or by single month.
     * @default false
     */
    pagedNavigation?: boolean;
    /**
     * The format to use for weekday labels.
     * @default 'narrow'
     */
    weekdayFormat?: UiCalendarWeekdayFormat;
    /**
     * Whether to always show 6 weeks in the calendar.
     * Useful for consistent height.
     * @default false
     */
    fixedWeeks?: boolean;
    /**
     * Layout mode for the calendar header.
     * Controls dropdown selectors for quick month/year navigation.
     * When undefined, shows simple text heading.
     */
    layout?: UiCalendarLayout;
    /**
     * Custom year range for the year selector dropdown.
     * Only used when layout includes year selection.
     */
    yearRange?: DateValue[];
    /**
     * Whether to prevent the user from deselecting a date without selecting another date first.
     * @default false
     */
    preventDeselect?: boolean;
    /**
     * Whether multiple dates can be selected.
     * When true, modelValue should be an array.
     * @default false
     */
    multiple?: boolean;
    /**
     * The accessible label for the calendar.
     * Used for screen readers.
     */
    calendarLabel?: string;
    /**
     * If true, the calendar will focus the selected day, today, or the first day
     * of the month depending on what is visible when the calendar is mounted.
     * @default false
     */
    initialFocus?: boolean;
    /**
     * A function that returns whether or not a date is disabled.
     * Disabled dates cannot be selected.
     * @example (date) => date.dayOfWeek === 0 // Disable Sundays
     */
    isDateDisabled?: Matcher;
    /**
     * A function that returns whether or not a date is unavailable.
     * Unavailable dates are styled differently but may still be selectable.
     * @example (date) => isHoliday(date)
     */
    isDateUnavailable?: Matcher;
    /**
     * The reading direction of the calendar.
     * If omitted, inherits from ConfigProvider or assumes 'ltr'.
     */
    dir?: UiCalendarDirection;
    /**
     * A function that returns the next page of the calendar.
     * Receives the current placeholder as an argument.
     */
    nextPage?: (placeholder: DateValue) => DateValue;
    /**
     * A function that returns the previous page of the calendar.
     * Receives the current placeholder as an argument.
     */
    prevPage?: (placeholder: DateValue) => DateValue;
    /**
     * Whether to disable days outside the current view.
     * @default false
     */
    disableDaysOutsideCurrentView?: boolean;
}
/**
 * Emits for UiCalendar component.
 */
export interface UiCalendarEmits {
    /**
     * Emitted when the selected date changes.
     *
     * The payload is always a union type: `DateValue | DateValue[] | undefined`.
     * - `undefined` when the selection is cleared.
     * - `DateValue` for single selection when `multiple` is false or not set.
     * - `DateValue[]` when `multiple` is true.
     */
    (e: 'update:modelValue', value: DateValue | DateValue[] | undefined): void;
    /**
     * Emitted when the placeholder (displayed month/year) changes.
     */
    (e: 'update:placeholder', value: DateValue): void;
}
export type { DateValue, Matcher };
