local L = AceLibrary("AceLocale-2.2"):new("Skinner")
local Surface = AceLibrary("Surface-1.0")

local self = Skinner

function Skinner:Defaults()
	self:RegisterDefaults("profile", {
		-- Colours
		BackdropBorder	= {r = 0.5, g = 0.5, b = 0.5, a = 1},
		Backdrop		= {r = 0, g = 0, b = 0, a = 0.9},
		HeadText		= {r = 0.8, g = 0.8, b = 0.0},
		BodyText		= {r = 0.7, g = 0.7, b = 0.0},
		GradientMin		= {r = 0.1, g = 0.1, b = 0.1, a = 0},
		GradientMax		= {r = 0.25, g = 0.25, b = 0.25, a = 1},
		-- Other
		TexturedTab     = false,
		Warnings		= true,
		Gradient		= {enable = true, invert = false, rotate = false},
		FadeHeight		= {enable = false, value = 500, force = false},
		Delay			= {Init = 0.5, Addons = 0.5, LoDs = 0.5},
		ViewPort		= {top = 64, bottom = 64, YResolution = 1050, scaling = 768/1050, shown = false, overlay = false, r = 0, g = 0, b = 0, a = 1},
		TopFrame		= {height = 64, width = 1920, shown = false, fheight = 50, xyOff = true, borderOff = false, alpha = 0.9, invert = false, rotate = false, adjustpanels = false},
		MiddleFrame		= {fheight = 50, borderOff = false, r = 0, g = 0, b = 0, a = 0.9},
		MiddleFrame1	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame2	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame3	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame4	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame5	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame6	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame7	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame8	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		MiddleFrame9	= {height = 64, width = 64, shown = false, xOfs = 0, yOfs = 0},
		BottomFrame		= {height = 200, width = 1920, shown = false, fheight = 50, xyOff = true, borderOff = false, alpha = 0.9, invert = false, rotate = false},
		SBTexture		= "Glaze",
		-- Character Frames
		CharacterFrames = true,
		PetStableFrame	= true,
		SpellBookFrame  = true,
		TalentFrame		= true,
		DressUpFrame    = true,
		FriendsFrame	= true,
		TradeSkill		= true,
		CraftFrame		= true,
		TradeFrame		= true,
		QuestLog		= {skin = true, size = 1},
		RaidUI			= true,
		-- UI Frames
		Tooltips		= {skin = true, style = 1, glazesb = true},
		MirrorTimers	= {skin = true, glaze = true},
		CastingBar		= {skin = true, glaze = true},
		StaticPopups	= true,
		ChatTabs		= false,
		ChatFrames		= false,
		ChatEditBox		= {skin = true, style = 1},
		LootFrame		= true,
		GroupLoot		= {skin = true, size = 1},
		ContainerFrames	= {skin = true, fheight = 100},
		StackSplit		= true,
		ItemText		= true,
		Colours			= true,
		WorldMap		= true,
		HelpFrame		= true,
		KnowledgeBase	= true,
		Inspect			= true,
		BattleScore	    = true,
		ScriptErrors	= true,
		Tutorial		= true,
		DropDowns		= true,
		MenuFrames		= true,
		BankFrame       = true,
		MailFrame		= true,
		AuctionFrame	= true,
		MainMenuBar     = {skin = true, glazesb = true},
		CoinPickup		= true,
		GMSurveyUI		= true,
		LFGFrame		= true,
		ItemSocketingUI = true,
		-- NPC Frames
		MerchantFrames	= true,
		GossipFrame		= true,
		ClassTrainer	= true,
		TaxiFrame		= true,
		QuestFrame		= true,
		Battlefields	= true,
		ArenaFrame		= true,
		ArenaRegistrar	= true,
		GuildRegistrar	= true,
		Petition		= true,
		Tabard			= true,
	})

end

function Skinner:Options()
	Skinner.options = {
		type = "group",
		args = {
			cp = {
				name = L["Default Colours"],
				desc = L["Change the default colour settings"],
				type = "group",
				args = {
					border = {
						name = L["Border Colors"],
						desc = L["Set Backdrop Border Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.BackdropBorder.r, self.db.profile.BackdropBorder.g, self.db.profile.BackdropBorder.b, self.db.profile.BackdropBorder.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.BackdropBorder.r, self.db.profile.BackdropBorder.g, self.db.profile.BackdropBorder.b, self.db.profile.BackdropBorder.a = r, g, b, a
					    end,
					    hasAlpha = true,
					},
					backdrop = {
						name = L["Backdrop Colors"],
						desc = L["Set Backdrop Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.Backdrop.r, self.db.profile.Backdrop.g, self.db.profile.Backdrop.b, self.db.profile.Backdrop.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.Backdrop.r, self.db.profile.Backdrop.g, self.db.profile.Backdrop.b, self.db.profile.Backdrop.a = r, g, b, a
					    end,
					    hasAlpha = true,
					},
					headtext = {
						name = L["Text Heading Colors"],
						desc = L["Set Text Heading Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.HeadText.r, self.db.profile.HeadText.g, self.db.profile.HeadText.b
					    end,
					    set = function(r, g, b)
					        self.db.profile.HeadText.r, self.db.profile.HeadText.g, self.db.profile.HeadText.b = r, g, b
					    end,
					},
					bodytext = {
						name = L["Text Body Colors"],
						desc = L["Set Text Body Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.BodyText.r, self.db.profile.BodyText.g, self.db.profile.BodyText.b
					    end,
					    set = function(r, g, b)
					        self.db.profile.BodyText.r, self.db.profile.BodyText.g, self.db.profile.BodyText.b = r, g, b
					    end,
					},
					gradientMin = {
						name = L["Gradient Minimum Colors"],
						desc = L["Set Gradient Minimum Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.GradientMin.r, self.db.profile.GradientMin.g, self.db.profile.GradientMin.b, self.db.profile.GradientMin.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.GradientMin.r, self.db.profile.GradientMin.g, self.db.profile.GradientMin.b, self.db.profile.GradientMin.a = r, g, b, a
					    end,
					    hasAlpha = true,
					},
					gradientMax = {
						name = L["Gradient Maximum Colors"],
						desc = L["Set Gradient Maximum Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.GradientMax.r, self.db.profile.GradientMax.g, self.db.profile.GradientMax.b, self.db.profile.GradientMax.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.GradientMax.r, self.db.profile.GradientMax.g, self.db.profile.GradientMax.b, self.db.profile.GradientMax.a = r, g, b, a
					    end,
					    hasAlpha = true,
					},
				},
			},
			texturedtab = {
				name = L["Textured Tab"],
				desc = L["Toggle the Texture of the Tabs"],
				type = "toggle",
				get = function()
					return self.db.profile.TexturedTab
				end,
				set = function(v)
					self.db.profile.TexturedTab = v
				end,
			},
			warnings = {
				name = L["Show Warnings"],
				desc = L["Toggle the Showing of Warnings"],
				type = "toggle",
				get = function()
					return self.db.profile.Warnings
				end,
				set = function(v)
					self.db.profile.Warnings = v
				end,
				order = 200,
			},
			gradient = {
				name = L["Gradient"],
				desc = L["Change the Gradient Effect settings"],
				type = "group",
				args = {
					enable = {
						name = L["Gradient Effect"],
						desc = L["Toggle the Gradient Effect"],
						type = "toggle",
						get = function()
							return self.db.profile.Gradient.enable
						end,
						set = function (v)
							self.db.profile.Gradient.enable = v
						end,
					},
					invert = {
						name = L["Invert Gradient"],
						desc = L["Invert the Gradient Effect"],
						type = "toggle",
						get = function()
							return self.db.profile.Gradient.invert
						end,
						set = function (v)
							self.db.profile.Gradient.invert = v
						end,
					},
					rotate = {
						name = L["Rotate Gradient"],
						desc = L["Rotate the Gradient Effect"],
						type = "toggle",
						get = function()
							return self.db.profile.Gradient.rotate
						end,
						set = function (v)
							self.db.profile.Gradient.rotate = v
						end,
					},
				},
			},
			fadeheight = {
				name = L["Fade Height"],
				desc = L["Change the Fade Height settings"],
				type = "group",
				args = {
					enable = {
						name = L["Global Fade Height"],
						desc = L["Toggle the Global Fade Height"],
						type = "toggle",
						get = function()
							return self.db.profile.FadeHeight.enable
						end,
						set = function (v)
							self.db.profile.FadeHeight.enable = v
						end,
					},
					value = {
						name = L["Fade Height value"],
						desc = L["Change the Height of the Fade Effect"],
						type = "range",
						step = 1,
						min = 0,
						max = 1000,
						get = function()
							return self.db.profile.FadeHeight.value
						end,
						set = function (v)
							self.db.profile.FadeHeight.value = v
						end,
					},
					force = {
						name = L["Force the Global Fade Height"],
						desc = L["Force ALL Frame Fade Height's to be Global"],
						type = "toggle",
						get = function()
							return self.db.profile.FadeHeight.force
						end,
						set = function (v)
							self.db.profile.FadeHeight.force = v
						end,
					},
				},
			},
			delay = {
				name = L["Skinning Delays"],
				desc = L["Change the Skinning Delays settings"],
				type = "group",
				args = {
					init = {
						name = L["Initial Delay"],
						desc = L["Set the Delay before Skinning Blizzard Frames"],
						type = "range",
						step = 0.5,
						min = 0,
						max = 10,
						get = function()
							return self.db.profile.Delay.Init
						end,
						set = function (v)
							self.db.profile.Delay.Init = v
						end,
					},
					addons = {
						name = L["Addons Delay"],
						desc = L["Set the Delay before Skinning Addons Frames"],
						type = "range",
						step = 0.5,
						min = 0,
						max = 10,
						get = function()
							return self.db.profile.Delay.Addons
						end,
						set = function (v)
							self.db.profile.Delay.Addons = v
						end,
					},
					lods = {
						name = L["LoD Addons Delay"],
						desc = L["Set the Delay before Skinning Load on Demand Frames"],
						type = "range",
						step = 0.5,
						min = 0,
						max = 10,
						get = function()
							return self.db.profile.Delay.LoDs
						end,
						set = function (v)
							self.db.profile.Delay.LoDs = v
						end,
					},
				},
			},
			viewport = {
				name = L["View Port"],
				desc = L["Change the ViewPort settings"],
				type = "group",
				args = {
					top = {
						name = L["VP Top"],
						desc = L["Change Height of the Top Band"],
						type = "range",
						step = 1,
						min = 0,
						max = 256,
						get = function ()
							return self.db.profile.ViewPort.top
						end,
						set = function (v)
							self.db.profile.ViewPort.top = v
							self:ViewPort_top()
						end,
					},
					bottom = {
						name = L["VP Bottom"],
						desc = L["Change Height of the Bottom Band"],
						type = "range",
						step = 1,
						min = 0,
						max = 256,
						get = function ()
							return self.db.profile.ViewPort.bottom
						end,
						set = function (v)
							self.db.profile.ViewPort.bottom = v
							self:ViewPort_bottom()
						end,
					},
					yres = {
						name = L["VP YResolution"],
						desc = L["Change Y Resolution"],
						type = "range",
						step = 2,
						min = 0,
						max = 1600,
						get = function ()
							return self.db.profile.ViewPort.YResolution
						end,
						set = function (v)
							self.db.profile.ViewPort.YResolution = v
							self.db.profile.ViewPort.scaling = 768 / self.db.profile.ViewPort.YResolution
				            self.initialized.ViewPort = nil
				            self:ViewPort()
						end,
					},
					show = {
						name = L["ViewPort Show"],
						desc = L["Toggle the ViewPort"],
						type = "toggle",
						get = function()
							return self.db.profile.ViewPort.shown
						end,
						set = function (v)
							self.db.profile.ViewPort.shown = v
							if self.initialized.ViewPort then
                                self:ViewPort_reset()
							else
								self:ViewPort()
							end
						end,
						order = 50,
					},
					overlay = {
						name = L["ViewPort Overlay"],
						desc = L["Toggle the ViewPort Overlay"],
						type = "toggle",
						get = function()
							return self.db.profile.ViewPort.overlay
						end,
						set = function (v)
							self.db.profile.ViewPort.overlay = v
			            	self.initialized.ViewPort = nil
							self:ViewPort()
						end,
					},
					colour = {
						name = L["ViewPort Colors"],
						desc = L["Set ViewPort Colors"],
						type = "color",
					    get = function()
					        return self.db.profile.ViewPort.r, self.db.profile.ViewPort.g, self.db.profile.ViewPort.b, self.db.profile.ViewPort.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.ViewPort.r, self.db.profile.ViewPort.g, self.db.profile.ViewPort.b, self.db.profile.ViewPort.a = r, g, b, a
					    end,
					    hasAlpha = true,
					},
				},
			},
			topframe = {
				name = L["Top Frame"],
				desc = L["Change the TopFrame settings"],
				type = "group",
				args = {
					height = {
						name = L["TF Height"],
						desc = L["Change Height of the TopFrame"],
						type = "range",
						step = 1,
						min = 0,
						max = 500,
						get = function ()
							return self.db.profile.TopFrame.height
						end,
						set = function (v)
							self.db.profile.TopFrame.height = v
							if self.initialized.TopFrame then
								self.topframe:SetHeight(v)
							end
						end,
					},
					width = {
						name = L["TF Width"],
						desc = L["Change Width of the TopFrame"],
						type = "range",
						step = 1,
						min = 0,
						max = 2000,
						get = function ()
							return self.db.profile.TopFrame.width
						end,
						set = function (v)
							self.db.profile.TopFrame.width = v
							if self.initialized.TopFrame then
								self.topframe:SetWidth(v)
							end
						end,
					},
					show = {
						name = L["TopFrame Show"],
						desc = L["Toggle the TopFrame"],
						type = "toggle",
						get = function()
							return self.db.profile.TopFrame.shown
						end,
						set = function (v)
							self.db.profile.TopFrame.shown = v
							if self.initialized.TopFrame then
								if self.topframe:IsVisible() then
									self.topframe:Hide()
								else
									self.topframe:Show()
								end
							else
								self:TopFrame()
							end
						end,
						order = 50,
					},
					fadeheight = {
						name = L["TF Fade Height"],
						desc = L["Change the Height of the Fade Effect"],
						type = "range",
						step = 1,
						min = 0,
						max = 500,
						get = function ()
							return self.db.profile.TopFrame.fheight
						end,
						set = function (v)
							self.db.profile.TopFrame.fheight = v
							if self.initialized.TopFrame then
								if self.db.profile.FadeHeight.enable and self.db.profile.FadeHeight.force then
								-- set the Fade Height to the global value if 'forced'
								-- making sure that it isn't greater than the frame height
									fh = self.db.profile.FadeHeight.value <= math.ceil(self.topframe:GetHeight()) and self.db.profile.FadeHeight.value or math.ceil(self.topframe:GetHeight())
								elseif self.db.profile.TopFrame.fheight then
									fh = self.db.profile.TopFrame.fheight <= math.ceil(self.topframe:GetHeight()) and self.db.profile.TopFrame.fheight or math.ceil(self.topframe:GetHeight())
								end
								if self.db.profile.TopFrame.invert then self.topframe.tfade:SetPoint("TOPRIGHT", self.topframe, "BOTTOMRIGHT", 4, (fh - 4))
								else self.topframe.tfade:SetPoint("BOTTOMRIGHT", self.topframe, "TOPRIGHT", -4, -(fh - 4)) end
							end
						end,
					},
					xyOff = {
						name = L["TF Move Origin offscreen"],
						desc = L["Hide Border on Left and Top"],
						type = "toggle",
						get = function ()
							return self.db.profile.TopFrame.xyOff
						end,
						set = function (v)
							self.db.profile.TopFrame.xyOff = v
							if self.initialized.TopFrame then
								if self.db.profile.TopFrame.xyOff then
									self.topframe:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -6, 6)
								else
									self.topframe:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -3, 3)
								end
							end
						end,
					},
					borderOff = {
						name = L["TF Toggle Border"],
						desc = L["Toggle the Border"],
						type = "toggle",
						get = function ()
							return self.db.profile.TopFrame.borderOff
						end,
						set = function (v)
							self.db.profile.TopFrame.borderOff = v
						end,
					},
					alpha = {
						name = L["TF Alpha"],
						desc = L["Change Alpha value of the TopFrame"],
						type = "range",
						step = 0.1,
						min = 0,
						max = 1,
						get = function ()
							return self.db.profile.TopFrame.alpha
						end,
						set = function (v)
							self.db.profile.TopFrame.alpha = v
						end,
					},
					invert = {
						name = L["TF Invert Gradient"],
						desc = L["Toggle the Inversion of the Gradient"],
						type = "toggle",
						get = function ()
							return self.db.profile.TopFrame.invert
						end,
						set = function (v)
							self.db.profile.TopFrame.invert = v
						end,
					},
					rotate = {
						name = L["TF Rotate Gradient"],
						desc = L["Toggle the Rotation of the Gradient"],
						type = "toggle",
						get = function()
							return self.db.profile.TopFrame.rotate
						end,
						set = function (v)
							self.db.profile.TopFrame.rotate = v
						end,
					},
					adjust = {
						name = L["Adjust Character Frames"],
						desc = L["Moves Character Frames below the Top Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.TopFrame.adjustpanels
						end,
						set = function (v)
							self.db.profile.TopFrame.adjustpanels = v
							SetLeftFrame(UIParent.left or nil)
						end,
					},
					
				},
			},
			middleframe = {
				name = L["Middle Frame(s)"],
				desc = L["Change the MiddleFrame(s) settings"],
				type = "group",
				args = {
					fadeheight = {
						name = L["MF Fade Height"],
						desc = L["Change the Height of the Fade Effect"],
						type = "range",
						step = 1,
						min = 0,
						max = 500,
						get = function ()
							return self.db.profile.MiddleFrame.fheight
						end,
						set = function (v)
							self.db.profile.MiddleFrame.fheight = v
						end,
					},
					borderOff = {
						name = L["MF Toggle Border"],
						desc = L["Toggle the Border"],
						type = "toggle",
						get = function ()
							return self.db.profile.MiddleFrame.borderOff
						end,
						set = function (v)
							self.db.profile.MiddleFrame.borderOff = v
						end,
					},
					colour = {
						name = L["MF Colour"],
						desc = L["Change the Colour of the MiddleFrame(s)"],
						type = "color",
					    get = function()
					        return self.db.profile.MiddleFrame.r, self.db.profile.MiddleFrame.g, self.db.profile.MiddleFrame.b, self.db.profile.MiddleFrame.a
					    end,
					    set = function(r, g, b, a)
					        self.db.profile.MiddleFrame.r, self.db.profile.MiddleFrame.g, self.db.profile.MiddleFrame.b, self.db.profile.MiddleFrame.a = r, g, b, a
					    end,
					    hasAlpha = true,
   					},
					mf1 = {
						name = L["MiddleFrame1 Show"],
						desc = L["Toggle the MiddleFrame1"],
						type = "toggle",
						get = function()
							return self.db.profile.MiddleFrame1.shown
						end,
						set = function (v)
							self.db.profile.MiddleFrame1.shown = v
							if self.initialized.MiddleFrame1 then
								if self.middleframe1:IsVisible() then
									self.middleframe1:Hide()
								else
									self.middleframe1:Show()
								end
							else
								self:createMiddleFrame(1)
							end
						end,
						order = 10,
					},
					mf2 = {
						name = L["MiddleFrame2 Show"],
						desc = L["Toggle the MiddleFrame2"],
						type = "toggle",
						get = function()
							return self.db.profile.MiddleFrame2.shown
						end,
						set = function (v)
							self.db.profile.MiddleFrame2.shown = v
							if self.initialized.MiddleFrame2 then
								if self.middleframe2:IsVisible() then
									self.middleframe2:Hide()
								else
									self.middleframe2:Show()
								end
							else
								self:createMiddleFrame(2)
							end
						end,
						order = 20,
					},
					mf3 = {
						name = L["MiddleFrame3 Show"],
						desc = L["Toggle the MiddleFrame3"],
						type = "toggle",
						get = function()
							return self.db.profile.MiddleFrame3.shown
						end,
						set = function (v)
							self.db.profile.MiddleFrame3.shown = v
							if self.initialized.MiddleFrame3 then
								if self.middleframe3:IsVisible() then
									self.middleframe3:Hide()
								else
									self.middleframe3:Show()
								end
							else
								self:createMiddleFrame(3)
							end
						end,
						order = 30,
					},
					mf4 = {
						name = L["MiddleFrame4 Show"],
						desc = L["Toggle the MiddleFrame4"],
						type = "toggle",
						get = function()
							return self.db.profile.MiddleFrame4.shown
						end,
						set = function (v)
							self.db.profile.MiddleFrame4.shown = v
							if self.initialized.MiddleFrame4 then
								if self.middleframe4:IsVisible() then
									self.middleframe4:Hide()
								else
									self.middleframe4:Show()
								end
							else
								self:createMiddleFrame(4)
							end
						end,
						order = 40,
					},
					mf5 = {
							name = L["MiddleFrame5 Show"],
							desc = L["Toggle the MiddleFrame5"],
							type = "toggle",
							get = function()
								return self.db.profile.MiddleFrame5.shown
							end,
							set = function (v)
								self.db.profile.MiddleFrame5.shown = v
								if self.initialized.MiddleFrame5 then
									if self.middleframe5:IsVisible() then
										self.middleframe5:Hide()
									else
										self.middleframe5:Show()
									end
								else
									self:createMiddleFrame(5)
								end
							end,
							order = 50,
					},
					mf6 = {
							name = L["MiddleFrame6 Show"],
							desc = L["Toggle the MiddleFrame6"],
							type = "toggle",
							get = function()
								return self.db.profile.MiddleFrame6.shown
							end,
							set = function (v)
								self.db.profile.MiddleFrame6.shown = v
								if self.initialized.MiddleFrame6 then
									if self.middleframe6:IsVisible() then
										self.middleframe6:Hide()
									else
										self.middleframe6:Show()
									end
								else
									self:createMiddleFrame(6)
								end
							end,
							order = 60,
					},
					mf7 = {
							name = L["MiddleFrame7 Show"],
							desc = L["Toggle the MiddleFrame7"],
							type = "toggle",
							get = function()
								return self.db.profile.MiddleFrame7.shown
							end,
							set = function (v)
								self.db.profile.MiddleFrame7.shown = v
								if self.initialized.MiddleFrame7 then
									if self.middleframe7:IsVisible() then
										self.middleframe7:Hide()
									else
										self.middleframe7:Show()
									end
								else
									self:createMiddleFrame(7)
								end
							end,
							order = 70,
					},
					mf8 = {
							name = L["MiddleFrame8 Show"],
							desc = L["Toggle the MiddleFrame8"],
							type = "toggle",
							get = function()
								return self.db.profile.MiddleFrame8.shown
							end,
							set = function (v)
								self.db.profile.MiddleFrame8.shown = v
								if self.initialized.MiddleFrame8 then
									if self.middleframe8:IsVisible() then
										self.middleframe8:Hide()
									else
										self.middleframe8:Show()
									end
								else
									self:createMiddleFrame(8)
								end
							end,
							order = 80,
					},
					mf9 = {
						name = L["MiddleFrame9 Show"],
						desc = L["Toggle the MiddleFrame9"],
						type = "toggle",
						get = function()
							return self.db.profile.MiddleFrame9.shown
						end,
						set = function (v)
							self.db.profile.MiddleFrame9.shown = v
							if self.initialized.MiddleFrame9 then
								if self.middleframe9:IsVisible() then
									self.middleframe9:Hide()
								else
									self.middleframe9:Show()
								end
							else
								self:createMiddleFrame(9)
							end
						end,
						order = 90,
					},
				},
			},
			bottomframe = {
				name = L["Bottom Frame"],
				desc = L["Change the BottomFrame settings"],
				type = "group",
				args = {
					height = {
						name = L["BF Height"],
						desc = L["Change Height of the BottomFrame"],
						type = "range",
						step = 1,
						min = 0,
						max = 500,
						get = function ()
							return self.db.profile.BottomFrame.height
						end,
						set = function (v)
							self.db.profile.BottomFrame.height = v
							if self.initialized.BottomFrame then
								self.bottomframe:SetHeight(v)
							end
						end,
					},
					width = {
						name = L["BF Width"],
						desc = L["Change Width of the BottomFrame"],
						type = "range",
						step = 1,
						min = 0,
						max = 2000,
						get = function ()
							return self.db.profile.BottomFrame.width
						end,
						set = function (v)
							self.db.profile.BottomFrame.width = v
							if self.initialized.BottomFrame then
								self.bottomframe:SetWidth(v)
							end
						end,
					},
					show = {
						name = L["BottomFrame Show"],
						desc = L["Toggle the BottomFrame"],
						type = "toggle",
						get = function()
							return self.db.profile.BottomFrame.shown
						end,
						set = function (v)
							self.db.profile.BottomFrame.shown = v
							if self.initialized.BottomFrame then
								if self.bottomframe:IsVisible() then
									self.bottomframe:Hide()
								else
									self.bottomframe:Show()
								end
							else
								self:BottomFrame()
							end
						end,
						order = 50,
					},
					fadeheight = {
						name = L["BF Fade Height"],
						desc = L["Change the Height of the Fade Effect"],
						type = "range",
						step = 1,
						min = 0,
						max = 500,
						get = function ()
							return self.db.profile.BottomFrame.fheight
						end,
						set = function (v)
							self.db.profile.BottomFrame.fheight = v
							if self.initialized.BottomFrame then
								if self.db.profile.FadeHeight.enable and self.db.profile.FadeHeight.force then
								-- set the Fade Height to the global value if 'forced'
								-- making sure that it isn't greater than the frame height
									fh = self.db.profile.FadeHeight.value <= math.ceil(self.bottomframe:GetHeight()) and self.db.profile.FadeHeight.value or math.ceil(self.bottomframe:GetHeight())
								elseif self.db.profile.BottomFrame.fheight then
									fh = self.db.profile.BottomFrame.fheight <= math.ceil(self.bottomframe:GetHeight()) and self.db.profile.BottomFrame.fheight or math.ceil(self.bottomframe:GetHeight())
								end
								if self.db.profile.BottomFrame.invert then self.bottomframe.tfade:SetPoint("TOPRIGHT", self.bottomframe, "BOTTOMRIGHT", 4, (fh - 4))
								else self.bottomframe.tfade:SetPoint("BOTTOMRIGHT", self.bottomframe, "TOPRIGHT", -4, -(fh - 4)) end
							end
						end,
					},
					xyOff = {
						name = L["BF Move Origin offscreen"],
						desc = L["Hide Border on Left and Bottom"],
						type = "toggle",
						get = function ()
							return self.db.profile.BottomFrame.xyOff
						end,
						set = function (v)
							self.db.profile.BottomFrame.xyOff = v
							if self.initialized.BottomFrame then
								if self.db.profile.BottomFrame.xyOff then
									self.bottomframe:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", -6, -6)
								else
									self.bottomframe:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", -3, -3)
								end
							end
						end,
					},
					borderOff = {
						name = L["BF Toggle Border"],
						desc = L["Toggle the Border"],
						type = "toggle",
						get = function ()
							return self.db.profile.BottomFrame.borderOff
						end,
						set = function (v)
							self.db.profile.BottomFrame.borderOff = v
						end,
					},
					alpha = {
						name = L["BF Alpha"],
						desc = L["Change Alpha value of the BottomFrame"],
						type = "range",
						step = 0.1,
						min = 0,
						max = 1,
						get = function ()
							return self.db.profile.BottomFrame.alpha
						end,
						set = function (v)
							self.db.profile.BottomFrame.alpha = v
						end,
					},
					invert = {
						name = L["BF Invert Gradient"],
						desc = L["Toggle the Inversion of the Gradient"],
						type = "toggle",
						get = function ()
							return self.db.profile.BottomFrame.invert
						end,
						set = function (v)
							self.db.profile.BottomFrame.invert = v
						end,
					},
					rotate = {
						name = L["BF Rotate Gradient"],
						desc = L["Toggle the Rotation of the Gradient"],
						type = "toggle",
						get = function()
							return self.db.profile.BottomFrame.rotate
						end,
						set = function (v)
							self.db.profile.BottomFrame.rotate = v
						end,
					},
				},
			},
			sbtexture = {
				name = L["Status Bar Texture"],
				desc = L["Choose the Texture for the Status Bars"],
				type = 'text',
				get = function()
					return self.db.profile.SBTexture
				end,
				set = function(v)
					self.db.profile.SBTexture = v
					self:updateSBTexture()
				end,
				validate = Surface:List(),
			},
			char = {
				name = L["Character Frames"],
				desc = L["Change the Character Frames settings"],
				type = "group",
				args = {
					none = {
						name = L["Disable all Character Frames"],
						desc = L["Disable all the Character Frames from being skinned"],
						type = "execute",
						func = function() for k, frameName in pairs({ "CharacterFrames", "PetStableFrame", "SpellBookFrame", "TalentFrame", "DressUpFrame", "FriendsFrame", "TradeSkill", "CraftFrame", "TradeFrame", "RaidUI" })	do
							self.db.profile[frameName] = false
							end
							self.db.profile["QuestLog"].skin = false 
						end,
						order = 50,
					},
					character = {
						name = L["Character Frames"],
						desc = L["Toggle the skin of the Character Frames"],
						type = "toggle",
						get = function()
							return self.db.profile.CharacterFrames
						end,
						set = function(v)
							self.db.profile.CharacterFrames = v
							self:CharacterFrames()
						end,
					},
					stable = {
						name = L["Stable Frame"],
						desc = L["Toggle the skin of the Stable Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.PetStableFrame
						end,
						set = function(v)
							self.db.profile.PetStableFrame = v
							self:PetStableFrame()
						end,
					},
					spellbook = {
						name = L["SpellBook Frame"],
						desc = L["Toggle the skin of the SpellBook Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.SpellBookFrame
						end,
						set = function(v)
							self.db.profile.SpellBookFrame = v
							self:SpellBookFrame()
						end,
					},
					talent = {
						name = L["Talent Frame"],
						desc = L["Toggle the skin of the Talent Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.TalentFrame
						end,
						set = function(v)
							self.db.profile.TalentFrame = v
							self:TalentFrame()
						end,
					},
					dressup = {
						name = L["DressUP Frame"],
						desc = L["Toggle the skin of the DressUp Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.DressUpFrame
						end,
						set = function(v)
							self.db.profile.DressUpFrame = v
							self:DressUpFrame()
						end,
					},
					friends = {
						name = L["Social Frame"],
						desc = L["Toggle the skin of the Social Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.FriendsFrame
						end,
						set = function(v)
							self.db.profile.FriendsFrame = v
							self:FriendsFrame()
							end,
					},
					tradeskill = {
						name = L["Trade Skill Frame"],
						desc = L["Toggle the skin of the Trade Skill Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.TradeSkill
						end,
						set = function(v)
							self.db.profile.TradeSkill = v
							self:TradeSkill()
						end,
					},
					craft = {
						name = L["Craft Frame"],
						desc = L["Toggle the skin of the Craft Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.CraftFrame
						end,
						set = function(v)
							self.db.profile.CraftFrame = v
							self:CraftFrame()
						end,
					},
					trade = {
						name = L["Trade Frame"],
						desc = L["Toggle the skin of the Trade Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.TradeFrame
						end,
						set = function(v)
							self.db.profile.TradeFrame = v
							self:TradeFrame()
						end,
					},
					questlog = {
						name = L["Quest Log"],
						desc = L["Change the Quest Log settings"],
						type = "group",
						args = {
							skin = {
								name = L["Quest Log Skin"],
								desc = L["Toggle the skin of the Quest Log Frame"],
								type = "toggle",
								get = function()
									return self.db.profile.QuestLog.skin
								end,
								set = function (v)
									self.db.profile.QuestLog.skin = v
									self:QuestLog()
								end,
								order = 50,
							},
							size = {
								name = L["Quest Watch Size"],
								desc = L["Set the Quest Watch Font Size (Normal, Small)"],
								type = "range",
								step = 1,
								min = 1,
								max = 2,
								get = function()
									return self.db.profile.QuestLog.size
								end,
								set = function (v)
									self.db.profile.QuestLog.size = v
									self:reSizeQW()
								end,
							},
						},
					},
					raidui = {
						name = L["RaidUI Frame"],
						desc = L["Toggle the skin of the RaidUI Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.RaidUI
						end,
						set = function(v)
							self.db.profile.RaidUI = v
							self:RaidUI()
						end,
					},
				},
			},
			ui = {
				name = L["UI Frames"],
				desc = L["Change the UI Elements settings"],
				type = "group",
				args = {
					none = {
						name = L["Disable all UI Frames"],
						desc = L["Disable all the UI Frames from being skinned"],
						type = "execute",
						func = function() for k, keyName in pairs({ "StaticPopups", "ChatTabs", "ChatFrames", "LootFrame", "ContainerFrames", "StackSplit", "ItemText", "Colours", "WorldMap", "HelpFrame", "KnowledgeBase", "Inspect", "BattleScore", "ScriptErrors", "Tutorial", "DropDowns", "MenuFrames", "BankFrame", "MailFrame", "AuctionFrame", "CoinPickup", "GMSurveyUI", "LFGFrame",    "ItemSocketingUI" })	do
							self.db.profile[keyName] = false
							end
							for k, keyName in pairs({ "Tooltips", "MirrorTimers", "CastingBar", "ChatEditBox", "GroupLoot", "MainMenuBar"})	do
								self.db.profile[keyName].skin = false
							end
						end,
						order = 50,
					},
					tooltip = {
						name = L["Tooltips"],
						desc = L["Change the Tooltip settings"],
						type = "group",
						args = {
							skin = {
								name = L["Tooltip Skin"],
								desc = L["Toggle the skin of the Tooltips"],
								type = "toggle",
								get = function()
									return self.db.profile.Tooltips.skin
								end,
								set = function (v)
									self.db.profile.Tooltips.skin = v
									self:Tooltips()
								end,
								order = 50,
							},
							style = {
								name = L["Tooltips Style"],
								desc = L["Set the Tooltips style (Rounded, Flat, Custom)"],
								type = "range",
								step = 1,
								min = 1,
								max = 3,
								get = function()
									return self.db.profile.Tooltips.style
								end,
								set = function (v)
									self.db.profile.Tooltips.style = v
									self:Tooltips()
								end,
							},
							glazesb = {
								name = L["Glaze Status Bar"],
								desc = L["Toggle the glazing Status Bar"],
								type = "toggle",
								get = function()
									return self.db.profile.Tooltips.glazesb
								end,
								set = function (v)
									self.db.profile.Tooltips.glazesb = v
									self:Tooltips()
								end,
							},
						},
					},
					timers = {
						name = L["Timer Frames"],
						desc = L["Change the Timer Settings"],
						type = "group",
						args = {
							skin = {
								name = L["Timer Skin"],
								desc = L["Toggle the skin of the Timer"],
								type = "toggle",
								get = function()
									return self.db.profile.MirrorTimers.skin
								end,
								set = function (v)
									self.db.profile.MirrorTimers.skin = v
									self:MirrorTimers()
								end,
								order = 50,
							},
							glaze = {
								name = L["Glaze Timer"],
								desc = L["Toggle the glazing Timer"],
								type = "toggle",
								get = function()
									return self.db.profile.MirrorTimers.glaze
								end,
								set = function (v)
									self.db.profile.MirrorTimers.glaze = v
									self:MirrorTimers()
								end,
							},
						},
					},
					castbar = {
						name = L["Casting Bar Frame"],
						desc = L["Change the Casting Bar Settings"],
						type = "group",
						args = {
							skin = {
								name = L["Casting Bar Skin"],
								desc = L["Toggle the skin of the Casting Bar"],
								type = "toggle",
								get = function()
									return self.db.profile.CastingBar.skin
								end,
								set = function (v)
									self.db.profile.CastingBar.skin = v
									self:CastingBar()
								end,
								order = 50,
							},
							glaze = {
								name = L["Glaze Casting Bar"],
								desc = L["Toggle the glazing Casting Bar"],
								type = "toggle",
								get = function()
									return self.db.profile.CastingBar.glaze
								end,
								set = function (v)
									self.db.profile.CastingBar.glaze = v
									self:CastingBar()
								end,
							},
						},
					},
					popups = {
						name = L["Static Popups"],
						desc = L["Toggle the skin of Static Popups"],
						type = "toggle",
						get = function()
							return self.db.profile.StaticPopups
						end,
						set = function(v)
							self.db.profile.StaticPopups = v
							self:StaticPopups()
						end,
					},
					chattabs = {
						name = L["Chat Tabs"],
						type = "toggle",
						desc = L["Toggle the skin of the Chat Tabs"],
						get = function()
							return self.db.profile.ChatTabs
						end,
						set = function(v)
							self.db.profile.ChatTabs = v
							self:ChatTabs()
						end,
					},
					chatframes = {
						name = L["Chat Frames"],
						desc = L["Toggle the skin of the Chat Frames"],
						type = "toggle",
						get = function()
							return self.db.profile.ChatFrames
						end,
						set = function(v)
							self.db.profile.ChatFrames = v
							self:ChatFrames()
						end,
					},
					chateb = {
						name = L["Chat Edit Box"],
						desc = L["Change the Chat Edit Box settings"],
						type = "group",
						args = {
							skin = {
								name = L["Chat Edit Box Skin"],
								desc = L["Toggle the skin of the Chat Edit Box Frame"],
								type = "toggle",
								get = function()
									return self.db.profile.ChatEditBox.skin
								end,
								set = function (v)
									self.db.profile.ChatEditBox.skin = v
									self:ChatEditBox()
								end,
								order = 50,
							},
							style = {
								name = L["Chat Edit Box Style"],
								desc = L["Set the Chat Edit Box style (Frame, EditBox)"],
								type = "range",
								step = 1,
								min = 1,
								max = 2,
								get = function()
									return self.db.profile.ChatEditBox.style
								end,
								set = function (v)
									self.db.profile.ChatEditBox.style = v
									self:ChatEditBox()
								end,
							},
						},
					},
					loot = {
						name = L["Loot Frame"],
						desc = L["Toggle the skin of the Loot Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.LootFrame
						end,
						set = function(v)
							self.db.profile.LootFrame = v
							self:LootFrame()
						end,
					},
					grouploot = {
						name = L["Group Loot Frame"],
						desc = L["Change the GroupLoot settings"],
						type = "group",
						args = {
							skin = {
								name = L["GroupLoot Skin"],
								desc = L["Toggle the skin of the GroupLoot Frame"],
								type = "toggle",
								get = function()
									return self.db.profile.GroupLoot.skin
								end,
								set = function (v)
									self.db.profile.GroupLoot.skin = v
									self:GroupLoot()
								end,
								order = 50,
							},
							size = {
								name = L["GroupLoot Size"],
								desc = L["Set the GroupLoot size (Normal, Small, Micro)"],
								type = "range",
								step = 1,
								min = 1,
								max = 3,
								get = function()
									return self.db.profile.GroupLoot.size
								end,
								set = function (v)
									self.db.profile.GroupLoot.size = v
									self:GroupLoot()
								end,
							},
						},
					},
					container = {
						name = L["Container Frames"],
						desc = L["Change the Container Frames settings"],
						type = "group",
						args = {
							skin = {
								name = L["Tooltip Skin"],
								desc = L["Toggle the skin of the Container Frames"],
								type = "toggle",
								get = function()
									return self.db.profile.ContainerFrames.skin
								end,
								set = function (v)
									self.db.profile.ContainerFrames.skin = v
									self:ContainerFrames()
								end,
								order = 50,
							},
							fadeheight = {
								name = L["CF Fade Height"],
								desc = L["Change the Height of the Fade Effect"],
								type = "range",
								step = 1,
								min = 0,
								max = 300,
								get = function ()
									return self.db.profile.ContainerFrames.fheight
								end,
								set = function (v)
									self.db.profile.ContainerFrames.fheight = v
									self:ContainerFrames()
								end,
							},
						},
					},
					stack = {
						name = L["Stack Split Frame"],
						desc = L["Toggle the skin of the Stack Split Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.StackSplit
						end,
						set = function(v)
							self.db.profile.StackSplit = v
							self:StackSplit()
						end,
					},
					itemtext = {
						name = L["Item Text Frame"],
						desc = L["Toggle the skin of the Item Text Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ItemText
						end,
						set = function(v)
							self.db.profile.ItemText = v
							self:ItemText()
						end,
					},
					colours = {
						name = L["Color Picker Frame"],
						desc = L["Toggle the skin of the Color Picker Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Colours
						end,
						set = function(v)
							self.db.profile.Colours = v
							self:ColorPicker()
						end,
					},
					map = {
						name = L["World Map Frame"],
						desc = L["Toggle the skin of the World Map Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.WorldMap
						end,
						set = function(v)
							self.db.profile.WorldMap = v
							self:WorldMap()
						end,
					},
					help = {
						name = L["Help Frame"],
						desc = L["Toggle the skin of the Help Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.HelpFrame
						end,
						set = function(v)
							self.db.profile.HelpFrame = v
							self:HelpFrame()
						end,
					},
					kbase = {
						name = L["Knowledge Base Frame"],
						desc = L["Toggle the skin of the Knowledge Base Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.KnowledgeBase
						end,
						set = function(v)
							self.db.profile.KnowledgeBase = v
							self:KnowledgeBase()
						end,
					},
					inspect = {
						name = L["Inspect Frame"],
						desc = L["Toggle the skin of the Inspect Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Inspect
						end,
						set = function(v)
							self.db.profile.Inspect = v
							self:InspectFrame()
							end,
					},
					battlescore = {
						name = L["Battle Score Frame"],
						desc = L["Toggle the skin of the Battle Score Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.BattleScore
						end,
						set = function(v)
							self.db.profile.BattleScore = v
							self:BattleScore()
						end,
					},
					scripterrors = {
						name = L["Script Errors Frame"],
						desc = L["Toggle the skin of the Script Errors Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ScriptErrors
						end,
						set = function(v)
							self.db.profile.ScriptErrors = v
							self:ScriptErrors()
						end,
					},
					tutorial = {
						name = L["Tutorial Frame"],
						desc = L["Toggle the skin of the Tutorial Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Tutorial
						end,
						set = function(v)
							self.db.profile.Tutorial = v
							self:Tutorial()
						end,
					},
					dropdowns = {
						name = L["DropDowns"],
						desc = L["Toggle the skin of the DropDowns"],
						type = "toggle",
						get = function()
							return self.db.profile.DropDowns
						end,
						set = function(v)
							self.db.profile.DropDowns = v
							self:DropDowns()
						end,
					},
					menu = {
						name = L["Menu Frames"],
						desc = L["Toggle the skin of the Menu Frames"],
						type = "toggle",
						get = function()
							return self.db.profile.MenuFrames
						end,
						set = function(v)
							self.db.profile.MenuFrames = v
							self:MenuFrames()
						end,
					},
					bank = {
						name = L["Bank Frame"],
						desc = L["Toggle the skin of the Bank Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.BankFrame
						end,
						set = function(v)
							self.db.profile.BankFrame = v
							self:BankFrame()
						end,
					},
					mail = {
						name = L["Mail Frame"],
						desc = L["Toggle the skin of the Mail Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.MailFrame
						end,
						set = function(v)
							self.db.profile.MailFrame = v
							self:MailFrame()
						end,
					},
					auction = {
						name = L["Auction Frame"],
						desc = L["Toggle the skin of the Auction Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.AuctionFrame
						end,
						set = function(v)
							self.db.profile.AuctionFrame = v
							self:AuctionFrame()
						end,
					},
					mainbar = {
						name = L["Main Menu Bar"],
						desc = L["Change the Main Menu Bar Frame Settings"],
						type = "group",
						args = {
							skin = {
								name = L["Main Menu Bar Skin"],
								desc = L["Toggle the skin of the Main Menu Bar"],
								type = "toggle",
								get = function()
									return self.db.profile.MainMenuBar.skin
								end,
								set = function (v)
									self.db.profile.MainMenuBar.skin = v
									self:MainMenuBar()
								end,
								order = 50,
							},
							glazesb = {
								name = L["Glaze Main Menu Bar Status Bar"],
								desc = L["Toggle the glazing Main Menu Bar Status Bar"],
								type = "toggle",
								get = function()
									return self.db.profile.MainMenuBar.glazesb
								end,
								set = function (v)
									self.db.profile.MainMenuBar.glazesb = v
									self:MainMenuBar()
								end,
							},
						},
					},
					coins = {
						name = L["Coin Pickup Frame"],
						desc = L["Toggle the skin of the Coin Pickup Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.CoinPickup
						end,
						set = function(v)
							self.db.profile.CoinPickup = v
							self:CoinPickup()
						end,
					},
					gmsurveyui = {
						name = L["GM Survey UI Frame"],
						desc = L["Toggle the skin of the GM Survey UI Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.GMSurveyUI
						end,
						set = function(v)
							self.db.profile.GMSurveyUI = v
							self:GMSurveyUI()
						end,
					},
					lfg = {
						name = L["LFG Frame"],
						desc = L["Toggle the skin of the LFG Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.LFGFrame
						end,
						set = function(v)
							self.db.profile.LFGFrame = v
							self:LFGFrame()
						end,
					},
					itemsocketingui = {
						name = L["ItemSocketingUI Frame"],
						desc = L["Toggle the skin of the ItemSocketingUI Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ItemSocketingUI
						end,
						set = function(v)
							self.db.profile.ItemSocketingUI = v
							self:ItemSocketingUI()
						end,
					},
				},
			},
			npc = {
				name = L["NPC Frames"],
				desc = L["Change the NPC Frames settings"],
				type = "group",
				args = {
					none = {
						name = L["Disable all NPC Frames"],
						desc = L["Disable all the NPC Frames from being skinned"],
						type = "execute",
						func = function() for k, frameName in pairs({ "MerchantFrames", "GossipFrame", "ClassTrainer", "TaxiFrame", "QuestFrame", "Battlefields", "ArenaFrame", "ArenaRegistrar", "GuildRegistrar", "Petition", "Tabard" }) do
							self.db.profile[frameName] = false
							end
						end,
						order = 50,
					},
					merchant = {
						name = L["Merchant Frames"],
						desc = L["Toggle the skin of the Merchant Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.MerchantFrames
						end,
						set = function(v)
							self.db.profile.MerchantFrames = v
							self:MerchantFrames()
						end,
					},
					gossip = {
						name = L["Gossip Frame"],
						desc = L["Toggle the skin of the Gossip Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.GossipFrame
						end,
						set = function(v)
							self.db.profile.GossipFrame = v
							self:GossipFrame()
						end,
					},
					trainer = {
						name = L["Class Trainer Frame"],
						desc = L["Toggle the skin of the Class Trainer Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ClassTrainer
						end,
						set = function(v)
							self.db.profile.ClassTrainer = v
							self:ClassTrainer()
						end,
					},
					taxi = {
						name = L["Taxi Frame"],
						desc = L["Toggle the skin of the Taxi Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.TaxiFrame
						end,
						set = function(v)
							self.db.profile.TaxiFrame = v
							self:TaxiFrame()
						end,
					},
					quest = {
						name = L["Quest Frame"],
						desc = L["Toggle the skin of the Quest Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.QuestFrame
						end,
						set = function(v)
							self.db.profile.QuestFrame = v
							self:QuestFrame()
						end,
					},
					battles = {
						name = L["Battlefields Frame"],
						desc = L["Toggle the skin of the Battlefields Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Battlefields
						end,
						set = function(v)
							self.db.profile.Battlefields = v
							self:Battlefields()
						end,
					},
					arena = {
						name = L["Arena Frame"],
						desc = L["Toggle the skin of the Arena Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ArenaFrame
						end,
						set = function(v)
							self.db.profile.ArenaFrame = v
							self:ArenaFrame()
						end,
					},
					arenaregistrar = {
						name = L["Arena Registrar Frame"],
						desc = L["Toggle the skin of the Arena Registrar Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.ArenaRegistrar
						end,
						set = function(v)
							self.db.profile.ArenaRegistrar = v
							self:ArenaRegistrar()
						end,
					},
					guildregistrar = {
						name = L["Guild Registrar Frame"],
						desc = L["Toggle the skin of the Guild Registrar Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.GuildRegistrar
						end,
						set = function(v)
							self.db.profile.GuildRegistrar = v
							self:GuildRegistrar()
						end,
					},
					petition = {
						name = L["Petition Frame"],
						desc = L["Toggle the skin of the Petition Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Petition
						end,
						set = function(v)
							self.db.profile.Petition = v
							self:Petition()
						end,
					},
					tabard = {
						name = L["Tabard Frame"],
						desc = L["Toggle the skin of the Tabard Frame"],
						type = "toggle",
						get = function()
							return self.db.profile.Tabard
						end,
						set = function(v)
							self.db.profile.Tabard = v
							self:Tabard()
						end,
					},
				},
			},
		},
	}
end
