import { AuctionHouseBuildersClient } from './AuctionHouseBuildersClient.mjs';
import { AuctionHousePdasClient } from './AuctionHousePdasClient.mjs';
import { createBidOperation } from './operations/createBid.mjs';
import { directBuyOperation } from './operations/directBuy.mjs';
import { cancelBidOperation } from './operations/cancelBid.mjs';
import { cancelListingOperation } from './operations/cancelListing.mjs';
import { createAuctionHouseOperation } from './operations/createAuctionHouse.mjs';
import { depositToBuyerAccountOperation } from './operations/depositToBuyerAccount.mjs';
import { executeSaleOperation } from './operations/executeSale.mjs';
import { findAuctionHouseByAddressOperation } from './operations/findAuctionHouseByAddress.mjs';
import { findAuctionHouseByCreatorAndMintOperation } from './operations/findAuctionHouseByCreatorAndMint.mjs';
import { findBidByReceiptOperation } from './operations/findBidByReceipt.mjs';
import { findBidByTradeStateOperation } from './operations/findBidByTradeState.mjs';
import { findBidsByPublicKeyFieldOperation } from './operations/findBidsByPublicKeyField.mjs';
import { findListingByTradeStateOperation } from './operations/findListingByTradeState.mjs';
import { findListingByReceiptOperation } from './operations/findListingByReceipt.mjs';
import { findListingsOperation } from './operations/findListings.mjs';
import { findPurchaseByTradeStateOperation } from './operations/findPurchaseByTradeState.mjs';
import { findPurchaseByReceiptOperation } from './operations/findPurchaseByReceipt.mjs';
import { findPurchasesByPublicKeyFieldOperation } from './operations/findPurchasesByPublicKeyField.mjs';
import { getBuyerBalanceOperation } from './operations/getBuyerBalance.mjs';
import { createListingOperation } from './operations/createListing.mjs';
import { loadBidOperation } from './operations/loadBid.mjs';
import { loadListingOperation } from './operations/loadListing.mjs';
import { loadPurchaseOperation } from './operations/loadPurchase.mjs';
import { directSellOperation } from './operations/directSell.mjs';
import { updateAuctionHouseOperation } from './operations/updateAuctionHouse.mjs';
import { withdrawFromBuyerAccountOperation } from './operations/withdrawFromBuyerAccount.mjs';
import { withdrawFromFeeAccountOperation } from './operations/withdrawFromFeeAccount.mjs';
import { withdrawFromTreasuryAccountOperation } from './operations/withdrawFromTreasuryAccount.mjs';

/**
 * This is a client for the Auction House module.
 *
 * It enables us to interact with the Auction House program in order to
 * create and update Auction House to configure a marketplace as well to allow
 * users to list, bid and execute sales.
 *
 * You may access this client via the `auctionHouse()` method of your `Metaplex` instance.
 *
 * ```ts
 * const auctionHouseClient = metaplex.auctionHouse();
 * ```
 *
 * @example
 * You can create a new Auction House with minimum input like so.
 * By default, the current identity of the Metaplex instance will be
 * the authority of the Auction House.
 *
 * ```ts
 * const { auctionHouse } = await metaplex
 *   .auctionHouse()
 *   .create({
 *     sellerFeeBasisPoints: 500, // 5% royalties
 *   };
 * ```
 *
 * @see {@link AuctionHouse} The `AuctionHouse` model
 * @group Modules
 */
class AuctionHouseClient {
  constructor(metaplex) {
    this.metaplex = metaplex;
  }

  /**
   * You may use the `builders()` client to access the
   * underlying Transaction Builders of this module.
   *
   * ```ts
   * const buildersClient = metaplex.auctions().builders();
   * ```
   */
  builders() {
    return new AuctionHouseBuildersClient(this.metaplex);
  }

  /**
   * You may use the `pdas()` client to build PDAs related to this module.
   *
   * ```ts
   * const pdasClient = metaplex.auctionHouse().pdas();
   * ```
   */
  pdas() {
    return new AuctionHousePdasClient(this.metaplex);
  }

  /** {@inheritDoc createBidOperation} */
  bid(input, options) {
    return this.metaplex.operations().execute(createBidOperation(input), options);
  }

  /** {@inheritDoc buyOperation} */
  buy(input, options) {
    return this.metaplex.operations().execute(directBuyOperation(input), options);
  }

  /** {@inheritDoc cancelBidOperation} */
  cancelBid(input, options) {
    return this.metaplex.operations().execute(cancelBidOperation(input), options);
  }

  /** {@inheritDoc cancelListingOperation} */
  cancelListing(input, options) {
    return this.metaplex.operations().execute(cancelListingOperation(input), options);
  }

  /** {@inheritDoc createAuctionHouseOperation} */
  create(input, options) {
    return this.metaplex.operations().execute(createAuctionHouseOperation(input), options);
  }

  /** {@inheritDoc depositToBuyerAccountOperation} */
  depositToBuyerAccount(input, options) {
    return this.metaplex.operations().execute(depositToBuyerAccountOperation(input), options);
  }

  /** {@inheritDoc executeSaleOperation} */
  executeSale(input, options) {
    return this.metaplex.operations().execute(executeSaleOperation(input), options);
  }

  /** {@inheritDoc findAuctionHouseByAddressOperation} */
  findByAddress(input, options) {
    return this.metaplex.operations().execute(findAuctionHouseByAddressOperation(input), options);
  }

  /** {@inheritDoc findAuctionHouseByCreatorAndMintOperation} */
  findByCreatorAndMint(input, options) {
    return this.metaplex.operations().execute(findAuctionHouseByCreatorAndMintOperation(input), options);
  }

  /** {@inheritDoc findBidByReceiptOperation} */
  findBidByReceipt(input, options) {
    return this.metaplex.operations().execute(findBidByReceiptOperation(input), options);
  }

  /** {@inheritDoc findBidByTradeStateOperation} */
  findBidByTradeState(input, options) {
    return this.metaplex.operations().execute(findBidByTradeStateOperation(input), options);
  }

  /** {@inheritDoc findBidsByPublicKeyFieldOperation} */
  findBidsBy(input, options) {
    return this.metaplex.operations().execute(findBidsByPublicKeyFieldOperation(input), options);
  }

  /** {@inheritDoc findListingByTradeStateOperation} */
  findListingByTradeState(input, options) {
    return this.metaplex.operations().execute(findListingByTradeStateOperation(input), options);
  }

  /** {@inheritDoc findListingByReceiptOperation} */
  findListingByReceipt(input, options) {
    return this.metaplex.operations().execute(findListingByReceiptOperation(input), options);
  }

  /** {@inheritDoc findListingsOperation} */
  findListings(input, options) {
    return this.metaplex.operations().execute(findListingsOperation(input), options);
  }

  /** {@inheritDoc findPurchaseByTradeStateOperation} */
  findPurchaseByTradeState(input, options) {
    return this.metaplex.operations().execute(findPurchaseByTradeStateOperation(input), options);
  }

  /** {@inheritDoc findPurchaseByReceiptOperation} */
  findPurchaseByReceipt(input, options) {
    return this.metaplex.operations().execute(findPurchaseByReceiptOperation(input), options);
  }

  /** {@inheritDoc findPurchasesByPublicKeyFieldOperation} */
  findPurchasesBy(input, options) {
    return this.metaplex.operations().execute(findPurchasesByPublicKeyFieldOperation(input), options);
  }

  /** {@inheritDoc getBuyerBalanceOperation} */
  getBuyerBalance(input, options) {
    return this.metaplex.operations().execute(getBuyerBalanceOperation(input), options);
  }

  /** {@inheritDoc createListingOperation} */
  list(input, options) {
    return this.metaplex.operations().execute(createListingOperation(input), options);
  }

  /** {@inheritDoc loadBidOperation} */
  loadBid(input, options) {
    return this.metaplex.operations().execute(loadBidOperation(input), options);
  }

  /** {@inheritDoc loadListingOperation} */
  loadListing(input, options) {
    return this.metaplex.operations().execute(loadListingOperation(input), options);
  }

  /** {@inheritDoc loadPurchaseOperation} */
  loadPurchase(input, options) {
    return this.metaplex.operations().execute(loadPurchaseOperation(input), options);
  }

  /** {@inheritDoc saleOperation} */
  sell(input, options) {
    return this.metaplex.operations().execute(directSellOperation(input), options);
  }

  /** {@inheritDoc updateAuctionHouseOperation} */
  update(input, options) {
    return this.metaplex.operations().execute(updateAuctionHouseOperation(input), options);
  }

  /** {@inheritDoc withdrawFromBuyerAccountOperation} */
  withdrawFromBuyerAccount(input, options) {
    return this.metaplex.operations().execute(withdrawFromBuyerAccountOperation(input), options);
  }

  /** {@inheritDoc withdrawFromFeeAccountOperation} */
  withdrawFromFeeAccount(input, options) {
    return this.metaplex.operations().execute(withdrawFromFeeAccountOperation(input), options);
  }

  /** {@inheritDoc withdrawFromTreasuryAccountOperation} */
  withdrawFromTreasuryAccount(input, options) {
    return this.metaplex.operations().execute(withdrawFromTreasuryAccountOperation(input), options);
  }
}

export { AuctionHouseClient };
//# sourceMappingURL=AuctionHouseClient.mjs.map
