import { HTMLAttributes, ReactNode } from 'react';
export interface SortableData {
    id: string;
    index: number;
    data?: string | number | Record<string, unknown>;
}
/** Event type for sort drag callbacks - may be a native event, React event, or absent (keyboard-initiated) */
export type SortableEvent = React.KeyboardEvent<HTMLDivElement> | Event | undefined;
export interface SortableTheme {
    containerStyle: string;
    itemStyle: string;
    dragHandleStyle: string;
}
export interface SortableThemeOverrides {
    containerStyle?: string;
    itemStyle?: string;
    dragHandleStyle?: string;
}
export interface SortableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onDragStart' | 'onDragEnd'> {
    /** Content to make sortable */
    children: ReactNode;
    /** Called when items are reordered */
    onReorder: (fromIndex: number, toIndex: number) => void;
    /** Custom class name */
    className?: string;
    /** Theme overrides */
    theme?: SortableThemeOverrides;
    /** Direction of sorting */
    direction?: 'vertical' | 'horizontal';
    /** Show drag handles */
    showDragHandle?: boolean;
    /** Called when drag starts */
    onSortDragStart?: (data: SortableData, event?: SortableEvent) => void;
    /** Called when drag ends */
    onSortDragEnd?: (data: SortableData, event?: SortableEvent) => void;
    /** Optional array of values for Reorder.Group - auto-extracted from children if not provided */
    values?: (string | number)[];
}
export interface SortableItemProps extends HTMLAttributes<HTMLDivElement> {
    /** Unique identifier for the item */
    id: string;
    /** Content of the sortable item */
    children: ReactNode;
    /** Custom class name */
    className?: string;
    /** Theme overrides */
    theme?: SortableThemeOverrides;
    /** Disable dragging for this item */
    disabled?: boolean;
    /** Value for Reorder.Item - defaults to id if not provided */
    value?: string | number;
}
export interface SortableContextValue {
    direction: 'vertical' | 'horizontal';
    showDragHandle: boolean;
    theme: SortableTheme;
    onReorder: (fromIndex: number, toIndex: number) => void;
    onSortDragStart?: (data: SortableData, event?: SortableEvent) => void;
    onSortDragEnd?: (data: SortableData, event?: SortableEvent) => void;
    draggedItem: string | null;
    setDraggedItem: (id: string | null) => void;
    dropPosition: {
        index: number;
        position: 'before' | 'after';
    } | null;
    setDropPosition: (position: {
        index: number;
        position: 'before' | 'after';
    } | null) => void;
    itemRefs: React.MutableRefObject<Map<string, HTMLDivElement>>;
    draggedItemContent: React.ReactNode | null;
    setDraggedItemContent: (content: React.ReactNode | null) => void;
}
