"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.LimiterCapacity = exports.DenomCapacity = void 0;
const limit_params_1 = require("./limit_params");
const _m0 = __importStar(require("protobufjs/minimal"));
function createBaseDenomCapacity() {
    return {
        denom: "",
        capacityList: []
    };
}
exports.DenomCapacity = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.denom !== "") {
            writer.uint32(10).string(message.denom);
        }
        for (const v of message.capacityList) {
            writer.uint32(18).bytes(v);
        }
        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 = createBaseDenomCapacity();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.denom = reader.string();
                    break;
                case 2:
                    message.capacityList.push(reader.bytes());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a, _b;
        const message = createBaseDenomCapacity();
        message.denom = (_a = object.denom) !== null && _a !== void 0 ? _a : "";
        message.capacityList = ((_b = object.capacityList) === null || _b === void 0 ? void 0 : _b.map(e => e)) || [];
        return message;
    }
};
function createBaseLimiterCapacity() {
    return {
        limiter: undefined,
        capacity: new Uint8Array()
    };
}
exports.LimiterCapacity = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.limiter !== undefined) {
            limit_params_1.Limiter.encode(message.limiter, writer.uint32(10).fork()).ldelim();
        }
        if (message.capacity.length !== 0) {
            writer.uint32(18).bytes(message.capacity);
        }
        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 = createBaseLimiterCapacity();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.limiter = limit_params_1.Limiter.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.capacity = reader.bytes();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a;
        const message = createBaseLimiterCapacity();
        message.limiter = object.limiter !== undefined && object.limiter !== null ? limit_params_1.Limiter.fromPartial(object.limiter) : undefined;
        message.capacity = (_a = object.capacity) !== null && _a !== void 0 ? _a : new Uint8Array();
        return message;
    }
};
//# sourceMappingURL=data:application/json;base64, 