"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgClientImpl = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
var _tx = require("./tx");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
//@ts-nocheck
/** Msg defines the Msg service. */
var MsgClientImpl = exports.MsgClientImpl = /*#__PURE__*/function () {
  function MsgClientImpl(rpc) {
    (0, _classCallCheck2["default"])(this, MsgClientImpl);
    (0, _defineProperty2["default"])(this, "rpc", void 0);
    this.rpc = rpc;
    this.createCollection = this.createCollection.bind(this);
    this.submitClaim = this.submitClaim.bind(this);
    this.evaluateClaim = this.evaluateClaim.bind(this);
    this.disputeClaim = this.disputeClaim.bind(this);
    this.withdrawPayment = this.withdrawPayment.bind(this);
    this.updateCollectionState = this.updateCollectionState.bind(this);
    this.updateCollectionDates = this.updateCollectionDates.bind(this);
    this.updateCollectionPayments = this.updateCollectionPayments.bind(this);
    this.updateCollectionIntents = this.updateCollectionIntents.bind(this);
    this.claimIntent = this.claimIntent.bind(this);
    this.createClaimAuthorization = this.createClaimAuthorization.bind(this);
  }
  return (0, _createClass2["default"])(MsgClientImpl, [{
    key: "createCollection",
    value: function createCollection(request) {
      var data = _tx.MsgCreateCollection.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "CreateCollection", data);
      return promise.then(function (data) {
        return _tx.MsgCreateCollectionResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "submitClaim",
    value: function submitClaim(request) {
      var data = _tx.MsgSubmitClaim.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "SubmitClaim", data);
      return promise.then(function (data) {
        return _tx.MsgSubmitClaimResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "evaluateClaim",
    value: function evaluateClaim(request) {
      var data = _tx.MsgEvaluateClaim.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "EvaluateClaim", data);
      return promise.then(function (data) {
        return _tx.MsgEvaluateClaimResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "disputeClaim",
    value: function disputeClaim(request) {
      var data = _tx.MsgDisputeClaim.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "DisputeClaim", data);
      return promise.then(function (data) {
        return _tx.MsgDisputeClaimResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "withdrawPayment",
    value: function withdrawPayment(request) {
      var data = _tx.MsgWithdrawPayment.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "WithdrawPayment", data);
      return promise.then(function (data) {
        return _tx.MsgWithdrawPaymentResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateCollectionState",
    value: function updateCollectionState(request) {
      var data = _tx.MsgUpdateCollectionState.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "UpdateCollectionState", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateCollectionStateResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateCollectionDates",
    value: function updateCollectionDates(request) {
      var data = _tx.MsgUpdateCollectionDates.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "UpdateCollectionDates", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateCollectionDatesResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateCollectionPayments",
    value: function updateCollectionPayments(request) {
      var data = _tx.MsgUpdateCollectionPayments.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "UpdateCollectionPayments", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateCollectionPaymentsResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateCollectionIntents",
    value: function updateCollectionIntents(request) {
      var data = _tx.MsgUpdateCollectionIntents.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "UpdateCollectionIntents", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateCollectionIntentsResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "claimIntent",
    value: function claimIntent(request) {
      var data = _tx.MsgClaimIntent.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "ClaimIntent", data);
      return promise.then(function (data) {
        return _tx.MsgClaimIntentResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "createClaimAuthorization",
    value: function createClaimAuthorization(request) {
      var data = _tx.MsgCreateClaimAuthorization.encode(request).finish();
      var promise = this.rpc.request("ixo.claims.v1beta1.Msg", "CreateClaimAuthorization", data);
      return promise.then(function (data) {
        return _tx.MsgCreateClaimAuthorizationResponse.decode(new _m0.Reader(data));
      });
    }
  }]);
}();