local E, L, V, P, G = unpack(ElvUI);
local mPlugin = "mMediaTag"
local mMT = E:GetModule(mPlugin);
local addon, ns = ...

local function OptionsProfession()
	E.Options.args.mMediaTag.args.datatext.args.professionsmenusettings.args = {
        headerprofessions = {
        order = 1,
        type = "header",
        name = L["General"],
        },
        professionfoldup = {
            order = 2,
            type = 'toggle',
            name = L["Fold up"],
            desc = L["When activated, the Profession Menu opens upwards."],
            get = function(info)
                return E.db[mPlugin].mProfUp
            end,
            set = function(info, value)
                E.db[mPlugin].mProfUp = value
            end,
        },
        spacerprofessions = {
        order = 3,
        type = "description",
        name = "\n",
        },
        professionicon = {
            order = 4,
            type = 'toggle',
            name = L["Symbols"],
            desc = L["Displays the icons for the professions in the menu."],
            get = function(info)
                return E.db[mPlugin].mProfIcon
            end,
            set = function(info, value)
                E.db[mPlugin].mProfIcon = value
            end,
        },
    }
end

local function OptionsSystemMenu()
	E.Options.args.mMediaTag.args.datatext.args.systemmenusettings.args = {
        headersystemmenu = {
        order = 1,
        type = "header",
        name = L["General"],
        },
        systemmmenufoldup = {
            order = 2,
            type = 'toggle',
            name = L["Fold up"],
            desc = L["When activated, the System Menu opens upwards."],
            get = function(info)
                return E.db[mPlugin].mMenuUp
            end,
            set = function(info, value)
                E.db[mPlugin].mMenuUp = value
            end,
        },
        systemmmenucolor = {
            order = 3,
            type = 'toggle',
            name = L["Colored System Menu"],
            desc = L["Activates a colored system menu."],
            get = function(info)
                return E.db[mPlugin].mMenuColor
            end,
            set = function(info, value)
                E.db[mPlugin].mMenuColor = value
            end,
        },
        systemmmenutipinstance = {
            order = 4,
            type = 'toggle',
            name = L["Tooltip Instanceinfo"],
            desc = L["Shows Inctance Info and Mythic Plus key tone in tooltip."],
            get = function(info)
                return E.db[mPlugin].InstancInfoToolTip
            end,
            set = function(info, value)
                E.db[mPlugin].InstancInfoToolTip = value
            end,
        },
        spacersystemmmenu = {
            order = 5,
            type = "description",
            name = "\n\n",
        },
        headersystemmmenu2 = {
            order = 6,
            type = "header",
            name = L["Tooltip Mythic Plus"],
        },
        systemmmenuinstancename = {
            order = 7,
            type = 'toggle',
            name = L["Text to Instance Name"],
            desc = L["Display the instance name instead of System Menu."],
            get = function(info)
                return E.db[mPlugin].InstancInfoName
            end,
            set = function(info, value)
                E.db[mPlugin].InstancInfoName = value
            end,
        },
        systemmmenuaffix = {
            order = 8,
            type = 'toggle',
            name = L["Weekly Affixes"],
            desc = L["Shows the Weekly Affixes."],
            get = function(info)
                return E.db[mPlugin].SAffix
            end,
            set = function(info, value)
                E.db[mPlugin].SAffix = value
            end,
        },
        systemmmenukeystone = {
            order = 9,
            type = 'toggle',
            name = L["Tooltip Keystone"],
            desc = L["Shows your Keystone in the tooltip."],
            get = function(info)
                return E.db[mPlugin].SKeystone
            end,
            set = function(info, value)
                E.db[mPlugin].SKeystone = value
            end,
        },
        spacersystemmmenu2 = {
            order = 10,
            type = "description",
            name = "\n\n",
        },
        headersystemmmenu3 = {
            order = 11,
            type = "header",
            name = L["Tooltip Achievement"],
        },
        systemmmenum10 = {
            order = 12,
            type = 'toggle',
            name = L["Mythic +10 Achievement"],
            desc = L["Display the Achievement for Mythic +10 Dungeons."],
            get = function(info)
                return E.db[mPlugin].SAchievement10
            end,
            set = function(info, value)
                E.db[mPlugin].SAchievement10 = value
            end,
        },
        systemmmenum15 = {
            order = 13,
            type = 'toggle',
            name = L["Mythic +15 Achievement"],
            desc = L["Display the Achievement for Mythic +15 Dungeons."],
            get = function(info)
                return E.db[mPlugin].SAchievement15
            end,
            set = function(info, value)
                E.db[mPlugin].SAchievement15 = value
            end,
        },
        systemmmenud = {
            order = 14,
            type = 'toggle',
            name = L["Dungeon Achievement"],
            desc = L["Display the Achievement for Dungeons."],
            get = function(info)
                return E.db[mPlugin].SAchievement0
            end,
            set = function(info, value)
                E.db[mPlugin].SAchievement0 = value
            end,
        },
        systemmmenuicon = {
            order = 15,
            type = 'toggle',
            name = L["Achievement Icon"],
            desc = L["Display the Achievement Icon."],
            get = function(info)
                return E.db[mPlugin].mAchievementIcon
            end,
            set = function(info, value)
                E.db[mPlugin].mAchievementIcon = value
            end,
        },
    }
end

local function OptionsDungeon()
	E.Options.args.mMediaTag.args.datatext.args.dungeonsetting.args = {
        headerdungeon = {
        order = 1,
        type = "header",
        name = L["General"],
        },
        dungeontext = {
            order = 2,
            type = 'toggle',
            name = L["Text to Instance Name"],
            desc = L["Display the instance name instead of System Menu."],
            get = function(info)
                return E.db[mPlugin].DInstancInfoName
            end,
            set = function(info, value)
                E.db[mPlugin].DInstancInfoName = value
            end,
        },
        spacerdungeon1 = {
            order = 3,
            type = "description",
            name = "\n\n",
        },
        headerdungeon1 = {
            order = 4,
            type = "header",
            name = L["Tooltip Mythic Plus"],
        },
        dungeonaffix = {
            order = 5,
            type = 'toggle',
            name = L["Weekly Affixes"],
            desc = L["Shows the Weekly Affixes."],
            get = function(info)
                return E.db[mPlugin].DAffix
            end,
            set = function(info, value)
                E.db[mPlugin].DAffix = value
            end,
        },
        dungeonkeaystone = {
            order = 6,
            type = 'toggle',
            name = L["Tooltip Keystone"],
            desc = L["Shows your Keystone in the tooltip."],
            get = function(info)
                return E.db[mPlugin].DKeystone
            end,
            set = function(info, value)
                E.db[mPlugin].DKeystone = value
            end,
        },
        spacerdungeon2 = {
            order = 7,
            type = "description",
            name = "\n\n",
        },
        headerdungeon2 = {
            order = 8,
            type = "header",
            name = L["Tooltip Achievement"],
        },
        dungeonm10 = {
            order = 9,
            type = 'toggle',
            name = L["Mythic +10 Achievement"],
            desc = L["Display the Achievement for Mythic +10 Dungeons."],
            get = function(info)
                return E.db[mPlugin].DAchievement10
            end,
            set = function(info, value)
                E.db[mPlugin].DAchievement10 = value
            end,
        },
        dungeonm15 = {
            order = 10,
            type = 'toggle',
            name = L["Mythic +15 Achievement"],
            desc = L["Display the Achievement for Mythic +15 Dungeons."],
            get = function(info)
                return E.db[mPlugin].DAchievement15
            end,
            set = function(info, value)
                E.db[mPlugin].DAchievement15 = value
            end,
        },
        dungeond = {
            order = 11,
            type = 'toggle',
            name = L["Dungeon Achievement"],
            desc = L["Display the Achievement for Dungeons."],
            get = function(info)
                return E.db[mPlugin].DAchievement0
            end,
            set = function(info, value)
                E.db[mPlugin].DAchievement0 = value
            end,
        },
        dungeonicon = {
            order = 11,
            type = 'toggle',
            name = L["Achievement Icon"],
            desc = L["Display the Achievement Icon."],
            get = function(info)
                return E.db[mPlugin].mAchievementIcon
            end,
            set = function(info, value)
                E.db[mPlugin].mAchievementIcon = value
            end,
        },
    }
end

table.insert(ns.Config, OptionsProfession)
table.insert(ns.Config, OptionsSystemMenu)
table.insert(ns.Config, OptionsDungeon)