/**
 * @internal
 * States of a data load.
 */
export type DataState<Data> = DataLoadingState<Data> | DataErrorState | DataSuccessState<Data>;
/**
 * @internal
 * State of data loading.
 */
export type DataLoadingState<Data> = {
    /** Whether the data is loading */
    isLoading: true;
    /** Whether the data load has failed */
    isError: false;
    /** Whether the data load has succeeded */
    isSuccess: false;
    /** The error if any occurred */
    error: undefined;
    /** The result data if the load has succeeded */
    data: Data | undefined;
    /** The status of the data load */
    status: 'loading';
};
/**
 * @internal
 * State of a data load that has failed.
 */
export type DataErrorState = {
    /** Whether the data is loading */
    isLoading: false;
    /** Whether the data load has failed */
    isError: true;
    /** Whether the data load has succeeded */
    isSuccess: false;
    /** The error if any occurred */
    error: Error;
    /** The result data if the load has succeeded */
    data: undefined;
    /** The status of the data load */
    status: 'error';
};
/**
 * @internal
 * State of a data load that has succeeded.
 */
export type DataSuccessState<Data> = {
    /** Whether the data is loading */
    isLoading: false;
    /** Whether the data load has failed */
    isError: false;
    /** Whether the data load has succeeded */
    isSuccess: true;
    /** The error if any occurred */
    error: undefined;
    /** The result data if the load has succeeded */
    data: Data;
    /** The status of the data load */
    status: 'success';
};
/**
 * @internal
 */
export type DataLoadAction<Data> = {
    type: 'loading';
} | {
    type: 'success';
    data: Data;
} | {
    type: 'error';
    error: Error;
};
/**
 * @internal
 */
export declare function dataLoadStateReducer<Data>(state: DataState<Data>, action: DataLoadAction<Data>): DataState<Data>;
