local mMT, DB, M, E, P, L, MEDIA = unpack(ElvUI_mMediaTag)

local _G = _G

mMT.options = {
	name = MEDIA.icon16 .. mMT.Name,
	handler = mMT,
	type = "group",
	--childGroups = "tab",
	args = {
		logo = {
			type = "description",
			name = "",
			order = 1,
			image = function()
				return "Interface\\Addons\\ElvUI_mMediaTag\\media\\logo", 512, 64
			end,
		},
		general = {
			order = 2,
			type = "group",
			name = L["General"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\general",
			childGroups = "tab",
			args = {
				greeting_message = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["Greeting Message"], "greeting_message"),
					childGroups = "tab",
					args = {},
				},
				keystone_to_chat = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["Keystone to Chat"], "keystone_to_chat"),
					childGroups = "tab",
					hidden = function()
						return not E.Retail
					end,
					args = {},
				},
			},
		},
		unitframes = {
			order = 3,
			type = "group",
			name = L["Unitframes"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\unitframes",
			childGroups = "tab",
			args = {
				portraits = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["Portraits"], "character"),
					childGroups = "tab",
					args = {},
				},
				interrupt_on_cd = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["Interrupt On CD"], "time"),
					childGroups = "tab",
					args = {},
				},
				important_casts = {
					order = 3,
					type = "group",
					name = mMT:AddSettingsIcon("Important Casts", "time"),
					childGroups = "tab",
					args = {},
				},
				role_icons = {
					order = 4,
					type = "group",
					name = mMT:AddSettingsIcon(L["Role Icons"], "pvp"),
					childGroups = "tab",
					args = {},
				},
				phase_icon = {
					order = 5,
					type = "group",
					name = mMT:AddSettingsIcon(L["Phase Icon"], "refresh"),
					childGroups = "tab",
					args = {},
				},
				ready_check_icon = {
					order = 6,
					type = "group",
					name = mMT:AddSettingsIcon(L["Ready Check Icons"], "ok"),
					childGroups = "tab",
					args = {},
				},
				resurrection_icon = {
					order = 7,
					type = "group",
					name = mMT:AddSettingsIcon(L["Resurrection Icon"], "heart"),
					childGroups = "tab",
					args = {},
				},
				summon_icon = {
					order = 8,
					type = "group",
					name = mMT:AddSettingsIcon(L["Summon Icon"], "teleports"),
					childGroups = "tab",
					args = {},
				},
			},
		},
		nameplates = {
			order = 4,
			type = "group",
			name = L["Nameplates"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\nameplates",
			childGroups = "tab",
			args = {
				misc = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["Misc"], "misc"),
					childGroups = "tab",
					args = {},
				},
				target_highlight = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["Target Highlight"], "nameplates"),
					childGroups = "tab",
					args = {},
				},
				focus_highlight = {
					order = 3,
					type = "group",
					name = mMT:AddSettingsIcon(L["Focus Highlight"], "nameplates"),
					childGroups = "tab",
					args = {},
				},
				quest_highlight = {
					order = 4,
					type = "group",
					name = mMT:AddSettingsIcon(L["Quest Highlight"], "nameplates"),
					childGroups = "tab",
					args = {},
				},
			},
		},
		datatexts = {
			order = 5,
			type = "group",
			name = L["Datatexts"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\datatexts",
			childGroups = "tab",
			args = {
				general = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["General"], "general"),
					childGroups = "tab",
					args = {},
				},
				info_score = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["M+ Score"], "score"),
					childGroups = "tab",
					hidden = function()
						return not E.Retail
					end,
					args = {},
				},
				misc_teleports = {
					order = 3,
					type = "group",
					name = mMT:AddSettingsIcon(L["Teleports"], "teleports"),
					childGroups = "tab",
					hidden = function()
						return not E.Retail
					end,
					args = {},
				},
				misc_individual_professions = {
					order = 4,
					type = "group",
					name = mMT:AddSettingsIcon(L["Individual Professions"], "professions"),
					childGroups = "tab",
					args = {},
				},
				misc_professions = {
					order = 5,
					type = "group",
					name = mMT:AddSettingsIcon(L["Professions"], "professions"),
					childGroups = "tab",
					args = {},
				},
				misc_gamemenu = {
					order = 6,
					type = "group",
					name = mMT:AddSettingsIcon(L["Gamemenu"], "gamemenu"),
					childGroups = "tab",
					args = {},
				},
				misc_tracker = {
					order = 7,
					type = "group",
					name = mMT:AddSettingsIcon(L["Tracker"], "shop"),
					childGroups = "tab",
					args = {},
				},
				info_combat_time = {
					order = 8,
					type = "group",
					name = mMT:AddSettingsIcon(L["Combat/Arena Time"], "combat_time"),
					childGroups = "tab",
					args = {},
				},
				info_durability_itemlevel = {
					order = 9,
					type = "group",
					name = mMT:AddSettingsIcon(L["Durability & Item Level"], "armor"),
					childGroups = "tab",
					args = {},
				},
				misc_dungeon = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(L["Dungeon"], "dungeon"),
					childGroups = "tab",
					args = {},
				},
			},
		},
		dock = {
			order = 6,
			type = "group",
			name = L["Dock"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\dock",
			childGroups = "tab",
			args = {
				general = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["General"], "general"),
					childGroups = "tab",
					args = {},
				},
				character = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(CHARACTER_BUTTON, "character"),
					childGroups = "tab",
					args = {},
				},
				friends = {
					order = 3,
					type = "group",
					name = mMT:AddSettingsIcon(L["Friends"], "social"),
					childGroups = "tab",
					args = {},
				},
				guild = {
					order = 4,
					type = "group",
					name = mMT:AddSettingsIcon(L["Guild"], "guild"),
					childGroups = "tab",
					args = {},
				},
				lfd = {
					order = 5,
					type = "group",
					name = mMT:AddSettingsIcon(_G.DUNGEONS_BUTTON, "dungeon"),
					childGroups = "tab",
					args = {},
				},
				spellbook = {
					order = 6,
					type = "group",
					name = mMT:AddSettingsIcon((E.Retail and _G.SPELLBOOK or _G.SPELLBOOK_ABILITIES_BUTTON), "book"),
					childGroups = "tab",
					args = {},
				},
				spec = {
					order = 7,
					type = "group",
					name = mMT:AddSettingsIcon(_G.TALENTS_BUTTON, "talent"),
					childGroups = "tab",
					args = {},
				},
				menu = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.MAINMENU_BUTTON, "menu"),
					childGroups = "tab",
					args = {},
				},
				mail = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.MAIL_LABEL, "mail"),
					childGroups = "tab",
					args = {},
				},
				professions = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.TRADE_SKILLS, "professions"),
					childGroups = "tab",
					args = {},
				},
				quests = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.QUESTLOG_BUTTON, "quest"),
					childGroups = "tab",
					args = {},
				},
				durability = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.DURABILITY, "armor"),
					childGroups = "tab",
					args = {},
				},
				encounter = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.ENCOUNTER_JOURNAL, "encounter"),
					childGroups = "tab",
					args = {},
				},
				collection = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(_G.COLLECTIONS, "collection"),
					childGroups = "tab",
					args = {},
				},
				bags = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(L["Bags"], "bag"),
					childGroups = "tab",
					args = {},
				},
				achievement = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(_G.ACHIEVEMENT_BUTTON, "achievement"),
					childGroups = "tab",
					args = {},
				},
				store = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(_G.BLIZZARD_STORE, "shop"),
					childGroups = "tab",
					args = {},
				},
				volume = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(L["Volume"], "sound"),
					childGroups = "tab",
					args = {},
				},
				calendar = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(L["Calendar"], "calendar"),
					childGroups = "tab",
					args = {},
				},
				housing = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(L["Housing"], "housing"),
					childGroups = "tab",
					args = {},
				},
				notification = {
					order = 21,
					type = "group",
					name = mMT:AddSettingsIcon(L["Notification"], "notification"),
					childGroups = "tab",
					args = {},
				},
				example = {
					order = 30,
					type = "group",
					name = mMT:AddSettingsIcon(L["Example"], "dock"),
					childGroups = "tab",
					args = {
						desc = {
							order = 1,
							type = "description",
							name = L["These are just examples of how to create your own dock using ElvUI’s custom data text bars.\n\nTo set up a custom bar:\nOpen ElvUI and navigate to ElvUI > Datatext > Bars.\nEnter a name for your new bar, click OK, and then click Add.\nSet the width of the bar based on how many icons you want to display.\nSet the height, which also determines the icon size.\nChoose the number of data text slots you want.\n\nAssign icons to each slot. For example:\nSlot 1 = Dock Calendar\nSlot 2 = Dock Profession\nSlot 3 = Dock Spec\n…and so on.\n\nThis setup allows you to build a personalized dock that fits your UI and gameplay needs.\n\n"],
						},
						warning = {
							order = 2,
							type = "description",
							name = L["In WoW Classic, the docks may appear differently because not all modules are available in this version. However, you can still customize the docks through the ElvUI settings."],
						},
						spacer = {
							order = 3,
							type = "description",
							name = "\n\n",
						},
						custom_docks = {
							order = 4,
							type = "execute",
							name = L["Open Settings"],
							func = function()
								E.Libs.AceConfigDialog:SelectGroup("ElvUI", "mMT", "misc", "custom_docks")
							end,
						},
					},
				},
			},
		},
		tags = {
			order = 7,
			type = "group",
			name = L["TAGs"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\tags",
			childGroups = "tab",
			args = {},
		},
		misc = {
			order = 8,
			type = "group",
			name = L["Misc"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\misc",
			childGroups = "tab",
			args = {
				data_panel_skin = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["Data Panel Skin"], "data_panel_skin"),
					childGroups = "tab",
					args = {},
				},
				dice_button = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["Dice Button"], "dice_button"),
					childGroups = "tab",
					args = {},
				},
				lfg_invite_info = {
					order = 4,
					type = "group",
					name = mMT:AddSettingsIcon(L["LFG Invite Info"], "greeting_message"),
					childGroups = "tab",
					args = {},
				},
				difficulty_info = {
					order = 5,
					type = "group",
					name = mMT:AddSettingsIcon(L["Difficulty Info"], "pvp"),
					childGroups = "tab",
					args = {},
				},
				minimap_skin = {
					order = 6,
					type = "group",
					name = mMT:AddSettingsIcon(L["Minimap Skin"], "data_panel_skin"),
					childGroups = "tab",
					args = {},
				},
				details = {
					order = 7,
					type = "group",
					name = mMT:AddSettingsIcon(L["Details embedded"], "score"),
					childGroups = "tab",
					args = {},
				},
				auto_quest = {
					order = 8,
					type = "group",
					name = mMT:AddSettingsIcon(L["Auto Quest"], "quest"),
					childGroups = "tab",
					args = {},
				},
				auto_role_check = {
					order = 9,
					type = "group",
					name = mMT:AddSettingsIcon(L["Auto Role Check"], "dungeon"),
					childGroups = "tab",
					args = {},
				},
				tooltip = {
					order = 10,
					type = "group",
					name = mMT:AddSettingsIcon(L["Tooltip"], "help"),
					childGroups = "tab",
					args = {},
				},
				custom_docks = {
					order = 20,
					type = "group",
					name = mMT:AddSettingsIcon(L["Custom Docks"], "dock"),
					childGroups = "tab",
					args = {},
				},
			},
		},
		colors = {
			order = 9,
			type = "group",
			name = L["Colors"],
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\colors",
			childGroups = "tab",
			args = {
				difficulty = {
					order = 1,
					type = "group",
					name = mMT:AddSettingsIcon(L["Difficulty"], "pvp"),
					childGroups = "tab",
					args = {},
				},
				tip_menu = {
					order = 2,
					type = "group",
					name = mMT:AddSettingsIcon(L["Tip/ Menu"], "misc"),
					childGroups = "tab",
					args = {},
				},
			},
		},
		about = {
			order = 10,
			type = "group",
			name = MEDIA.color.green:WrapTextInColorCode(L["About"]),
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\about",
			childGroups = "tab",
			args = {},
		},
		license = {
			order = 11,
			type = "group",
			name = MEDIA.color.yellow:WrapTextInColorCode(L["License"]),
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\license",
			childGroups = "tab",
			args = {},
		},
		changelog = {
			order = 12,
			type = "group",
			name = MEDIA.color.red:WrapTextInColorCode(L["Changelog"]),
			icon = "Interface\\Addons\\ElvUI_mMediaTag\\media\\options\\log",
			childGroups = "select",
			args = {},
		},
	},
}
