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 Cw4GroupQueryClient {
  constructor(client, contractAddress) {
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "admin", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        admin: {}
      });
    });
    _defineProperty(this, "totalWeight", async ({
      atHeight
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        total_weight: {
          at_height: atHeight
        }
      });
    });
    _defineProperty(this, "listMembers", async ({
      limit,
      startAfter
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        list_members: {
          limit,
          start_after: startAfter
        }
      });
    });
    _defineProperty(this, "member", async ({
      addr,
      atHeight
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        member: {
          addr,
          at_height: atHeight
        }
      });
    });
    _defineProperty(this, "hooks", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        hooks: {}
      });
    });
    this.client = client;
    this.contractAddress = contractAddress;
    this.admin = this.admin.bind(this);
    this.totalWeight = this.totalWeight.bind(this);
    this.listMembers = this.listMembers.bind(this);
    this.member = this.member.bind(this);
    this.hooks = this.hooks.bind(this);
  }
}
export class Cw4GroupClient extends Cw4GroupQueryClient {
  constructor(client, sender, contractAddress) {
    super(client, contractAddress);
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "sender", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "updateAdmin", async ({
      admin
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_admin: {
          admin
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "updateMembers", async ({
      add,
      remove
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_members: {
          add,
          remove
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "addHook", async ({
      addr
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        add_hook: {
          addr
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "removeHook", async ({
      addr
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        remove_hook: {
          addr
        }
      }, fee, memo, funds);
    });
    this.client = client;
    this.sender = sender;
    this.contractAddress = contractAddress;
    this.updateAdmin = this.updateAdmin.bind(this);
    this.updateMembers = this.updateMembers.bind(this);
    this.addHook = this.addHook.bind(this);
    this.removeHook = this.removeHook.bind(this);
  }
}