/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import "./select.scss";
import React from "react";
import type { ObservableSet } from "mobx";
import type { Props as ReactSelectProps, GroupBase, PropsValue } from "react-select";
import type { StrictReactNode } from "@openlens/utilities";
export interface SelectOption<Value> {
    value: Value;
    label: StrictReactNode;
    isDisabled?: boolean;
    isSelected?: boolean;
    id?: string;
}
/**
 * @deprecated This should not be used anymore, convert the options yourself.
 */
export type LegacyAutoConvertedOptions = string[];
export interface SelectProps<Value, 
/**
 * This needs to extend `object` because even though `ReactSelectProps` allows for any `T`, the
 * maintainers of `react-select` says that they don't support it.
 *
 * Ref: https://github.com/JedWatson/react-select/issues/5032
 *
 * Futhermore, we mandate the option is of this shape because it is easier than requiring
 * `getOptionValue` and `getOptionLabel` all over the place.
 */
Option extends SelectOption<Value>, IsMulti extends boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<ReactSelectProps<Option, IsMulti, Group>, "value" | "options"> {
    id?: string;
    themeName?: "dark" | "light" | "outlined" | "lens";
    menuClass?: string;
    value?: PropsValue<Value>;
    options: NonNullable<ReactSelectProps<Option, IsMulti, Group>["options"]> | LegacyAutoConvertedOptions;
    /**
     * @deprecated This option does nothing
     */
    isCreatable?: boolean;
    /**
     * @deprecated We will always auto convert options if they are of type `string`
     */
    autoConvertOptions?: boolean;
}
export declare function onMultiSelectFor<Value, Option extends SelectOption<Value>, Group extends GroupBase<Option> = GroupBase<Option>>(collection: Set<Value> | ObservableSet<Value>): SelectProps<Value, Option, true, Group>["onChange"];
export declare const Select: <Value, Option extends SelectOption<Value>, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectProps<Value, Option, IsMulti, Group>) => React.ReactElement;
