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

import * as _m0 from "protobufjs/minimal";
import { createProtobufRpcClient } from "@cosmjs/stargate";
import { QueryParamsRequest, QueryParamsResponse, QueryCollectionRequest, QueryCollectionResponse, QueryCollectionListRequest, QueryCollectionListResponse, QueryClaimRequest, QueryClaimResponse, QueryClaimListRequest, QueryClaimListResponse, QueryDisputeRequest, QueryDisputeResponse, QueryDisputeListRequest, QueryDisputeListResponse, QueryIntentRequest, QueryIntentResponse, QueryIntentListRequest, QueryIntentListResponse } from "./query";
/** Query defines the gRPC querier service. */

export class QueryClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.params = this.params.bind(this);
    this.collection = this.collection.bind(this);
    this.collectionList = this.collectionList.bind(this);
    this.claim = this.claim.bind(this);
    this.claimList = this.claimList.bind(this);
    this.dispute = this.dispute.bind(this);
    this.disputeList = this.disputeList.bind(this);
    this.intent = this.intent.bind(this);
    this.intentList = this.intentList.bind(this);
  }
  params(request = {}) {
    const data = QueryParamsRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "Params", data);
    return promise.then(data => QueryParamsResponse.decode(new _m0.Reader(data)));
  }
  collection(request) {
    const data = QueryCollectionRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "Collection", data);
    return promise.then(data => QueryCollectionResponse.decode(new _m0.Reader(data)));
  }
  collectionList(request = {
    pagination: undefined
  }) {
    const data = QueryCollectionListRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "CollectionList", data);
    return promise.then(data => QueryCollectionListResponse.decode(new _m0.Reader(data)));
  }
  claim(request) {
    const data = QueryClaimRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "Claim", data);
    return promise.then(data => QueryClaimResponse.decode(new _m0.Reader(data)));
  }
  claimList(request = {
    pagination: undefined
  }) {
    const data = QueryClaimListRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "ClaimList", data);
    return promise.then(data => QueryClaimListResponse.decode(new _m0.Reader(data)));
  }
  dispute(request) {
    const data = QueryDisputeRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "Dispute", data);
    return promise.then(data => QueryDisputeResponse.decode(new _m0.Reader(data)));
  }
  disputeList(request = {
    pagination: undefined
  }) {
    const data = QueryDisputeListRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "DisputeList", data);
    return promise.then(data => QueryDisputeListResponse.decode(new _m0.Reader(data)));
  }
  intent(request) {
    const data = QueryIntentRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "Intent", data);
    return promise.then(data => QueryIntentResponse.decode(new _m0.Reader(data)));
  }
  intentList(request = {
    pagination: undefined
  }) {
    const data = QueryIntentListRequest.encode(request).finish();
    const promise = this.rpc.request("ixo.claims.v1beta1.Query", "IntentList", data);
    return promise.then(data => QueryIntentListResponse.decode(new _m0.Reader(data)));
  }
}
export const createRpcQueryExtension = base => {
  const rpc = createProtobufRpcClient(base);
  const queryService = new QueryClientImpl(rpc);
  return {
    params(request) {
      return queryService.params(request);
    },
    collection(request) {
      return queryService.collection(request);
    },
    collectionList(request) {
      return queryService.collectionList(request);
    },
    claim(request) {
      return queryService.claim(request);
    },
    claimList(request) {
      return queryService.claimList(request);
    },
    dispute(request) {
      return queryService.dispute(request);
    },
    disputeList(request) {
      return queryService.disputeList(request);
    },
    intent(request) {
      return queryService.intent(request);
    },
    intentList(request) {
      return queryService.intentList(request);
    }
  };
};