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 DaoMigratorQueryClient {
  constructor(client, contractAddress) {
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "config", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        config: {}
      });
    });
    _defineProperty(this, "proposal", async ({
      proposalId
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        proposal: {
          proposal_id: proposalId
        }
      });
    });
    _defineProperty(this, "listProposals", async ({
      limit,
      startAfter
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        list_proposals: {
          limit,
          start_after: startAfter
        }
      });
    });
    _defineProperty(this, "reverseProposals", async ({
      limit,
      startBefore
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        reverse_proposals: {
          limit,
          start_before: startBefore
        }
      });
    });
    _defineProperty(this, "getVote", async ({
      proposalId,
      voter
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        get_vote: {
          proposal_id: proposalId,
          voter
        }
      });
    });
    _defineProperty(this, "listVotes", async ({
      limit,
      proposalId,
      startAfter
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        list_votes: {
          limit,
          proposal_id: proposalId,
          start_after: startAfter
        }
      });
    });
    _defineProperty(this, "proposalCount", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        proposal_count: {}
      });
    });
    _defineProperty(this, "proposalCreationPolicy", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        proposal_creation_policy: {}
      });
    });
    _defineProperty(this, "proposalHooks", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        proposal_hooks: {}
      });
    });
    _defineProperty(this, "voteHooks", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        vote_hooks: {}
      });
    });
    _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.config = this.config.bind(this);
    this.proposal = this.proposal.bind(this);
    this.listProposals = this.listProposals.bind(this);
    this.reverseProposals = this.reverseProposals.bind(this);
    this.getVote = this.getVote.bind(this);
    this.listVotes = this.listVotes.bind(this);
    this.proposalCount = this.proposalCount.bind(this);
    this.proposalCreationPolicy = this.proposalCreationPolicy.bind(this);
    this.proposalHooks = this.proposalHooks.bind(this);
    this.voteHooks = this.voteHooks.bind(this);
    this.dao = this.dao.bind(this);
    this.info = this.info.bind(this);
    this.nextProposalId = this.nextProposalId.bind(this);
  }
}
export class DaoMigratorClient extends DaoMigratorQueryClient {
  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 ({
      description,
      msgs,
      proposer,
      title
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        propose: {
          description,
          msgs,
          proposer,
          title
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "vote", async ({
      proposalId,
      rationale,
      vote
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        vote: {
          proposal_id: proposalId,
          rationale,
          vote
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "updateRationale", async ({
      proposalId,
      rationale
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_rationale: {
          proposal_id: proposalId,
          rationale
        }
      }, 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, "updateConfig", async ({
      allowRevoting,
      closeProposalOnExecutionFailure,
      dao,
      maxVotingPeriod,
      minVotingPeriod,
      onlyMembersExecute,
      threshold
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_config: {
          allow_revoting: allowRevoting,
          close_proposal_on_execution_failure: closeProposalOnExecutionFailure,
          dao,
          max_voting_period: maxVotingPeriod,
          min_voting_period: minVotingPeriod,
          only_members_execute: onlyMembersExecute,
          threshold
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "updatePreProposeInfo", async ({
      info
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_pre_propose_info: {
          info
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "addProposalHook", async ({
      address
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        add_proposal_hook: {
          address
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "removeProposalHook", async ({
      address
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        remove_proposal_hook: {
          address
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "addVoteHook", async ({
      address
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        add_vote_hook: {
          address
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "removeVoteHook", async ({
      address
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        remove_vote_hook: {
          address
        }
      }, 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.updateRationale = this.updateRationale.bind(this);
    this.execute = this.execute.bind(this);
    this.close = this.close.bind(this);
    this.updateConfig = this.updateConfig.bind(this);
    this.updatePreProposeInfo = this.updatePreProposeInfo.bind(this);
    this.addProposalHook = this.addProposalHook.bind(this);
    this.removeProposalHook = this.removeProposalHook.bind(this);
    this.addVoteHook = this.addVoteHook.bind(this);
    this.removeVoteHook = this.removeVoteHook.bind(this);
  }
}