/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import BN from "bn.js";
import { ContractOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import {
  Callback,
  PayableTransactionObject,
  NonPayableTransactionObject,
  BlockType,
  ContractEventLog,
  BaseContract,
} from "./types";

interface EventOptions {
  filter?: object;
  fromBlock?: BlockType;
  topics?: string[];
}

export type ProposalCreated = ContractEventLog<{
  _id: string;
  _proposal: [
    string,
    [string, string, string, string, string, string, string, string],
    [string, string, string],
    boolean
  ];
  0: string;
  1: [
    string,
    [string, string, string, string, string, string, string, string],
    [string, string, string],
    boolean
  ];
}>;
export type QuorumReached = ContractEventLog<{
  id: string;
  0: string;
}>;
export type VetoOccurred = ContractEventLog<{
  id: string;
  sender: string;
  0: string;
  1: string;
}>;

export interface IMembershipVoting extends BaseContract {
  constructor(
    jsonInterface: any[],
    address?: string,
    options?: ContractOptions
  ): IMembershipVoting;
  clone(): IMembershipVoting;
  methods: {
    execute(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<void>;

    getProposal(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<
      [
        string,
        [string, string, string, string, string, string, string, string],
        [string, string, string],
        boolean
      ]
    >;

    getProposalStats(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<[string, string, string, string, string]>;

    getVetosNumber(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<string>;

    getVetosPercentage(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<string>;

    getVotingWeightInfo(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<
      [boolean, boolean, [string, string, string, string]]
    >;

    veto(_proposalId: number | string | BN): NonPayableTransactionObject<void>;

    voteAgainst(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<void>;

    voteFor(
      _proposalId: number | string | BN
    ): NonPayableTransactionObject<void>;
  };
  events: {
    ProposalCreated(cb?: Callback<ProposalCreated>): EventEmitter;
    ProposalCreated(
      options?: EventOptions,
      cb?: Callback<ProposalCreated>
    ): EventEmitter;

    QuorumReached(cb?: Callback<QuorumReached>): EventEmitter;
    QuorumReached(
      options?: EventOptions,
      cb?: Callback<QuorumReached>
    ): EventEmitter;

    VetoOccurred(cb?: Callback<VetoOccurred>): EventEmitter;
    VetoOccurred(
      options?: EventOptions,
      cb?: Callback<VetoOccurred>
    ): EventEmitter;

    allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
  };

  once(event: "ProposalCreated", cb: Callback<ProposalCreated>): void;
  once(
    event: "ProposalCreated",
    options: EventOptions,
    cb: Callback<ProposalCreated>
  ): void;

  once(event: "QuorumReached", cb: Callback<QuorumReached>): void;
  once(
    event: "QuorumReached",
    options: EventOptions,
    cb: Callback<QuorumReached>
  ): void;

  once(event: "VetoOccurred", cb: Callback<VetoOccurred>): void;
  once(
    event: "VetoOccurred",
    options: EventOptions,
    cb: Callback<VetoOccurred>
  ): void;
}
