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

interface VersionOption {
    value: string;
    label: string;
    isLatest?: boolean;
}
interface VersionSelectorProps {
    value?: string;
    onValueChange?: (value: string) => void;
    versions: VersionOption[];
}
interface VersionSelectorAPI {
    /** Current state */
    state: {
        selectedVersion: string;
        isOpen: boolean;
    };
    /** Props to spread on the trigger element */
    triggerProps: {
        'aria-expanded': boolean;
        'aria-controls': string;
        'aria-haspopup': 'listbox';
        role: 'combobox';
    };
    /** Props to spread on the content/dropdown element */
    contentProps: {
        role: 'listbox';
        id: string;
    };
    /** Get props for an individual option */
    getOptionProps: (value: string) => {
        role: 'option';
        'aria-selected': boolean;
        'data-value': string;
        'data-latest'?: string;
    };
    /** Select a version */
    select: (value: string) => void;
    /** Open the dropdown */
    open: () => void;
    /** Close the dropdown */
    close: () => void;
    /** Keyboard handler map */
    keyboardHandlers: KeyboardHandlerMap;
    /** Pre-built keyboard event handler */
    handleKeyDown: (event: KeyboardEvent) => void;
}
declare function createVersionSelector(props: VersionSelectorProps): VersionSelectorAPI;

declare const versionSelectorVariants: (props?: ({
    size?: "sm" | "md" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const versionSelectorOptionVariants: (props?: ({
    selected?: "true" | "false" | undefined;
} & {
    className?: string;
}) | undefined) => string;

declare const latestBadgeVariants: (props?: ({
    variant?: "default" | "accent" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type VersionOption, type VersionSelectorAPI, type VersionSelectorProps, createVersionSelector, latestBadgeVariants, versionSelectorOptionVariants as optionVariants, versionSelectorVariants };
