"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockHubPoolClient = void 0;
var tslib_1 = require("tslib");
var src_1 = require("../../src");
var MockHubPoolClient = (function (_super) {
    tslib_1.__extends(MockHubPoolClient, _super);
    function MockHubPoolClient(logger, hubPool, configStoreClient, deploymentBlock, chainId) {
        if (deploymentBlock === void 0) { deploymentBlock = 0; }
        if (chainId === void 0) { chainId = 1; }
        var _this = _super.call(this, logger, hubPool, configStoreClient, deploymentBlock, chainId) || this;
        _this.latestBundleEndBlocks = {};
        return _this;
    }
    MockHubPoolClient.prototype.setLatestBundleEndBlockForChain = function (chainId, latestBundleEndBlock) {
        this.latestBundleEndBlocks[chainId] = latestBundleEndBlock;
    };
    MockHubPoolClient.prototype.getLatestBundleEndBlockForChain = function (chainIdList, latestMainnetBlock, chainId) {
        var _a, _b;
        return ((_b = (_a = this.latestBundleEndBlocks[chainId]) !== null && _a !== void 0 ? _a : _super.prototype.getLatestBundleEndBlockForChain.call(this, chainIdList, latestMainnetBlock, chainId)) !== null && _b !== void 0 ? _b : 0);
    };
    MockHubPoolClient.prototype.getL1TokenForDeposit = function (deposit) {
        return _super.prototype.getL1TokenForDeposit.call(this, deposit);
    };
    MockHubPoolClient.prototype.getL2TokenForDeposit = function (deposit, l2ChainId) {
        var _a;
        if (l2ChainId === void 0) { l2ChainId = deposit.destinationChainId; }
        var l1Token = this.getL1TokenForDeposit(deposit);
        return l1Token
            ? (_a = this.getL2TokenForL1TokenAtBlock(l1Token, l2ChainId, deposit.quoteBlockNumber)) === null || _a === void 0 ? void 0 : _a.toNative()
            : undefined;
    };
    return MockHubPoolClient;
}(src_1.clients.mocks.MockHubPoolClient));
exports.MockHubPoolClient = MockHubPoolClient;
//# sourceMappingURL=MockHubPoolClient.js.map