import React from 'react';
import { EmptyStateProps, SearchBarProps, type FormLabelProps } from '../../module';
type DisabledItemsSection = {
    /** Hide Disabled items section */
    enabled: false;
} | {
    /** Show Disabled items section */
    enabled: true;
    /** Title displayed at the left side of the section header */
    primaryTitle?: string;
    /** Title displayed at the right side of the section header */
    secondaryTitle?: string;
};
type SearchProps = Omit<SearchBarProps, 'onChange'> & {
    /** Optional function that will make a callout with the search `value` passed back */
    onChange?: (value: string) => void;
    /** Boolean value to indicate if search bar to be shown */
    show?: boolean;
};
type DataItemBase = {
    /** Required prop that will be used as a "label". This prop must remain flexible as we do not know what an api response will look like. This will force at least one field to passed into the `DataItem` generic. */
    [key: string]: React.ReactNode;
    /** Optional text that needs to be shown near the actual text */
    secondaryOption?: React.ReactNode;
    /** Optional flag to indicate if the option cannot be checked or unchecked */
    disabled?: boolean;
};
type MultiSelectBaseProps<DataItem extends DataItemBase> = {
    /** Array of options displayed in the UI */
    options: DataItem[];
    /** Array of user selected options that we want selected when the component mounts. These strings should come from the strings provided in the `options` prop. */
    selectedOptions: DataItem[];
    /** Key that is used to populate the selectable text */
    labelKey: keyof DataItem;
    /** Function to set the array of selected options */
    callout: (selectedList: DataItem[]) => void;
    /** Optionally add FormLabel props */
    formLabelProps?: FormLabelProps;
    /** Search Bar props. Can be used to override dynamically */
    searchBarProps?: Omit<SearchProps, 'value'> & {
        /** The value should be optional */
        value?: string;
    };
    /** Custom text that will display if no items match the search input */
    emptyStateProps?: EmptyStateProps;
    /** Optional prop to disabled the use of this component */
    disabled?: boolean;
    /** Optionally show the ListLoading component when options are not readily available */
    loading?: boolean;
    /** Optionally hide the Select All */
    hideSelectAll?: boolean;
    /** Optionally make the selected items reorderable using the DraggableList component. */
    isReorderable?: boolean;
    /** Optionally opt-out of alphaetical sorting */
    sortAlphabetically?: boolean;
    /** Optionally opt-out for showing disabled items in disabled section below unselected items*/
    disabledItemsSection?: DisabledItemsSection;
};
type MultiSelectWithOptionsProps<DataItem extends DataItemBase> = MultiSelectBaseProps<DataItem> & {
    fetchData?: never;
    hasMore?: never;
    searchValue?: never;
    isFetching?: never;
    dropdownState?: never;
};
type MultiSelectWithAPIOptionsProps<DataItem extends DataItemBase> = MultiSelectBaseProps<DataItem> & {
    /** To trigger API call initially and on pagination */
    fetchData: () => void;
    /** Boolean value to indicate if pagination exists */
    hasMore: boolean;
    /** Optionally used to indicate API fetch status. */
    isFetching?: boolean;
    /** Callback that gives the current open / closed state of the Tippy */
    dropdownState?: (status: 'open' | 'close') => void;
};
type MultiSelectOptionsProps<DataItem extends DataItemBase> = MultiSelectWithAPIOptionsProps<DataItem> | MultiSelectWithOptionsProps<DataItem>;
type ExposedProps<DataItem extends DataItemBase> = MultiSelectOptionsProps<DataItem> & {
    /** Optionally make the component "exposed" by not needing a click to view the options. */
    exposed: boolean;
    /** Optionally override the maxHeight for the exposed container. */
    maxHeight?: number | string;
    appendTo?: never;
    selectPlaceholder?: never;
    /** Option to reset list search on callout */
    resetSearch?: boolean;
};
type StandardProps<DataItem extends DataItemBase> = MultiSelectOptionsProps<DataItem> & {
    /** Useful when we want to attach this to another component making use of Tippy */
    appendTo?: 'parent' | ((element: Element) => Element);
    /** Custom placeholder text for the Select Dropdown */
    selectPlaceholder: string;
    exposed?: never;
    maxHeight?: never;
    resetSearch?: never;
};
export type MultiSelectProps<DataItem extends DataItemBase> = ExposedProps<DataItem> | StandardProps<DataItem>;
export type MultiSelectHeaders = {
    id: number;
    label: string;
    isChecked: boolean;
};
declare const MultiSelect: <DataItem extends DataItemBase>({ appendTo, dropdownState, labelKey, selectedOptions, options, callout, isFetching, isReorderable, fetchData, selectPlaceholder, searchBarProps, emptyStateProps, exposed, maxHeight, resetSearch, disabled, loading, hideSelectAll, hasMore, formLabelProps, sortAlphabetically, disabledItemsSection, }: MultiSelectProps<DataItem>) => JSX.Element;
export default MultiSelect;
