-- Shopkeeper Namespace Setup
-- Last Updated August 26, 2014
-- Written July 2014 by Dan Stone (@khaibit) - dankitymao@gmail.com
-- Released under terms in license accompanying this file.
-- Distribution without license is prohibited!

Shopkeeper = {}
Shopkeeper.name = "Shopkeeper"
Shopkeeper.version = "0.9.4"
Shopkeeper.locale = "en"
Shopkeeper.viewMode = "self"
Shopkeeper.isScanning = false
Shopkeeper.DataRows = {}
Shopkeeper.MiniDataRows = {}
  -- ScanResults, SelfSales and SearchTable have the following fields:
  -- 1: Buyer  2: Guild  3: Item Name  4: Item Icon
  -- 5: Quantity 6: UNIX Time  7: Price 8: Seller
  -- 9: Was a kiosk sale (true/false, maybe nil for older data)
Shopkeeper.ScanResults = {}
Shopkeeper.SelfSales = {}
Shopkeeper.SearchTable = {}
Shopkeeper.numEvents = {}
Shopkeeper.alertQueue = {}
Shopkeeper.curSort = {"time", "desc"}
Shopkeeper.uiFragment = {}

-- Sound table for mapping readable names to sound names
Shopkeeper.alertSounds = {
  [1] = {name = "None", sound = "No_Sound"},
  [2] = {name = "Add Guild Member", sound = "GuildRoster_Added"},
  [3] = {name = "Armor Glyph", sound = "Enchanting_ArmorGlyph_Placed"},
  [4] = {name = "Book Acquired", sound = "Book_Acquired"},
  [5] = {name = "Book Collection Completed", sound = "Book_Collection_Completed"},
  [6] = {name = "Boss Killed", sound = "SkillXP_BossKilled"},
  [7] = {name = "Charge Item", sound = "InventoryItem_ApplyCharge"},
  [8] = {name = "Completed Event", sound = "ScriptedEvent_Completion"},
  [9] = {name = "Dark Fissure Closed", sound = "SkillXP_DarkFissureClosed"},
  [10] = {name = "Emperor Coronated", sound = "Emperor_Coronated_Ebonheart"},
  [11] = {name = "Gate Closed", sound = "AvA_Gate_Closed"},
  [12] = {name = "Lockpicking Stress", sound = "Lockpicking_chamber_stress"},
  [13] = {name = "Mail Attachment", sound = "Mail_ItemSelected"},
  [14] = {name = "Mail Sent", sound = "Mail_Sent"},
  [15] = {name = "Money", sound = "Money_Transact"},
  [16] = {name = "Morph Ability", sound = "Ability_MorphPurchased"},
  [17] = {name = "Not Enough Gold", sound = "PlayerAction_NotEnoughMoney"},
  [18] = {name = "Not Junk", sound = "InventoryItem_NotJunk"},
  [19] = {name = "Not Ready", sound = "Ability_NotReady"},
  [20] = {name = "Objective Complete", sound = "Objective_Complete"},
  [21] = {name = "Open System Menu", sound = "System_Open"},
  [22] = {name = "Quest Abandoned", sound = "Quest_Abandon"},
  [23] = {name = "Quest Complete", sound = "Quest_Complete"},
  [24] = {name = "Quickslot Empty", sound = "Quickslot_Use_Empty"},
  [25] = {name = "Quickslot Open", sound = "Quickslot_Open"},
  [26] = {name = "Raid Life", sound = "Raid_Life_Display_Shown"},
  [27] = {name = "Remove Guild Member", sound = "GuildRoster_Removed"},
  [28] = {name = "Repair Item", sound = "InventoryItem_Repair"},
  [29] = {name = "Rune Removed", sound = "Enchanting_PotencyRune_Removed"},
  [30] = {name = "Skill Added", sound = "SkillLine_Added"},
  [31] = {name = "Skill Leveled", sound = "SkillLine_Leveled"},
  [32] = {name = "Stat Purchase", sound = "Stats_Purchase"},
  [33] = {name = "Synergy Ready", sound = "Ability_Synergy_Ready_Sound"},
}