"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.registry = exports.load = exports.MessageComposer = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _tx = require("./tx");
var registry = [["/mars.incentives.v1beta1.MsgCreateSchedule", _tx.MsgCreateSchedule], ["/mars.incentives.v1beta1.MsgTerminateSchedules", _tx.MsgTerminateSchedules]];
exports.registry = registry;
var load = function load(protoRegistry) {
  registry.forEach(function (_ref) {
    var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
      typeUrl = _ref2[0],
      mod = _ref2[1];
    protoRegistry.register(typeUrl, mod);
  });
};
exports.load = load;
var MessageComposer = {
  encoded: {
    createSchedule: function createSchedule(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgCreateSchedule",
        value: _tx.MsgCreateSchedule.encode(value).finish()
      };
    },
    terminateSchedules: function terminateSchedules(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgTerminateSchedules",
        value: _tx.MsgTerminateSchedules.encode(value).finish()
      };
    }
  },
  withTypeUrl: {
    createSchedule: function createSchedule(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgCreateSchedule",
        value: value
      };
    },
    terminateSchedules: function terminateSchedules(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgTerminateSchedules",
        value: value
      };
    }
  },
  fromPartial: {
    createSchedule: function createSchedule(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgCreateSchedule",
        value: _tx.MsgCreateSchedule.fromPartial(value)
      };
    },
    terminateSchedules: function terminateSchedules(value) {
      return {
        typeUrl: "/mars.incentives.v1beta1.MsgTerminateSchedules",
        value: _tx.MsgTerminateSchedules.fromPartial(value)
      };
    }
  }
};
exports.MessageComposer = MessageComposer;