import { __extends } from "tslib";
import { ethers } from "ethers";
import { deepCopy } from "ethers/lib/utils";
import { BigNumber, bnOne } from "../utils";
import AbstractApiClient from "./abstractClient";
/**
 * MockedApiClient is a mocked implementation of the AbstractApiClient.
 * @class
 * @extends AbstractApiClient
 * @note This implementation does not make API calls to RESTful services. Instead, it returns mocked data.
 */
var MockedApiClient = /** @class */ (function (_super) {
    __extends(MockedApiClient, _super);
    /**
     * Creates a constructor for the MockedApiClient.
     * @param mockedData The mocked data to return in lieu of the default return values
     */
    function MockedApiClient(mockedData) {
        var _this = _super.call(this, "", "") || this;
        _this.mockedData = deepCopy(mockedData !== null && mockedData !== void 0 ? mockedData : {});
        return _this;
    }
    MockedApiClient.prototype.getCoinGeckoData = function (_l1Token, _baseCurrency) {
        var _a;
        return Promise.resolve((_a = this.mockedData.CoinGeckoData) !== null && _a !== void 0 ? _a : {
            price: ethers.utils.parseEther(String("0.1")),
        });
    };
    MockedApiClient.prototype.getSuggestedFees = function (_amount, _originToken, _toChainid, _fromChainid) {
        var _a;
        return Promise.resolve((_a = this.mockedData.SuggestedFees) !== null && _a !== void 0 ? _a : {
            relayerFee: {
                pct: bnOne,
                total: bnOne,
            },
            relayerCapitalFee: {
                pct: bnOne,
                total: bnOne,
            },
            relayerGasFee: {
                pct: bnOne,
                total: bnOne,
            },
            isAmountTooLow: false,
            quoteBlock: bnOne,
            quoteTimestamp: bnOne,
        });
    };
    MockedApiClient.prototype.getBridgeLimits = function (_token, _fromChainId, _toChainId) {
        var _a;
        return Promise.resolve((_a = this.mockedData.BridgeLimits) !== null && _a !== void 0 ? _a : {
            minDeposit: BigNumber.from("317845960607070"),
            maxDeposit: BigNumber.from("1625976243310274613043"),
            maxDepositInstant: BigNumber.from("148518401181482545509"),
            maxDepositShortDelay: BigNumber.from("1625976243310274613043"),
        });
    };
    MockedApiClient.prototype.getAcrossStats = function () {
        var _a;
        return Promise.resolve((_a = this.mockedData.AcrossStats) !== null && _a !== void 0 ? _a : {
            totalDeposits: 200,
            avgFillTime: 200,
            totalVolumeUsd: 100000,
        });
    };
    return MockedApiClient;
}(AbstractApiClient));
export default MockedApiClient;
//# sourceMappingURL=mockedClient.js.map