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

--Lua functions
local format = format
local mInsert = table.insert

local function OptionsMaUI()
	E.Options.args.mMediaTag.args.maui.args = {
		headermaui1 = {
			order = 1,
			type = "header",
			name = ns.mName,
		},
		descriptionmaui1 = {
			order = 2,
			type = "description",
			name = L["Here you can install addon profiles and more for my ElvUI profile MaUI v.3 and the edits."],
		},
		spacermaui1 = {
			order = 3,
			type = "description",
			name = "\n\n\n",
		},
		mauiaadons = {
			order = 20,
			type = "group",
			name = L["Addon Profile"],
			args = {
				descriptionmauiaadons1 = {
					order = 1,
					type = "description",
					name = L["Here you can install profiles for the different supported addons."],
				},
				spacermauiaadons1 = {
					order = 2,
					type = "description",
					name = "\n",
				},
				headermauiaadons1= {
					order = 3,
					type = "header",
					name = L["Supported Addons"],
				},
				spacermauiaadons2 = {
					order = 4,
					type = "description",
					name = "\n",
				},
				descriptionmauiaadons2 = {
					order = 5,
					type = "description",
					name = mMT:CheckAddons(),
				},
				spacermauiaadons3= {
					order = 6,
					type = "description",
					name = "\n",
				},
				headermauiaadons2 = {
					order = 7,
					type = "header",
					name = L["Install Addon Profiles"],
				},
				spacermauiaadons4 = {
					order = 8,
					type = "description",
					name = "\n\n",
				},
				mauiaadonsinstall = {
					order = 9,
					type = "execute",
					name = L["Install"],
					desc = L["Run the installation process."],
					func = function() mMT:mSetup() end,
				},
			},
		},
		mauiprofile = {
			order = 10,
			type = "group",
			name = L["MaUI v3 Profiles"],
			args = {
				descriptionmauiprofile1 = {
					order = 1,
					type = "description",
					name = L["Here you can display the Profile Import texts for importing."],
				},
				spacermauiprofile1 = {
					order = 2,
					type = "description",
					name = "\n\n",
				},
				descriptionmauiprofile2 = {
					order = 3,
					type = "description",
					name = format("%s\n\n%s|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFF0000ffTank/DD|r\n%s|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFF03ea18Heal|r\n%s|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |cffab54c9Namplate Stylfilter|r\n%s|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |cfff7d358Global Settings|r", L["Last Update:"], ns.mDateTankDD, ns.mDateHeal, ns.mDateNameplate, ns.mDateGlobal)
				},
				spacermauiprofile2 = {
					order = 4,
					type = "description",
					name = "\n\n",
				},
				mauiprofiletankdd= {
					order = 6,
					type = "execute",
					name = "Tank/DD",
					func = function() 
						mMT:mProfileWindow(mMT:mTankDDProfile(), "|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFF0000ffTank/DD|r")
					end,
				},
				mauiprofileheal= {
					order = 7,
					type = "execute",
					name = "Heal",
					func = function() 
						mMT:mProfileWindow(mMT:mHealProfile(), "|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFF03ea18Heal|r")
					end,
				},
				mauiprofilenameplate= {
					order = 8,
					type = "execute",
					name = "Nameplate Stylfilter",
					func = function() 
						mMT:mProfileWindow(mMT:NamplateProfile(), "|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFFff3333Namplate Stylfilter|r")
					end,
				},
				mauiprofileglobal= {
					order = 9,
					type = "execute",
					name = "Global Settings",
					func = function() 
						mMT:mProfileWindow(mMT:GlobalProfile(), "|CFF8E44ADMaUI|r |CFF2ECC71v|r|CFF3498DB3|r Profile: |CFFff3333Global Settings|r")
					end,
				},
				spacermauiprofile3 = {
					order = 10,
					type = "description",
					name = "\n\n",
				},
				headermauiprofile100 = {
					order = 100,
					type = "header",
					name = L["MaUI v3 Profiles on Git"],
				},
				spacermauiprofile101 = {
					order = 101,
					type = "description",
					name = "\n",
				},
				descriptionmauiprofile101 = {
					order = 102,
					type = "description",
					name = L["Here you can find the MaUI v3 Tank/DD/Heal profile on Git"],
				},
				spacermauiprofile102 = {
					order = 103,
					type = "description",
					name = "\n\n",
				},
				mauiprofilegit= {
					order = 104,
					type = "execute",
					name = L["MaUI v3 Retail"],
					func = function() E:StaticPopup_Show('ELVUI_EDITBOX', nil, nil, 'https://git.tukui.org/Blinkii/elvui-blinkiis-profile/-/tree/master/WoW%209.0.1') end,
				},
			},
		},
		mauiwa = {
			order = 30,
			type = "group",
			name = L["Weakaura"],
			args = {
				descriptionmauiwa1 = {
					order = 1,
					type = "description",
					name = L["Here you can display the Weakaura Import texts for importing."],
				},
				spacermauiwa1 = {
					order = 2,
					type = "description",
					name = "\n\n",
				},
				descriptionmauiwa2 = {
					order = 3,
					type = "description",
					name = format("%s\n\n%sProfile: Weakaura Strings", L["Last Update:"], ns.mDateWeakaura)
				},
				spacermauiwa2 = {
					order = 4,
					type = "description",
					name = "\n\n",
				},
				mauiwainterrupt= {
					order = 6,
					type = "execute",
					name = "WeakAura Interrupt",
					func = function() 
						mMT:mProfileWindow(mMT:WeakauraInterrupt(), "String: Weakaura Interrupt")
					end,
				},
				mauiwabrbl= {
					order = 7,
					type = "execute",
					name = "WeakAura BR/ BL",
					func = function() 
						mMT:mProfileWindow(mMT:WeakauraBrBl(), "String: Weakaura BR/ BL")
					end,
				},
			},
		},
	}
end

mInsert(ns.Config, OptionsMaUI)