import { AccessibilityProps, KeyboardHandlerMap } from '../shared/index.js';

type DatePickerView = 'calendar' | 'time';
interface DatePickerProps {
    /** Selected date (controlled) */
    value?: Date;
    /** Callback when value changes */
    onChange?: (date: Date) => void;
    /** Minimum selectable date */
    minDate?: Date;
    /** Maximum selectable date */
    maxDate?: Date;
    /** Show time selection */
    showTime?: boolean;
    /** Display format string */
    format?: string;
    /** Placeholder text */
    placeholder?: string;
    /** Whether the picker is open (controlled) */
    open?: boolean;
    /** Default open state */
    defaultOpen?: boolean;
    /** Callback when open changes */
    onOpenChange?: (open: boolean) => void;
}
interface DatePickerState {
    open: boolean;
    selectedDate: Date | undefined;
    view: DatePickerView;
    hours: number;
    minutes: number;
    currentMonth: Date;
}
interface CalendarDay {
    date: Date;
    isToday: boolean;
    isSelected: boolean;
    isCurrentMonth: boolean;
    isDisabled: boolean;
}
interface DatePickerAPI {
    /** Current state */
    state: DatePickerState;
    /** Calendar days grid (42 cells) */
    days: CalendarDay[];
    /** Open the picker */
    openPicker(): void;
    /** Close the picker */
    closePicker(): void;
    /** Toggle the picker */
    togglePicker(): void;
    /** Select a date from calendar */
    selectDate(date: Date): void;
    /** Set hours */
    setHours(hours: number): void;
    /** Set minutes */
    setMinutes(minutes: number): void;
    /** Navigate to previous month */
    prevMonth(): void;
    /** Navigate to next month */
    nextMonth(): void;
    /** Switch between calendar and time views */
    setView(view: DatePickerView): void;
    /** Format the selected date for display */
    formatDisplay(): string;
    /** ARIA attributes for the trigger input */
    triggerProps: Partial<AccessibilityProps> & Record<string, unknown>;
    /** ARIA attributes for the dropdown */
    dropdownProps: Partial<AccessibilityProps> & Record<string, unknown>;
    /** ARIA props for the calendar grid */
    gridProps: Partial<AccessibilityProps> & Record<string, unknown>;
    /** Get ARIA props for a day cell */
    getDayAriaProps(day: CalendarDay): Partial<AccessibilityProps> & Record<string, unknown>;
    /** Keyboard handlers */
    keyboardHandlers: KeyboardHandlerMap;
    /** Generated IDs */
    ids: {
        trigger: string;
        dropdown: string;
        grid: string;
        label: string;
    };
}
declare function formatDate(date: Date | undefined, format: string, showTime: boolean): string;
declare function createDatePicker(props?: DatePickerProps): DatePickerAPI;

declare const datePickerTriggerStyles = "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer";
declare const datePickerDropdownStyles = "absolute z-50 mt-1 rounded-md border bg-popover p-4 text-popover-foreground shadow-md";
declare const datePickerGridStyles = "w-full border-collapse";
declare const datePickerDayVariants: (props?: ({
    state?: "default" | "selected" | "today" | "disabled" | "outside" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const datePickerTimeStyles = "flex items-center gap-2 mt-3 pt-3 border-t";
declare const datePickerTimeInputStyles = "w-14 rounded-md border border-input bg-background px-2 py-1 text-sm text-center";

export { type CalendarDay, type DatePickerAPI, type DatePickerProps, type DatePickerState, type DatePickerView, createDatePicker, datePickerDayVariants, datePickerDropdownStyles, datePickerGridStyles, datePickerTimeInputStyles, datePickerTimeStyles, datePickerTriggerStyles, formatDate };
