import React from "react";
import { type UiBaseProps } from "../../types";
import type { CollectionItem } from "@ryuzaki13/react-foundation-lib/odata";
export interface MultiSelectItemState {
    selected: boolean;
    active: boolean;
    disabled: boolean;
    query: string;
    highlightQuery: string;
}
export interface MultiSelectRenderContext {
    selectedItems: CollectionItem[];
    committedSelectedItems: CollectionItem[];
    availableItems: CollectionItem[];
    query: string;
    open: boolean;
    clearSelection: () => void;
    selectAll: () => void;
    deselectAll: () => void;
}
export interface MultiSelectOptionDisableContext {
    selectedItems: CollectionItem[];
    committedSelectedItems: CollectionItem[];
    selectedKeys: ReadonlySet<string>;
    open: boolean;
}
type MultiSelectOptionalRenderer<TContext> = ((context: TContext) => React.ReactNode) | null | false;
interface MultiSelectRenderers {
    renderToken?: MultiSelectOptionalRenderer<MultiSelectRenderContext>;
    renderToolbar?: MultiSelectOptionalRenderer<MultiSelectRenderContext>;
    renderItem?: (item: CollectionItem, state: MultiSelectItemState) => React.ReactNode;
}
export interface MultiSelectProps<TOption extends Record<string, string> = CollectionItem> extends MultiSelectRenderers, UiBaseProps<TOption[]> {
    codeKey: string;
    textKey?: string;
    hideCode?: boolean;
    query?: string;
    defaultQuery?: string;
    highlightQuery?: string;
    onQuery?: (value: string) => void;
    defaultFilter?: boolean;
    items: TOption[];
    getOptionDisabled?: (item: TOption, context: MultiSelectOptionDisableContext) => boolean;
    onOpen?: () => void;
    onClose?: (value: TOption[]) => void;
    error?: string;
    isLoading?: boolean;
}
/**
 * Поле множественного выбора с внутренним черновиком значений и подтверждением выбора при закрытии списка.
 * Подходит как для самостоятельного использования, так и как базовый слой для OData-оберток.
 */
export declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps<CollectionItem> & React.RefAttributes<HTMLInputElement>>;
export {};
//# sourceMappingURL=MultiSelect.d.ts.map