//@ts-nocheck
import { BinaryReader, BinaryWriter } from '../../../binary.js';
import { isSet } from '../../../helpers.js';
import {} from '../../../json-safe.js';
function createBasePerMessageBurnLimit() {
    return {
        denom: '',
        amount: '',
    };
}
export const PerMessageBurnLimit = {
    typeUrl: '/circle.cctp.v1.PerMessageBurnLimit',
    encode(message, writer = BinaryWriter.create()) {
        if (message.denom !== '') {
            writer.uint32(10).string(message.denom);
        }
        if (message.amount !== '') {
            writer.uint32(18).string(message.amount);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePerMessageBurnLimit();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.denom = reader.string();
                    break;
                case 2:
                    message.amount = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            denom: isSet(object.denom) ? String(object.denom) : '',
            amount: isSet(object.amount) ? String(object.amount) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.denom !== undefined && (obj.denom = message.denom);
        message.amount !== undefined && (obj.amount = message.amount);
        return obj;
    },
    fromPartial(object) {
        const message = createBasePerMessageBurnLimit();
        message.denom = object.denom ?? '';
        message.amount = object.amount ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return PerMessageBurnLimit.decode(message.value);
    },
    toProto(message) {
        return PerMessageBurnLimit.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.PerMessageBurnLimit',
            value: PerMessageBurnLimit.encode(message).finish(),
        };
    },
};
//# sourceMappingURL=per_message_burn_limit.js.map