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

---@param container number Index of one of the player's bags or other containers.
---@param slot number Index of an item slot within the container.
---@param target string? A unit to be used as target for the action.
---@param reagentBankAccessible boolean? Indicates if the reagent bank is accessible right now.
---Activate (as with right-clicking) an item in one of the player's bags.
---Has the same effect as right-clicking an item in the default UI; therefore, results may vary by context.
---In cases of conflict, conditions listed first override those below:
---1. If the bank, guild bank or reagent bank UI is open, moves the item into the bank, guild bank or reagent bank (or if the item is in the bank, guild bank or reagent bank, moves it into the player's inventory).
---2. If the trade UI is open, puts the item into the first available trade slot (or if the item is soulbound, into the "will not be traded" slot).
---3. If the merchant UI is open and not in repair mode, attempts to sell the item to the merchant.
---4. If the Send Mail UI is open, puts the item into the first available slot for message attachments.
---5. If an item is readable (e.g. Lament of the Highborne), opens it for reading.
---6. If an item is lootable (e.g. Magically Wrapped Gift), opens it for looting.
---7. If an item can be equipped, attempts to equip the item (placing any currently equipped item of the same type into the container slot used).
---8. If an item has a "Use:" effect, activates said effect. Under this condition only, the function is protected and can only be called by the Blizzard UI.
---If none of the above conditions are true, nothing happens.
function UseContainerItem(container, slot, target, reagentBankAccessible) end
