import { RefetchOptions } from '@tanstack/react-query';
import { Input, Output, RequestStatusEnum, RouteDetails, STATUS_CODE } from '../../../types/index';
import { ManualRefuel, OrderFlowType, RequestType, Rewards, TxData } from '../common/quote/types';

export declare const useAutoHistory: ({ userAddresses, pageSize, pageNumber, enabled, }: {
    userAddresses: (string | undefined)[];
    pageSize: number;
    pageNumber: number;
    enabled?: boolean;
}) => {
    error: string | undefined;
    isError: boolean;
    isLoading: boolean;
    isSuccess: boolean;
    data: ({
        status: "PENDING" | "ASSIGNED" | "EXTRACTED" | "COMPLETED" | "SETTLED" | "EXPIRED" | "CANCELLED" | "REFUND_PENDING" | "REFUNDED" | "REVERTED";
        statusCode: STATUS_CODE;
        routingMode: "auto";
        txData: TxData | null;
        requestType: RequestType;
        rewards?: Rewards;
        slippage: number | null;
        suggestedClientSlippage?: number;
        batchId?: string;
        quoteId: string;
        input: Input[];
        output: Output[];
        orderTimestamp: number;
        srcTimestamp: number;
        destTimestamp?: number;
        sender: string;
        receiver: string;
        requestHash: string;
        swapTime: number;
        primaryInput: Input;
        primaryOutput: Output;
        isSwapRoute: boolean;
        flowType: OrderFlowType;
        refund?: Refund | null;
        includesCollectible?: boolean;
    } | {
        status: "PENDING" | "ASSIGNED" | "EXTRACTED" | "COMPLETED" | "SETTLED" | "EXPIRED" | "CANCELLED" | "REFUND_PENDING" | "REFUNDED" | "REVERTED";
        statusCode: STATUS_CODE;
        routingMode: "manual";
        protocol: RouteDetails;
        estimatedFulfilTime: number;
        refuel: ManualRefuel | null;
        slippage: number;
        batchId?: string;
        quoteId: string;
        input: Input[];
        output: Output[];
        orderTimestamp: number;
        srcTimestamp: number;
        destTimestamp?: number;
        sender: string;
        receiver: string;
        requestHash: string;
        swapTime: number;
        primaryInput: Input;
        primaryOutput: Output;
        isSwapRoute: boolean;
        flowType: OrderFlowType;
        refund?: Refund | null;
        includesCollectible?: boolean;
    })[];
    totalPages: number;
    refetch: (options?: RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
        requests: AutoOrderData[];
        totalRequests: number;
    }, Error>[]>;
};
export interface Refund {
    chainId: number;
    txHash: string;
}
export interface BaseOrderData {
    routingMode: "auto" | "manual";
    quoteId: string;
    input: Input[];
    output: Output[];
    orderTimestamp: number;
    srcTimestamp: number;
    destTimestamp?: number;
    statusCode: STATUS_CODE;
    sender: string;
    receiver: string;
    requestHash: string;
    status: keyof typeof RequestStatusEnum;
    swapTime: number;
    primaryInput: Input;
    primaryOutput: Output;
    isSwapRoute: boolean;
    flowType: OrderFlowType;
    refund?: Refund | null;
    includesCollectible?: boolean;
}
export interface AutoOrderData extends BaseOrderData {
    routingMode: "auto";
    txData: TxData | null;
    requestType: RequestType;
    rewards?: Rewards;
    slippage: number | null;
    suggestedClientSlippage?: number;
    batchId?: string;
}
export interface ManualOrderData extends BaseOrderData {
    routingMode: "manual";
    protocol: RouteDetails;
    estimatedFulfilTime: number;
    refuel: ManualRefuel | null;
    slippage: number;
    batchId?: string;
}
export type OrderData = AutoOrderData | ManualOrderData;
