-- Functions
local _G = getfenv(0)

local AtlasLoot = _G.AtlasLoot
local Faction = {}
AtlasLoot.Data.Faction = Faction

local AL = AtlasLoot.Locales

Faction.FACTION_KEY = {
	-- Classic
	[47] = "Ironforge",
	[54] = "Gnomeregan",
	[59] = "Thorium Brotherhood",
	[68] = "Undercity",
	[69] = "Darnassus",
	[72] = "Stormwind",
	[76] = "Orgrimmar",
	[81] = "Thunder Bluff",
	[87] = "Bloodsail Buccaneers",
	[529] = "Argent Dawn",
	[530] = "Darkspear Trolls",
	[576] = "Timbermaw Hold",
	[589] = "Wintersaber Trainers",
	[609] = "Cenarion Circle",
	[910] = "Brood of Nozdormu",
	-- BC
	[911] = "Silvermoon City",
	[922] = "Tranquillien",
	[930] = "Exodar",
	[932] = "The Aldor",
	[933] = "The Consortium",
	[934] = "The Scryers",
	[935] = "The Sha'tar",
	[941] = "The Mag'har",
	[942] = "Cenarion Expedition",
	[946] = "Honor Hold",
	[947] = "Thrallmar",
	[967] = "The Violet Eye",
	[970] = "Sporeggar",
	[978] = "Kurenai",
	[989] = "Keepers of Time",
	[990] = "The Scale of the Sands",
	[1011] = "Lower City",
	[1012] = "Ashtongue Deathsworn",
	[1015] = "Netherwing",
	[1031] = "Sha'tari Skyguard",
	[1038] = "Ogri'la",
	[1077] = "Shattered Sun Offensive",
	-- WotLK
	[1037] = "Alliance Vanguard",
	[1052] = "Horde Expedition",
	[1073] = "The Kalu'ak",
	[1090] = "Kirin Tor",
	[1091] = "The Wyrmrest Accord",
	[1094] = "The Silver Covenant",
	[1098] = "Knights of the Ebon Blade",
	[1104] = "Frenzyheart Tribe",
	[1105] = "The Oracles",
	[1106] = "Argent Crusade",
	[1119] = "The Sons of Hodir",
	[1124] = "The Sunreavers",
	[1156] = "The Ashen Verdict",
	-- Cata
	[1133] = "Bilgewater Cartel",
	[1134] = "Gilneas",
	[1135] = "The Earthen Ring",
	[1158] = "Guardians of Hyjal",
	[1171] = "Therazane",
	[1172] = "Dragonmaw Clan",
	[1173] = "Ramkahen",
	[1174] = "Wildhammer Clan",
	[1177] = "Baradin's Wardens",
	[1178] = "Hellscream's Reach",
	[1204] = "Avengers of Hyjal",
	-- MoP
	[1269] = "Golden Lotus",
	[1270] = "Shado-Pan",
	[1271] = "Order of the Cloud Serpent",
	[1272] = "The Tillers",
	[1302] = "The Anglers",
	[1337] = "The Klaxxi",
	[1341] = "The August Celestials",
	[1345] = "The Lorewalkers",
	[1352] = "Huojin Pandaren",
	[1353] = "Tushui Pandaren",
	[1358] = "Nat Pagle",
	[1375] = "Dominance Offensive",
	[1376] = "Operation: Shieldwall",
	[1387] = "Kirin Tor Offensive",
	[1388] = "Sunreaver Onslaught",
	[1435] = "Shado-Pan Assault",
	[1492] = "Emperor Shaohao",
	-- WoD
	[1445] = "Frostwolf Orcs",
	[1515] = "Arakkoa Outcasts",
	[1681] = "Vol'jin's Spear",
	[1682] = "Wrynn's Vanguard",
	[1708] = "Laughing Skull Orcs",
	[1710] = "Sha'tari Defense",
	[1711] = "Steamwheedle Preservation Society",
	[1731] = "Council of Exarchs",
	[1847] = "Hand of the Prophet",
	[1848] = "Vol'jin's Headhunters",
	[1849] = "Order of the Awakened",
	[1850] = "The Saberstalkers",
	-- Legion
	[1828] = "Highmountain Tribe",
	[1859] = "The Nightfallen",
	[1883] = "Dreamweavers",
	[1894] = "The Wardens",
	[1900] = "Court of Farondis",
	[1948] = "Valarjar",
	[2045] = "Armies of Legionfall",
	[2165] = "Army of the Light",
	[2170] = "Argussian Reach",
	-- BfA
	[2164] = "Champions of Azeroth",
	[2163] = "Tortollan Seekers",
	[2159] = "7th Legion",
	[2161] = "Order of Embers",
	[2160] = "Proudmoore Admiralty",
	[2162] = "Storm's Wake",
	[2156] = "Talanji's Expedition",
	[2157] = "The Honorbound",
	[2158] = "Voldunai",
	[2103] = "Zandalari Empire",
	[2391] = "Rustbolt Resistance",
	[2415] = "Rajani ",
	[2417] = "Uldum Accord",
	[2373] = "The Unshackled",
	[2400] = "Waveblade Ankoan",
	-- Shadowlands
	[2407] = "The Ascended",
	[2410] = "The Undying Army",
	[2413] = "Court of Harvesters",
	[2432] = "Ve'nari",
	[2465] = "The Wild Hunt",
	[2470] = "Death's Advance",
	[2472] = "The Archivists' Codex",
	[2478] = "The Enlightened",
	-- Dragonflight
	[2503] = "Maruuk Centaur",
	[2507] = "Dragonscale Expedition",
	[2510] = "Valdrakken Accord",
	[2511] = "Iskaara Tuskarr",
	[2564] = "Loamm Niffen",
	[2574] = "Dream Wardens",
	[2517] = "Wrathion",
	[2518] = "Sabellian",
	[2526] = "Winterpelt Furbolg",
	[2550] = "Cobalt Assembly",
	-- TWW
	[2590] = "Council of Dornogal",
	[2594] = "The Assembly of the Deeps",
	[2570] = "Hallowfall Arathi",
	[2600] = "The Severed Threads",
	[2653] = "The Cartels of Undermine",
	[2673] = "Bilgewater Cartel",
	[2675] = "Blackwater Cartel",
	[2677] = "Steamwheedle Cartel",
	[2671] = "Venture Company",
	[2669] = "Darkfuse Solutions",
	[2685] = "Gallagio Loyalty Rewards Club",
	[2688] = "Flame's Radiance",
}

Faction.FriendshipRanks = {
	-- Court of Night
	[2464] = {
		[1] = FACTION_STANDING_LABEL4,
		[2] = FACTION_STANDING_LABEL5,
		[3] = FACTION_STANDING_LABEL6,
		[4] = FACTION_STANDING_LABEL7,
		[5] = FACTION_STANDING_LABEL8,
	},
	-- The Archivists' Codex
	[2472] = {
		[1] = AL["Tier 1"],
		[2] = AL["Tier 2"],
		[3] = AL["Tier 3"],
		[4] = AL["Tier 4"],
		[5] = AL["Tier 5"],
		[6] = AL["Tier 6"],
	},
	-- Ve'nari
	[2432] = {
		[1] = AL["Dubious"],
		[2] = AL["Apprehensive"],
		[3] = AL["Tentative"],
		[4] = AL["Ambivalent"],
		[5] = AL["Cordial"],
		[6] = AL["Appreciative"],
	},
	-- Wrathion
	[2517] = {
		[1] = AL["Acquaintance"],
		[2] = AL["Cohort"],
		[3] = AL["Ally"],
		[4] = AL["Fang"],
		[5] = AL["Friend"],
		[6] = AL["True Friend"],
	},
	-- Sabellian
	[2518] = {
		[1] = AL["Acquaintance"],
		[2] = AL["Cohort"],
		[3] = AL["Ally"],
		[4] = AL["Fang"],
		[5] = AL["Friend"],
		[6] = AL["True Friend"],
	},
	-- Artisan's Consortium
	[2544] = {
		[1] = AL["Neutral"],
		[2] = AL["Preferred"],
		[3] = AL["Respected"],
		[4] = AL["Valued"],
		[5] = AL["Esteemed"],
	},
	-- Cobalt Assembly
	[2550] = {
		[1] = AL["Empty"],
		[2] = AL["Low"],
		[3] = AL["Medium"],
		[4] = AL["High"],
		[5] = AL["Maximum"],
	},
}
