"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProcessProposerMatchesEvents = void 0;
const order_1 = require("./order");
const _m0 = __importStar(require("protobufjs/minimal"));
function createBaseProcessProposerMatchesEvents() {
    return {
        placedLongTermOrderIds: [],
        expiredStatefulOrderIds: [],
        orderIdsFilledInLastBlock: [],
        placedStatefulCancellationOrderIds: [],
        removedStatefulOrderIds: [],
        conditionalOrderIdsTriggeredInLastBlock: [],
        placedConditionalOrderIds: [],
        blockHeight: 0
    };
}
exports.ProcessProposerMatchesEvents = {
    encode(message, writer = _m0.Writer.create()) {
        for (const v of message.placedLongTermOrderIds) {
            order_1.OrderId.encode(v, writer.uint32(10).fork()).ldelim();
        }
        for (const v of message.expiredStatefulOrderIds) {
            order_1.OrderId.encode(v, writer.uint32(18).fork()).ldelim();
        }
        for (const v of message.orderIdsFilledInLastBlock) {
            order_1.OrderId.encode(v, writer.uint32(26).fork()).ldelim();
        }
        for (const v of message.placedStatefulCancellationOrderIds) {
            order_1.OrderId.encode(v, writer.uint32(34).fork()).ldelim();
        }
        for (const v of message.removedStatefulOrderIds) {
            order_1.OrderId.encode(v, writer.uint32(42).fork()).ldelim();
        }
        for (const v of message.conditionalOrderIdsTriggeredInLastBlock) {
            order_1.OrderId.encode(v, writer.uint32(50).fork()).ldelim();
        }
        for (const v of message.placedConditionalOrderIds) {
            order_1.OrderId.encode(v, writer.uint32(58).fork()).ldelim();
        }
        if (message.blockHeight !== 0) {
            writer.uint32(64).uint32(message.blockHeight);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseProcessProposerMatchesEvents();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.placedLongTermOrderIds.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.expiredStatefulOrderIds.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 3:
                    message.orderIdsFilledInLastBlock.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 4:
                    message.placedStatefulCancellationOrderIds.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 5:
                    message.removedStatefulOrderIds.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 6:
                    message.conditionalOrderIdsTriggeredInLastBlock.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 7:
                    message.placedConditionalOrderIds.push(order_1.OrderId.decode(reader, reader.uint32()));
                    break;
                case 8:
                    message.blockHeight = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a, _b, _c, _d, _e, _f, _g, _h;
        const message = createBaseProcessProposerMatchesEvents();
        message.placedLongTermOrderIds = ((_a = object.placedLongTermOrderIds) === null || _a === void 0 ? void 0 : _a.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.expiredStatefulOrderIds = ((_b = object.expiredStatefulOrderIds) === null || _b === void 0 ? void 0 : _b.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.orderIdsFilledInLastBlock = ((_c = object.orderIdsFilledInLastBlock) === null || _c === void 0 ? void 0 : _c.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.placedStatefulCancellationOrderIds = ((_d = object.placedStatefulCancellationOrderIds) === null || _d === void 0 ? void 0 : _d.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.removedStatefulOrderIds = ((_e = object.removedStatefulOrderIds) === null || _e === void 0 ? void 0 : _e.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.conditionalOrderIdsTriggeredInLastBlock = ((_f = object.conditionalOrderIdsTriggeredInLastBlock) === null || _f === void 0 ? void 0 : _f.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.placedConditionalOrderIds = ((_g = object.placedConditionalOrderIds) === null || _g === void 0 ? void 0 : _g.map(e => order_1.OrderId.fromPartial(e))) || [];
        message.blockHeight = (_h = object.blockHeight) !== null && _h !== void 0 ? _h : 0;
        return message;
    }
};
//# sourceMappingURL=data:application/json;base64, 