export interface Token {
	address: string;
	chainId: number;
	decimals: number;
	logoURI: string;
	name: string;
	symbol: string;
	amount?: number; // for input/output amoutns
	balance?: string;
	balanceInUsd?: number;
	tags?: string[];
	isVerified?: boolean;
	priceInUsd?: number;
	isImported?: boolean;
}

export type Input = {
	token: Token;
	amount: string;
	priceInUsd: number;
	valueInUsd: number;
};

export type Output = Input & {
	minAmountOut: string;
	fulfilledAmount?: string;
	fulfilValueInUsd?: number;
	effectiveReceivedInUsd?: number;
};

export enum RequestStatusEnum {
	PENDING = 0,
	ASSIGNED = 1,
	EXTRACTED = 2,
	COMPLETED = 3,
	SETTLED = 4,
	EXPIRED = 5,
	CANCELLED = 6,
	REFUND_PENDING = 7,
	REFUNDE = 8,
	REVERTED = 9,
}

export type STATUS_CODE = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;

export type RouteDetails = {
	name: string;
	logoURI: string;
	routeFee?: {
		token: Token;
		amount: string;
		feeInUsd: number;
		priceInUsd: number;
	};
	dexDetails?: DexDetails | null;
};

export type DexDetails = {
	protocol: {
		name: string;
		icon: string;
		displayName: string;
	};
	minAmountOut: string;
	amountOut: string;
	slippage: number;
	outputTokenAddress: string;
	inputTokenAddress: string;
};
