import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
//@ts-nocheck

import * as _m0 from "protobufjs/minimal";
import { MsgAuthorizeCircuitBreaker, MsgAuthorizeCircuitBreakerResponse, MsgTripCircuitBreaker, MsgTripCircuitBreakerResponse, MsgResetCircuitBreaker, MsgResetCircuitBreakerResponse } from "./tx";
/** Msg defines the circuit Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.authorizeCircuitBreaker = this.authorizeCircuitBreaker.bind(this);
    this.tripCircuitBreaker = this.tripCircuitBreaker.bind(this);
    this.resetCircuitBreaker = this.resetCircuitBreaker.bind(this);
  }
  authorizeCircuitBreaker(request) {
    const data = MsgAuthorizeCircuitBreaker.encode(request).finish();
    const promise = this.rpc.request("cosmos.circuit.v1.Msg", "AuthorizeCircuitBreaker", data);
    return promise.then(data => MsgAuthorizeCircuitBreakerResponse.decode(new _m0.Reader(data)));
  }
  tripCircuitBreaker(request) {
    const data = MsgTripCircuitBreaker.encode(request).finish();
    const promise = this.rpc.request("cosmos.circuit.v1.Msg", "TripCircuitBreaker", data);
    return promise.then(data => MsgTripCircuitBreakerResponse.decode(new _m0.Reader(data)));
  }
  resetCircuitBreaker(request) {
    const data = MsgResetCircuitBreaker.encode(request).finish();
    const promise = this.rpc.request("cosmos.circuit.v1.Msg", "ResetCircuitBreaker", data);
    return promise.then(data => MsgResetCircuitBreakerResponse.decode(new _m0.Reader(data)));
  }
}