local factionGroup = UnitFactionGroup("player")

local siegeID = nil
local motherID = nil

if factionGroup == "Horde" then
    siegeID = 464256
    motherID = 467555
elseif factionGroup == "Alliance" then
    siegeID = 445418
    motherID = 467553
else
    print("Warning: Unknown faction detected! Tell The Addon Author: M+ Dungeon Teleports.")
end

-- MARK: Season 2 Portals
MDT_Season2Row1 = {
    {icon = "Interface\\Icons\\inv_achievement_dungeon_cinderbrewmeadery", spellID = 445440, name = "BREW"}, 
    {icon = "Interface\\Icons\\inv_achievement_dungeon_darkflamecleft", spellID = 445441, name = "DFC"}, 
    {icon = "Interface\\Icons\\inv_achievement_dungeon_prioryofthesacredflame", spellID = 445444, name = "PSF"}, 
    {icon = "Interface\\Icons\\inv_achievement_dungeon_rookery", spellID = 445443, name = "ROOK"} 
}
MDT_Season2Row2 = {
    {icon = "Interface\\Icons\\inv_achievement_dungeon_waterworks", spellID = 1216786, name = "FLOOD"},
    {icon = "Interface\\Icons\\achievement_dungeon_kezan", spellID = motherID, name = "ML"},
    {icon = "Interface\\Icons\\achievement_dungeon_theatreofpain", spellID = 354467, name = "TOP"},
    {icon = "Interface\\Icons\\achievement_boss_mechagon", spellID = 373274, name = "WORK"}
}
-- MARK: Season 1 Portals
MDT_Season1Row1 = {
    {icon = "Interface\\Icons\\inv_achievement_dungeon_arak-ara", spellID = 445417, name = "ARAK"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_cityofthreads", spellID = 445416, name = "COT"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_dawnbreaker", spellID = 445414, name = "DAWN"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_stonevault", spellID = 445269, name = "SV"}
}
MDT_Season1Row2 = {
    {icon = "Interface\\Icons\\achievement_dungeon_mistsoftirnascithe", spellID = 354464, name = "MISTS"},
    {icon = "Interface\\Icons\\achievement_dungeon_theneroticwake", spellID = 354462, name = "NW"},
    {icon = "Interface\\Icons\\achievement_dungeon_siegeofboralus", spellID = siegeID, name = "SIEGE"},
    {icon = "Interface\\Icons\\achievement_dungeon_grimbatol", spellID = 445424, name = "GB"}
}
-- MARK: Portal Library
-- The War Within
MDT_PL_TWW = {
    {icon = "Interface\\Icons\\inv_achievement_dungeon_arak-ara", spellID = 445417, name = "ARAK"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_cinderbrewmeadery", spellID = 445440, name = "BREW"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_cityofthreads", spellID = 445416, name = "COT"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_darkflamecleft", spellID = 445441, name = "DFC"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_dawnbreaker", spellID = 445414, name = "DAWN"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_waterworks", spellID = 1216786, name = "FLOOD"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_prioryofthesacredflame", spellID = 445444, name = "PSF"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_rookery", spellID = 445443, name = "ROOK"},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_stonevault", spellID = 445269, name = "SV"}
}
-- Dragonflight
MDT_PL_DF = {
    {icon = "Interface\\Icons\\achievement_dungeon_dragonacademy", spellID = 393273, name = "AA"},
    {icon = "Interface\\Icons\\achievement_dungeon_arcanevaults", spellID = 393279, name = "AV"},
    {icon = "Interface\\Icons\\achievement_dungeon_brackenhidehollow", spellID = 393267, name = "BH"},
    {icon = "Interface\\Icons\\achievement_dungeon_hallsofinfusion", spellID = 393283, name = "HOI"},
    {icon = "Interface\\Icons\\achievement_dungeon_neltharus", spellID = 393276, name = "NELTH"},
    {icon = "Interface\\Icons\\achievement_dungeon_centaurplains", spellID = 393262, name = "NO"},
    {icon = "Interface\\Icons\\achievement_dungeon_lifepools", spellID = 393256, name = "RLP"},
    {icon = "Interface\\Icons\\achievement_dungeon_uldaman", spellID = 393222, name = "ULD"},
    {icon = "Interface\\Icons\\achievement_dungeon_dawnoftheinfinite", spellID = 424197, name = "DOTI"}
}
-- Shadowlands
MDT_PL_SL = {
    {icon = "Interface\\Icons\\achievement_dungeon_theotherside", spellID = 354468, name = "DOS"},
    {icon = "Interface\\Icons\\achievement_dungeon_hallsofattonement", spellID = 354465, name = "HOA"},
    {icon = "Interface\\Icons\\achievement_dungeon_mistsoftirnascithe", spellID = 354464, name = "MISTS"},
    {icon = "Interface\\Icons\\achievement_dungeon_theneroticwake", spellID = 354462, name = "NW"},
    {icon = "Interface\\Icons\\achievement_dungeon_plaguefall", spellID = 354463, name = "PF"},
    {icon = "Interface\\Icons\\achievement_dungeon_sanguinedepths", spellID = 354469, name = "SD"},
    {icon = "Interface\\Icons\\achievement_dungeon_spireofascension", spellID = 354466, name = "SOA"},
    {icon = "Interface\\Icons\\achievement_dungeon_theatreofpain", spellID = 354467, name = "TOP"},
    {icon = "Interface\\Icons\\achievement_dungeon_brokerdungeon", spellID = 367416, name = "TAZ"}
}
-- Battle for Azeroth
MDT_PL_BFA = {
    {icon = "Interface\\Icons\\achievement_dungeon_ataldazar", spellID = 424187, name = "AD"},
    {icon = "Interface\\Icons\\achievement_dungeon_freehold", spellID = 410071, name = "FH"},
    {icon = "Interface\\Icons\\achievement_boss_mechagon", spellID = 373274, name = "MECHA"},
    {icon = "Interface\\Icons\\achievement_dungeon_kezan", spellID = motherID, name = "ML"},
    {icon = "Interface\\Icons\\achievement_dungeon_siegeofboralus", spellID = siegeID, name = "SIEGE"},
    {icon = "Interface\\Icons\\achievement_dungeon_underrot", spellID = 410074, name = "UNDR"},
    {icon = "Interface\\Icons\\achievement_dungeon_waycrestmannor", spellID = 424167, name = "WM"}   
}
-- Legion
MDT_PL_Legion = {
    {icon = "Interface\\Icons\\achievement_dungeon_blackrookhold", spellID = 424153, name = "BRH"},
    {icon = "Interface\\Icons\\achievement_dungeon_courtofstars", spellID = 393766, name = "COS"},
    {icon = "Interface\\Icons\\achievement_dungeon_darkheartthicket", spellID = 424163, name = "DT"},
    {icon = "Interface\\Icons\\achievement_dungeon_hallsofvalor", spellID = 393764, name = "HOV"},
    {icon = "Interface\\Icons\\achievement_raid_karazhan", spellID = 373262, name = "KARA"},
    {icon = "Interface\\Icons\\achievement_dungeon_neltharionslair", spellID = 410078, name = "NL"}
}
-- Warlords of Draenor
MDT_PL_WOD = {
    {icon = "Interface\\Icons\\achievement_dungeon_auchindoun", spellID = 159897, name = "AUCH"},
    {icon = "Interface\\Icons\\achievement_dungeon_ogreslagmines", spellID = 159895, name = "BSM"},
    {icon = "Interface\\Icons\\achievement_dungeon_everbloom", spellID = 159901, name = "EB"},
    {icon = "Interface\\Icons\\achievement_dungeon_blackrockdepot", spellID = 159900, name = "GD"},
    {icon = "Interface\\Icons\\achievement_dungeon_blackrockdocks", spellID = 159896, name = "ID"},
    {icon = "Interface\\Icons\\achievement_dungeon_shadowmoonhideout", spellID = 159899, name = "SBG"},
    {icon = "Interface\\Icons\\achievement_dungeon_arakkoaspires", spellID = 159898, name = "SR"},
    {icon = "Interface\\Icons\\achievement_dungeon_upperblackrockspire", spellID = 159902, name = "UBRS"}
}
-- Mists of Pandaria
MDT_PL_MOP = {
    {icon = "Interface\\Icons\\achievement_greatwall", spellID = 131225, name = "GOTSS"},
    {icon = "Interface\\Icons\\achievement_dungeon_mogupalace", spellID = 131222, name = "MSP"},
    {icon = "Interface\\Icons\\spell_holy_senseundead", spellID = 131232, name = "SCHOLO"},
    {icon = "Interface\\Icons\\inv_helmet_52", spellID = 131231, name = "SH"},
    {icon = "Interface\\Icons\\spell_holy_resurrection", spellID = 131229, name = "SM"},
    {icon = "Interface\\Icons\\achievement_dungeon_siegeofniuzaotemple", spellID = 131228, name = "SNT"},
    {icon = "Interface\\Icons\\achievement_shadowpan_hideout", spellID = 131206, name = "SPM"},
    {icon = "Interface\\Icons\\achievement_brewery", spellID = 131205, name = "SSB"},
    {icon = "Interface\\Icons\\achievement_jadeserpent", spellID = 131204, name = "TJS"}
}
-- Cataclysm
MDT_PL_CATA = {
    {icon = "Interface\\Icons\\achievement_dungeon_grimbatol", spellID = 445424, name = "GB"},
    {icon = "Interface\\Icons\\achievement_dungeon_throne of the tides", spellID = 424142, name = "TOTT"},
    {icon = "Interface\\Icons\\achievement_dungeon_skywall", spellID = 410080, name = "VP"}
}

-- MARK: Portal Library Raid
MDT_PLR_SL = {
    {icon = "Interface\\Icons\\achievement_raid_revendrethraid_castlenathria", spellID = 373190, name = "CN"},
    {icon = "Interface\\Icons\\achievement_raid_torghastraid", spellID = 373191, name = "SOD"},
    {icon = "Interface\\Icons\\inv_achievement_raid_progenitorraid", spellID = 373192, name = "STFO"}
}
MDT_PLR_DF = {
    {icon = "Interface\\Icons\\achievement_raidprimalist_raid", spellID = 432254, name = "VOTI"},
    {icon = "Interface\\Icons\\inv_achievement_raiddragon_raid", spellID = 432257, name = "ATSC"},
    {icon = "Interface\\Icons\\inv_achievement_raidemeralddream_raid", spellID = 432258, name = "ATDH"}
}
MDT_PLR_TWW = {
    {icon = "Interface\\Icons\\inv_achievement_zone_undermine", spellID = 1226482, name = "LOU"}
}

-- MARK: Lock Icons
AltLocks = {
    {icon = "Interface\\Icons\\achievement_dungeon_mogulrazdunk", spellID = motherID, name = "ML"},
    {icon = "Interface\\Icons\\achievement_zone_theringingdeeps", spellID = 1216786, name = "FLD"},
    {icon = "Interface\\Icons\\INV_Shield_1H_Maldraxxus_D_01", spellID = 354467, name = "TOP"},
    {icon = "Interface\\Icons\\Achievement_AlliedRace_Mechagnome", spellID = 373274, name = "WORK"},
    {icon = "Interface\\Icons\\Achievement_Zone_IsleOfDorn", spellID = 445440, name = "BREW"}, 
    {icon = "Interface\\Icons\\INV_Misc_CandleKobold_Color3", spellID = 445441, name = "DC"}, 
    {icon = "Interface\\Icons\\Achievement_Zone_Hallowfall", spellID = 445444, name = "PSF"}, 
    {icon = "Interface\\Icons\\INV_Gryphon_Air_Mount_Dark", spellID = 445443, name = "ROOK"},
    {icon = "Interface\\Icons\\achievement_zone_azjkahet", spellID = 445417, name = "ARAK"},
    {icon = "Interface\\Icons\\inv_achievement_raidnerubian_queenansurek", spellID = 445416, name = "COT"},
    {icon = "Interface\\Icons\\inv_achievement_raidnerubian_flyingnerubianevolved", spellID = 445414, name = "DAWN"},
    {icon = "Interface\\Icons\\inv_achievement_alliedrace_earthen", spellID = 445269, name = "SV"},
    {icon = "Interface\\Icons\\inv_ardenweald", spellID = 354464, name = "MISTS"},
    {icon = "Interface\\Icons\\inv_bastion", spellID = 354462, name = "NW"},
    {icon = "Interface\\Icons\\inv_tiragardesound", spellID = siegeID, name = "SIEGE"},
    {icon = "Interface\\Icons\\achievement_zone_twilighthighlands", spellID = 445424, name = "GB"},
    {icon = "Interface\\Icons\\achievement_zone_thaldraszus", spellID = 393273, name = "AA"},
    {icon = "Interface\\Icons\\achievement_zone_azurespan", spellID = 393279, name = "AV"},
    {icon = "Interface\\Icons\\spell_nature_naturetouchdecay", spellID = 393267, name = "BH"},
    {icon = "Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color1", spellID = 393283, name = "HOI"},
    {icon = "Interface\\Icons\\achievement_zone_wakingshores", spellID = 393276, name = "NELTH"},
    {icon = "Interface\\Icons\\achievement_zone_ohnahranplains", spellID = 393262, name = "NO"},
    {icon = "Interface\\Icons\\inv_item_dragonegg_redbroken01", spellID = 393256, name = "RLP"},
    {icon = "Interface\\Icons\\achievement_zone_badlands_01", spellID = 393222, name = "ULD"},
    {icon = "Interface\\Icons\\achievement_boss_infinitecorruptor", spellID = 424197, name = "DOTI"},
    {icon = "Interface\\Icons\\achievement_dungeon_theotherside_hakkar", spellID = 354468, name = "DOS"},
    {icon = "Interface\\Icons\\achievement_dungeon_hallsofattonement_halkias", spellID = 354465, name = "HOA"},
    {icon = "Interface\\Icons\\inv_maldraxxus", spellID = 354463, name = "PF"},
    {icon = "Interface\\Icons\\achievement_raid_revendrethraid_generalkaalgrashaal", spellID = 354469, name = "SD"},
    {icon = "Interface\\Icons\\achievement_dungeon_spireofascension_ventunax", spellID = 354466, name = "SOA"},
    {icon = "Interface\\Icons\\inv_misc_paperpackage01b", spellID = 367416, name = "TAZ"},
    {icon = "Interface\\Icons\\inv_zuldazar", spellID = 424187, name = "AD"},
    {icon = "Interface\\Icons\\inv_tourofdutytiragardesound", spellID = 410071, name = "FH"},
    {icon = "Interface\\Icons\\achievement_nazmir_boss_ghuun", spellID = 410074, name = "UNDR"},
    {icon = "Interface\\Icons\\achievement_dungeon_lordandladywaycrest", spellID = 424167, name = "WM"},
    {icon = "Interface\\Icons\\achievements_zone_valsharah", spellID = 424153, name = "BRH"},
    {icon = "Interface\\Icons\\achievements_zone_suramar", spellID = 393766, name = "COS"},
    {icon = "Interface\\Icons\\achievement_emeraldnightmare_xavius", spellID = 424163, name = "DT"},
    {icon = "Interface\\Icons\\achievements_zone_stormheim", spellID = 393764, name = "HOV"},
    {icon = "Interface\\Icons\\achievements_zone_highmountain", spellID = 410078, name = "NL"},
    {icon = "Interface\\Icons\\achievement_zone_deadwindpass", spellID = 373262, name = "KARA"},
    {icon = "Interface\\Icons\\achievement_zone_talador", spellID = 159897, name = "AUCH"},
    {icon = "Interface\\Icons\\achievement_zone_frostfire", spellID = 159895, name = "BSM"},
    {icon = "Interface\\Icons\\achievement_zone_gorgrond", spellID = 159901, name = "EB"},
    {icon = "Interface\\Icons\\inv_offhand_1h_draenorraid_d_04", spellID = 159900, name = "GD"},
    {icon = "Interface\\Icons\\achievement_boss_ironjuggernaut", spellID = 159896, name = "ID"},
    {icon = "Interface\\Icons\\achievement_zone_newshadowmoonvalley", spellID = 159899, name = "SBG"},
    {icon = "Interface\\Icons\\achievement_zone_spiresofarak", spellID = 159898, name = "SR"},
    {icon = "Interface\\Icons\\achievement_dungeon_blackrockcaverns", spellID = 159902, name = "UBRS"},
    {icon = "Interface\\Icons\\achievement_raid_soo_ruined_vale", spellID = 131225, name = "GOTSS"},
    {icon = "Interface\\Icons\\achievement_zone_valeofeternalblossoms", spellID = 131222, name = "MSP"},
    {icon = "Interface\\Icons\\achievement_zone_westernplaguelands_01", spellID = 131232, name = "SCHOLO"},
    {icon = "Interface\\Icons\\achievement_zone_tirisfalglades_01", spellID = 131231, name = "SH"},
    {icon = "Interface\\Icons\\inv_misc_token_scarletcrusade", spellID = 131229, name = "SM"},
    {icon = "Interface\\Icons\\achievement_zone_townlongsteppes", spellID = 131228, name = "SNT"},
    {icon = "Interface\\Icons\\achievement_zone_kunlaisummit", spellID = 131206, name = "SPM"},
    {icon = "Interface\\Icons\\achievement_zone_valleyoffourwinds", spellID = 131205, name = "SSB"},
    {icon = "Interface\\Icons\\achievement_zone_jadeforest", spellID = 131204, name = "TJS"},
    {icon = "Interface\\Icons\\achievement_zone_vashjir", spellID = 424142, name = "TOTT"},
    {icon = "Interface\\Icons\\achievement_zone_uldum", spellID = 410080, name = "VP"},
    -- raid portals
    {icon = "Interface\\Icons\\achievement_raidprimalist_raszageth", spellID = 432254, name = "VOTI"},
    {icon = "Interface\\Icons\\spell_sarkareth", spellID = 432257, name = "ATSC"},
    {icon = "Interface\\Icons\\inv_achievement_raidemeralddream_fyrakk", spellID = 432258, name = "ATDH"},
    {icon = "Interface\\Icons\\achievement_raid_revendrethraid_siredenathrius", spellID = 373190, name = "CN"},
    {icon = "Interface\\Icons\\achievement_raid_torghast_sylvanaswindrunner", spellID = 373191, name = "SOD"},
    {icon = "Interface\\Icons\\inv_achievement_raid_progenitorraid_jailer", spellID = 373192, name = "STFO"},
    {icon = "Interface\\Icons\\inv_111_raid_achievement_chromekinggallywix", spellID = 1226482, name = "LOU"}
}
-- Key Tracker Data
KeyTrackerIcons = {
    {icon = "Interface\\Icons\\inv_achievement_dungeon_cinderbrewmeadery", spellID = 445440, short = "Cinderbrew", name = "Cinderbrew Meadery", mapID = 506},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_darkflamecleft", spellID = 445441, short = "Darkflame", name = "Darkflame Cleft", mapID = 504},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_prioryofthesacredflame", spellID = 445444, short = "Priory", name = "Priory of the Sacred Flame", mapID = 499},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_rookery", spellID = 445443, short = "Rookery", name = "The Rookery", mapID = 500},
    {icon = "Interface\\Icons\\inv_achievement_dungeon_waterworks", spellID = 1216786, short = "Floodgate", name = "Operation: Floodgate", mapID = 525},
    {icon = "Interface\\Icons\\achievement_dungeon_kezan", spellID = motherID, short = "Motherlode", name = "The MOTHERLODE!!", mapID = 247},
    {icon = "Interface\\Icons\\achievement_dungeon_theatreofpain", spellID = 354467, short = "Theater", name = "Theater of Pain", mapID = 382},
    {icon = "Interface\\Icons\\achievement_boss_mechagon", spellID = 373274, short = "Workshop", name = "Operation: Mechagon - Workshop", mapID = 370}
}