import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

export class DaoProposalCondorcetQueryClient {
  constructor(client, contractAddress) {
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "proposal", async ({
      id
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        proposal: {
          id
        }
      });
    });
    _defineProperty(this, "config", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        config: {}
      });
    });
    _defineProperty(this, "dao", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        dao: {}
      });
    });
    _defineProperty(this, "info", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        info: {}
      });
    });
    _defineProperty(this, "nextProposalId", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        next_proposal_id: {}
      });
    });
    this.client = client;
    this.contractAddress = contractAddress;
    this.proposal = this.proposal.bind(this);
    this.config = this.config.bind(this);
    this.dao = this.dao.bind(this);
    this.info = this.info.bind(this);
    this.nextProposalId = this.nextProposalId.bind(this);
  }
}
export class DaoProposalCondorcetClient extends DaoProposalCondorcetQueryClient {
  constructor(client, sender, contractAddress) {
    super(client, contractAddress);
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "sender", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "propose", async ({
      choices
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        propose: {
          choices
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "vote", async ({
      proposalId,
      vote
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        vote: {
          proposal_id: proposalId,
          vote
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "execute", async ({
      proposalId
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        execute: {
          proposal_id: proposalId
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "close", async ({
      proposalId
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        close: {
          proposal_id: proposalId
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "setConfig", async ({
      closeProposalsOnExecutionFailure,
      minVotingPeriod,
      quorum,
      votingPeriod
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        set_config: {
          close_proposals_on_execution_failure: closeProposalsOnExecutionFailure,
          min_voting_period: minVotingPeriod,
          quorum,
          voting_period: votingPeriod
        }
      }, fee, memo, funds);
    });
    this.client = client;
    this.sender = sender;
    this.contractAddress = contractAddress;
    this.propose = this.propose.bind(this);
    this.vote = this.vote.bind(this);
    this.execute = this.execute.bind(this);
    this.close = this.close.bind(this);
    this.setConfig = this.setConfig.bind(this);
  }
}