// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

library RouteTypesV2 {
    enum Provider {
        Dodo,
        UniswapV3,
        Balancer,
        Curve,
        OneInch,
        Partner,
        DodoV3
    }

    enum AmountSource {
        UserInput,
        PreviousLeg
    }

    struct RouteLeg {
        Provider provider;
        address tokenIn;
        address tokenOut;
        AmountSource amountSource;
        uint256 minAmountOut;
        address target;
        bytes providerData;
    }

    struct RoutePlan {
        uint256 chainId;
        address inputToken;
        address outputToken;
        uint256 amountIn;
        uint256 minAmountOut;
        address recipient;
        uint256 deadline;
        RouteLeg[] legs;
    }

    struct ExecutionConstraints {
        uint256 maxSlippageBps;
        Provider[] allowedProviders;
        uint256 maxLegs;
        bytes32 complianceProfile;
    }

    struct ProviderQuote {
        Provider provider;
        address target;
        uint256 amountOut;
        uint256 estimatedGas;
        bool executable;
        bytes providerData;
    }

    struct BridgeIntentPlan {
        RoutePlan sourcePlan;
        bytes32 bridgeType;
        bytes bridgeData;
        RoutePlan destinationPlan;
        address recipient;
        uint256 deadline;
    }
}
