import { DataSource, Filter } from '@sisense/sdk-data';
import { HookEnableParam } from '../../../shared/hooks/types';
import { Member, SelectedMember } from '../components/member-filter-tile/index.js';
/**
 * Params for {@link useGetFilterMembers}
 */
export interface GetFilterMembersParams extends HookEnableParam {
    /** Provided members filter */
    filter: Filter;
    /** Default data source to use if filter does not have one */
    defaultDataSource?: DataSource;
    /** List of filters this filter is dependent on */
    parentFilters?: Filter[];
    /**
     * Number of requested members to return in the query result
     *
     * If not specified, the default value is `20000`
     *
     * @internal
     */
    count?: number;
    /**
     * Whether to allow original filter members to be included in the result even if they are not present in the loaded data
     *
     * When enabled, filter members that are not found in the queried results will still be included
     * in the `selectedMembers` and `allMembers` arrays.
     *
     * Example case: there's no value for a specific date, but user still have to be able to select it in the filter
     *
     * If not specified, the default value is `false`
     *
     * @internal
     */
    allowMissingMembers?: boolean;
}
/**
 * Result data of retrieving filter members.
 */
export interface GetFilterMembersData {
    /** Array of members that are currently selected */
    selectedMembers: SelectedMember[];
    /** Array of all available members */
    allMembers: Member[];
    /** Flag indicating whether members are excluded */
    excludeMembers: boolean;
    /** Flag indicating if multiple selection is enabled */
    enableMultiSelection: boolean;
    /** Flag indicating if there is a background filter applied */
    hasBackgroundFilter: boolean;
}
/**
 * State of a filter members load that has succeeded.
 */
export interface FilterMembersSuccessState {
    /** Whether the data fetching is loading */
    isLoading: false;
    /** Whether the data fetching has failed */
    isError: false;
    /** Whether the data fetching has succeeded */
    isSuccess: true;
    /** The status of the data fetching execution */
    status: 'success';
    /** The error if any occurred */
    error: undefined;
    /** The result data */
    data: GetFilterMembersData;
}
/**
 * State of a filter members load that is loading.
 */
export interface FilterMembersLoadingState {
    /** Whether the data fetching is loading */
    isLoading: true;
    /** Whether the data fetching has failed */
    isError: false;
    /** Whether the data fetching has succeeded */
    isSuccess: false;
    /** The status of the data fetching execution */
    status: 'loading';
    /** The error if any occurred */
    error: undefined;
    /** The result data */
    data: GetFilterMembersData;
}
/**
 * State of a filter members load that has failed.
 */
export interface FilterMembersErrorState {
    /** Whether the data fetching is loading */
    isLoading: false;
    /** Whether the data fetching has failed */
    isError: true;
    /** Whether the data fetching has succeeded */
    isSuccess: false;
    /** The status of the data fetching execution */
    status: 'error';
    /** The error if any occurred */
    error: Error;
    /** The result data */
    data: undefined;
}
/**
 * States of the {@link useGetFilterMembers} hook.
 */
export type FilterMembersState = FilterMembersLoadingState | FilterMembersErrorState | FilterMembersSuccessState;
/**
 * Result of the {@link useGetFilterMembers} hook.
 */
export type GetFilterMembersResult = FilterMembersState & {
    /**
     * Function to load more data rows
     *
     * @internal
     */
    loadMore: (count: number) => void;
    /**
     * Flag indicating whether all items have been loaded
     *
     * @internal
     */
    isAllItemsLoaded: boolean;
};
/**
 * {@link useGetFilterMembers} without tracking to be used inside other hooks or components in Compose SDK.
 *
 * @param params - Parameters of the query
 * @internal
 */
export declare const useGetFilterMembersInternal: ({ filter, defaultDataSource, parentFilters, count, enabled, allowMissingMembers, }: GetFilterMembersParams) => GetFilterMembersResult;
/**
 * Hook that fetches members of the provided filter
 *
 * Those members can be used to display a list of members in a third-party filter component such as Material UI Select.
 *
 * ## Example
 *
 * Retrieve selected members from a Filter on Country of the Sample ECommerce data model.
 *
 * ```tsx
 * const {
 *   isLoading,
 *   data: { selectedMembers, allMembers, excludeMembers, enableMultiSelection },
 * } = useGetFilterMembers({ filter: filterFactory.members(DM.Country.Country, ['United States', 'Canada']) });
 *
 * if (isLoading) {
 *   return <div>Loading...</div>;
 * }
 * console.log('selectedMembers', selectedMembers);
 * ```
 *
 * @returns Results that contains the status of the filter query execution, the result data, or the error if any occurred
 * @shortDescription Hook to fetch members of a filter
 * @group Filter Tiles
 */
export declare const useGetFilterMembers: (args_0: GetFilterMembersParams) => GetFilterMembersResult;
