import { type CSSProperties, ReactNode } from "react";
import { Placement } from "@floating-ui/react";
import { InputType } from "@ryuzaki13/react-foundation-lib/types";
import { ChangeHandler, UiBaseProps } from "../types";
import { type SelectOptionGroup, type SelectOptionKey } from "./SelectOptionGroup";
export { type SelectOptionGroup, type SelectOptionKey } from "./SelectOptionGroup";
export type SelectOptionState = {
    active: boolean;
    selected: boolean;
    disabled: boolean;
};
type SelectSharedProps<TOption extends InputType> = Omit<UiBaseProps<TOption, TOption | undefined>, "onChange"> & {
    options: readonly TOption[];
    getOptionKey: (option: TOption) => SelectOptionKey;
    getOptionLabel: (option: TOption) => ReactNode;
    getOptionCode?: (option: TOption) => ReactNode;
    getOptionDisabled?: (option: TOption) => boolean;
    getOptionAriaLabel?: (option: TOption) => string;
    getOptionGroup?: (option: TOption) => SelectOptionGroup | undefined;
    getOptionClassName?: (option: TOption, state: SelectOptionState) => string | undefined;
    renderOption?: (option: TOption, state: SelectOptionState) => ReactNode;
    renderValue?: (option: TOption) => ReactNode;
    className?: string;
    buttonClassName?: string;
    optionsClassName?: string;
    optionsMaxWidth?: CSSProperties["maxWidth"];
    optionsContentClassName?: string;
    searchable?: boolean;
    query?: string;
    defaultQuery?: string;
    onQuery?: (value: string) => void;
    defaultFilter?: boolean;
    renderPopupHeader?: ReactNode;
    emptyState?: ReactNode;
    loadingState?: ReactNode;
    errorState?: ReactNode;
    placement?: Placement;
};
type SelectChangeValue<TOption extends InputType, TClearable extends boolean | undefined> = true extends TClearable ? TOption | undefined : TOption;
export type SelectProps<TOption extends InputType, TClearable extends boolean | undefined = false> = SelectSharedProps<TOption> & {
    clearable?: TClearable;
    onChange: ChangeHandler<SelectChangeValue<TOption, TClearable>>;
};
/**
 * Выпадающий список выбора значения из набора опций. Подходит для форм, фильтров и простых справочников.
 */
export declare function Select<TOption extends InputType, TClearable extends boolean | undefined = false>(props: SelectProps<TOption, TClearable>): import("react").JSX.Element;
//# sourceMappingURL=Select.d.ts.map