//@ts-nocheck
import { Long, isSet } from "../../../helpers";
import * as _m0 from "protobufjs/minimal";
function createBaseInitializeNftContract() {
  return {
    NftContractCodeId: Long.UZERO,
    NftMinterAddress: ""
  };
}
export const InitializeNftContract = {
  encode(message, writer = _m0.Writer.create()) {
    if (!message.NftContractCodeId.isZero()) {
      writer.uint32(8).uint64(message.NftContractCodeId);
    }
    if (message.NftMinterAddress !== "") {
      writer.uint32(18).string(message.NftMinterAddress);
    }
    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 = createBaseInitializeNftContract();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.NftContractCodeId = reader.uint64();
          break;
        case 2:
          message.NftMinterAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      NftContractCodeId: isSet(object.NftContractCodeId) ? Long.fromValue(object.NftContractCodeId) : Long.UZERO,
      NftMinterAddress: isSet(object.NftMinterAddress) ? String(object.NftMinterAddress) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.NftContractCodeId !== undefined && (obj.NftContractCodeId = (message.NftContractCodeId || Long.UZERO).toString());
    message.NftMinterAddress !== undefined && (obj.NftMinterAddress = message.NftMinterAddress);
    return obj;
  },
  fromPartial(object) {
    var _object$NftMinterAddr;
    const message = createBaseInitializeNftContract();
    message.NftContractCodeId = object.NftContractCodeId !== undefined && object.NftContractCodeId !== null ? Long.fromValue(object.NftContractCodeId) : Long.UZERO;
    message.NftMinterAddress = (_object$NftMinterAddr = object.NftMinterAddress) !== null && _object$NftMinterAddr !== void 0 ? _object$NftMinterAddr : "";
    return message;
  }
};