---@diagnostic disable: missing-return, lowercase-global
---@meta

---@class C_BlackMarket
C_BlackMarket = {
	--- Closes the Black Market window.
	--- Triggers events
	--- - BLACK_MARKET_CLOSE
	--- Details
	--- - While the black market UI is considered open, the server may notify the client about black market auction updates.
	--- - This function is called by FrameXML when the player manually closes the Black Market window.
	Close = function() end,

	---@alias itemType
	---| "Quest"
	---| "Mail"
	---| "Companion Pet"

	--- Returns information about the current "hot item" at the Black Market Auction House.
	--- @return string name item name; nil if no such auction exists
	--- @return string texture icon texture path
	--- @return number quantity amount of the item included in the auction
	--- @return itemType itemType
	--- @return boolean usable
	--- @return number level item level requirement
	--- @return string levelType
	--- @return string sellerName localized name of the NPC "selling" the item
	--- @return number minBid minimum amount of copper you can bid for this item
	--- @return number minIncrement minimum amount of copper you can increase your bid by
	--- @return number currBid the maximum current bid in copper
	--- @return boolean youHaveHighBid true if your bid on this item is currently the highest bid, false otherwise
	--- @return number numBids number of bids on this item
	--- @return number timeLeft token indicating remaining auction duration, 0 for completed auctions, larger values indicate larger remaining durations, for a localized text version use _G["AUCTION_TIME_LEFT" .. timeLeft]
	--- @return string link chat link of the item being auctioned
	--- @return number marketID black market auction ID of this auction
	--- @return number quality
	GetHotItem = function() end,

	--- Returns info for a Black Market auction.
	--- You can use `GetHotItem` to retrieve information about a "Hot Item!" auction picked by the server,
	--- `GetItemInfoByIndex` to iterate through all auctions, and `GetItemInfoByID` to retrieve information
	--- about specific auctions. These three functions have identical return values.
	--- @param marketID number - black market auction ID.
	--- @return string name - item name; nil if no such auction exists.
	--- @return string texture - icon texture path.
	--- @return number quantity - amount of the item included in the auction.
	--- @return itemType itemType - item type, e.g. "Quest", "Mail", or "Companion Pet".
	--- @return boolean usable
	--- @return number level - item level requirement.
	--- @return string levelType - e.g. "REQ_LEVEL_ABBR".
	--- @return string sellerName - localized name of the NPC "selling" the item.
	--- @return number minBid - minimum amount of copper you can bid for this item.
	--- @return number minIncrement - minimum amount of copper you must increase the current bid by.
	--- @return number currBid - the maximum current bid in copper.
	--- @return boolean youHaveHighBid - true if your bid on this item is currently the highest bid, false otherwise.
	--- @return number numBids - number of bids made on this item.
	--- @return number timeLeft - token indicating remaining auction duration, 0 for completed auctions, larger values indicate larger remaining durations. For a localized text version, use _G["AUCTION_TIME_LEFT" .. timeLeft].
	--- @return string link - chat link of the item being auctioned.
	--- @return number marketID - black market auction ID of this auction.
	--- @return number quality
	GetItemInfoByID = function(marketID) end,

	--- Returns info for a Black Market auction.
	--- You can use `GetHotItem` to retrieve information about a "Hot Item!" auction picked by the server,
	--- `GetItemInfoByIndex` to iterate through all auctions, and `GetItemInfoByID` to retrieve information
	--- about specific auctions. These three functions have identical return values.
	--- @param index number - black market auction index, ascending from 1 to C_BlackMarket.GetNumItems()
	--- @return string name - item name; nil if no such auction exists.
	--- @return string texture - icon texture path.
	--- @return number quantity - amount of the item included in the auction.
	--- @return itemType itemType - item type, e.g. "Quest", "Mail", or "Companion Pet".
	--- @return boolean usable
	--- @return number level - item level requirement.
	--- @return string levelType - e.g. "REQ_LEVEL_ABBR".
	--- @return string sellerName - localized name of the NPC "selling" the item.
	--- @return number minBid - minimum amount of copper you can bid for this item.
	--- @return number minIncrement - minimum amount of copper you must increase the current bid by.
	--- @return number currBid - the maximum current bid in copper.
	--- @return boolean youHaveHighBid - true if your bid on this item is currently the highest bid, false otherwise.
	--- @return number numBids - number of bids made on this item.
	--- @return number timeLeft - token indicating remaining auction duration, 0 for completed auctions, larger values indicate larger remaining durations. For a localized text version, use _G["AUCTION_TIME_LEFT" .. timeLeft].
	--- @return string link - chat link of the item being auctioned.
	--- @return number marketID - black market auction ID of this auction.
	--- @return number quality
	GetItemInfoByIndex = function(index) end,

	--- Returns the number of auctions on the Black Market Auction House.
	--- @return number numItems
	GetNumItems = function() end,

	--- Returns if the view is read-only.
	--- @return boolean viewOnly
	IsViewOnly = function() end,

	--- Places a bid on a black market auction.
	--- @param marketID number - black market auction ID (not line index!) to bid on
	--- @param bid number - bid amount, in copper
	ItemPlaceBid = function(marketID, bid) end,

	--- Requests updated black market auction information from the server.
	RequestItems = function() end,
}
