options = {
    name = "Killing Blow Announcer",
    handler = KillingBlowAnnouncer,
    type = 'group',
    childGroups = "tab",
    args = {
        enablePVP		=	{
            type		=	"toggle",
            name		=	"Enable pvp only",
            desc		=	"Enables the addon to only work for player kills. If left unchecked it will announce and track every kill regardless if it's a player or not.",
            order 		= 	 1,
            get			=	"EnablePVP",
            set			=	"ToggleEnablePVP",
        },
        enableMinimapIcon		=	{
            type		=	"toggle",
            name		=	"Enable minimap icon",
            desc		=	"Enables the minimap icon.",
            order 		= 	 1,
            get			=	"GetEnableMinimapIcon",
            set			=	"ToggleEnableMinimapIcon",
        },
        Options= {
            name		=	"Chat",
            desc 		= 	"Options related to the chat message",
            type		=	"group",
            order		=	1,
            args		=	{
                enableMSG		=	{
                    type		=	"toggle",
                    name		=	"Enable chat message",
                    desc		=	"Enables the Killing blow chat message ",
                    order 		= 	 1,
                    width 		= 	"full",
                    get			=	"EnableMSG",
                    set			=	"ToggleEnableMSG",
                },

                msg = {
                    type = "input",
                    name = "Chat message",
                    desc = "The chat message displayed when you get a KB",
                    order = 2,
                    width = "full",
                    usage = "<Your message here>",
                    get = "GetMessage",
                    set = "SetMessage",
                },
                editChannel = {
                    name 		= "Channel",
                    desc 		= "Adjust to which channel the message gets printed.",
                    order 		= 3, width = "full",
                    type 		= "select",
                    values 		= {["say"] = "say",["yell"] = "yell",["raid"] = "raid",["party"] = "party",["guild"] = "guild"},
                    get		    = function(info) return KillingBlowAnnouncer:GetChatChannel(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetChatChannel(info,key) end,
                },
                header1		=	{
                    type		=	"header",
                    name		= 	 "",
                    order 		= 	 4,
                    width 		= 	"full",
                },
                toggleMessage		=	{
                    type		=	"toggle",
                    name		=	"Enable chat announcer message",
                    desc		=	"Enables announcing who you killed to the chat",
                    order 		= 	 5,
                    width 		= 	"full",
                    get			=	"EnableMSGAnnounce",
                    set			=	"ToggleEnableMSGAnnounce",
                },
                chatMessage = {
                    type = "input",
                    name = "Chat announce message",
                    desc = "The chat message displayed which will announce who you killed to the chat when you get a killing blow. Only works for player kils.",
                    order = 6,
                    width = "full",
                    usage = "<Your message here>",
                    get = "GetAnnounceMessage",
                    set = "SetAnnounceMessage",
                },
                chatMessagePreview = {
                    type = "description",
                    name = "The chat message above will display your name,who you've killed,which class the person was that you killed and in which zone this was. The default message will be displayed like this 'Eucalyptisch killed Eucal of class druid in Shadowmoon valley'. \n\nWhen changing the message make sure to write the ${} variables exactly as written below else it will just display ${playerr} instead of the actual player name. If you only want to display something like 'I killed Eucalyptisch in Shadowmoon valley' simply remove the unneeded ${} and it will work. For example the previous sentence would be 'I killed ${enemy} in ${zone}'.\n\nVariables:\n|cff3498db${player} = your playername.\n${enemy} = the killed player's name.\n${class} = the killed player's class.\n${zone} = the zone that the player was killed in.",
                    fontSize  = "medium",
                    order = 7,
                    width = "full",
                },
                editChatChannel = {
                    name 		= "Channel",
                    desc 		= "Adjust to which channel the announce chat message gets printed.",
                    order 		= 8, width = "full",
                    type 		= "select",
                    values 		= {["say"] = "say",["yell"] = "yell",["raid"] = "raid",["party"] = "party",["guild"] = "guild"},
                    get		    = function(info) return KillingBlowAnnouncer:GetChatAnnounceChannel(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetChatAnnounceChannel(info,key) end,
                },
            },
        },
        Options2= {
            name		=	"Tracker",
            desc 		= 	"Options related to the tracker frame",
            type		=	"group",
            order		=	2,
            args		=	{
                enableTracker		=	{
                    type		=	"toggle",
                    name		=	"Enable tracker",
                    order		=  	1,
                    desc		=	"Enables the Killing blow tracker frame.",
                    get			=	"EnableKBT",
                    set			=	"ToggleEnableKBT",
                },
                enableLock		=	{
                    type		=	"toggle",
                    name		=	"Enable drag",
                    order		=  	2,
                    desc		=	"Enables the user to drag the frame around.",
                    get			=	"EnableKBTDrag",
                    set			=	"ToggleEnableKBTDrag",
                },
                editBackground = {
                    name 		= "Background file",
                    desc 		= "Adjust background file of the tracker.",
                    order 		= 6, width = "double",
                    type 		= "select",
                    values 		= Media:HashTable("background"),
                    dialogControl = "LSM30_Background",
                    get		    = function(info) return KillingBlowAnnouncer:GetTrackerBackground(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetTrackerBackground(info,key) end,
                },
                editBorder = {
                    name 		= "Border file",
                    desc 		= "Adjust border file of the tracker.",
                    order 		= 6, width = "double",
                    type 		= "select",
                    values 		= Media:HashTable("border"),
                    dialogControl = "LSM30_Border",
                    get		    = function(info) return KillingBlowAnnouncer:GetTrackerBorder(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetTrackerBorder(info,key) end,
                },
                editFont = {
                    name 		= "Font",
                    desc 		= "Adjust the font settings.",
                    order 		= 6, width = "double",
                    type 		= "select",
                    values 		= Media:HashTable("font"),
                    dialogControl = "LSM30_Font",
                    get		    = function(info) return KillingBlowAnnouncer:GetTrackerFont(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetTrackerFont(info,key) end,
                },
            },
        },
        Options3= {
            name		=	"Killing blow announcer",
            desc 		= 	"Options related to the killing blow message",
            type		=	"group",
            order		=	3,
            args		=	{
                Options4= {
                    name		=	"Killing blow message",
                    desc 		= 	"Options related to the killing blow message",
                    type		=	"group",
                    order		=	3,
                    args		=	{
                        enablingEdit		=	{
                            type		=	"toggle",
                            name		=	"Snap message frame",
                            desc		=	"Snaps the killing blow message to the window for editing purposes. Disable this option when done editing.",
                            get			=	"EnableSnap",
                            width		= 	"full",
                            order		=	2,
                            set			=	"ToggleEnableSnap",
                        },
                        editMsg = {
                            type 		= "input",
                            name 		= "Killing blow message",
                            order 		= 3,
                            width		= "double",
                            desc 		= "The message that gets displayed when you make a killing blow",
                            usage 		= "<Your message here>",
                            get 		= "GetKillingMessage",
                            set		    = "SetKillingMessage",
                        },
                        editFont = {
                            name 		= "Font",
                            desc 		= "Adjust the font settings.",
                            order 		= 6, width = "double",
                            type 		= "select",
                            values 		= Media:HashTable("font"),
                            dialogControl = "LSM30_Font",
                            get		    = function(info) return KillingBlowAnnouncer:GetFont(info) end,
                            set 		= function(info,key) KillingBlowAnnouncer:SetFont(info,key) end,
                        },
                        editFontOutline = {
                            name 		= "Font Outline",
                            desc 		= "Adjust the font outline.",
                            order 		= 5, width = "double",
                            type 	    = "select",
                            get         = function(info) return KillingBlowAnnouncer:GetOutline(info) end,
                            set         = function(info,key) KillingBlowAnnouncer:SetOutline(info,key)end,
                            values      = {
                                NONE = "None",
                                OUTLINE = "Thin",
                                THICKOUTLINE = "Thick",
                            },
                        },
                        editColor		=	{
                            name		=	"Color",
                            desc		=	"Adjust the color of the message.",
                            order	    = 4,
                            width       = "double",
                            type        = "color", hasAlpha = false,
                            get         = function(info) return KillingBlowAnnouncer:GetRed(info),KillingBlowAnnouncer:GetGreen(info),KillingBlowAnnouncer:GetBlue(info) end,
                            set         = function(info, r, g, b) KillingBlowAnnouncer:SetRed(info,r) KillingBlowAnnouncer:SetGreen(info,g) KillingBlowAnnouncer:SetBlue(info,b) setColors() end,
                        },

                        editFontSize		=	{
                            type		=	"range",
                            name		=	"FontSize" ,
                            min 		= 	0,
                            max    		=   30,
                            width    	=   "double",
                            desc		=	"Adjust the font size. Default is 30.",
                            order		=	7,
                            get			=	"GetFontSize",
                            set			=	"SetFontSize",

                        },
                        editVisibleTime		=	{
                            type		=	"range",
                            name		=	"VisibleTime" ,
                            min 		= 	0,
                            max    		=   60,
                            width    	=   "double",
                            desc		=	"Adjust the time that the message is visible in seconds. Default is 3.",
                            order		=	8,
                            get			=	"GetVisibleTime",
                            set			=	"SetVisibleTime",

                        },
                        editFadeTime		=	{
                            type		=	"range",
                            name		=	"FadeTime" ,
                            min 		= 	0,
                            max    		=   20,
                            width    	=   "double",
                            desc		=	"Adjust the time that it takes for the message to fade from start to end in seconds. Default is 1.",
                            order		=	9,
                            get			=	"GetFadeTime",
                            set			=	"SetFadeTime",

                        },
                    },
                },
                Options5= {
                    name		=	"Killing blow image",
                    desc 		= 	"Options related to the killing blow image",
                    type		=	"group",
                    order		=	4,
                    args		=	{
                        enableKBIDebug		=	{
                            type		=	"toggle",
                            name		=	"Start image loop",
                            desc		=	"Loops the killing blow image to the window for editing purposes. Disable this option when done editing.",
                            get			=	"GetKBIDebug",
                            width		= 	"full",
                            order		=	2,
                            set			=	"ToggleKBIDebug",
                        },
                        chooseImage = {
                            name 		=	 "Image file",
                            desc 		=	 "Pick which image you want announced on a killing blow. See addon description on curse for a guide on how to add custom images.",
                            order 		=	 3, width = "double",
                            type 		= 	"select",
                            values 		= 	Media:HashTable("images"),
                            dialogControl = "LSM30_Font",
                            get		    =   function(info) return KillingBlowAnnouncer:GetKBIImage(info) end,
                            set 		=   function(info,key) KillingBlowAnnouncer:SetKBIImage(info,key) end,
                        },
                        editHeight		=	{
                            type		=	"range",
                            name		=	"Image height" ,
                            min 		= 	0,
                            max    		=   1000,
                            width    	=   "double",
                            desc		=	"Adjust the image height.",
                            order		=	5,
                            get			=	"GetKBIHeight",
                            set			=	"SetKBIHeight",

                        },
                        editWidth		=	{
                            type		=	"range",
                            name		=	"Image width" ,
                            min 		= 	0,
                            max    		=   1000,
                            width    	=   "double",
                            desc		=	"Adjust the image width.",
                            order		=	5,
                            get			=	"GetKBIWidth",
                            set			=	"SetKBIWidth",

                        },
                        editFadeInTime		=	{
                            type		=	"range",
                            name		=	"FadeIn time" ,
                            min 		= 	0,
                            max    		=   2,
                            width    	=   "double",
                            desc		=	"Adjust the time it takes for the image to fade in. Default is 0,5.",
                            order		=	7,
                            get			=	"GetFadeInTime",
                            set			=	"SetFadeInTime",

                        },
                        editFadeOutTime		=	{
                            type		=	"range",
                            name		=	"FadeOut time" ,
                            min 		= 	0,
                            max    		=   2,
                            width    	=   "double",
                            desc		=	"Adjust the time it takes for the image to fade out. Default is 0,5.",
                            order		=	8,
                            get			=	"GetFadeOutTime",
                            set			=	"SetFadeOutTime",

                        },
                        editEndDelay		=	{
                            type		=	"range",
                            name		=	"Image duration" ,
                            min 		= 	0,
                            max    		=   10,
                            width    	=   "double",
                            desc		=	"Adjust the time that the image is displayed after fadeIn ends. Default is 1.",
                            order		=	9,
                            get			=	"GetEndDelay",
                            set			=	"SetEndDelay",

                        },
                    },
                },
                enableKillingBlow		=	{
                    type		=	"toggle",
                    name		=	"Enable killing blow announcer",
                    order		=  	1,
                    desc		=	"Enables the Killing blow announcer frame.",
                    width		= 	"full",
                    get			=	"EnableKB",
                    set			=	"ToggleEnableKB",
                },
                enableKillingBlowSound		=	{
                    type		=	"toggle",
                    name		=	"Enable sound file",
                    order		=  	2,
                    desc		=	"Enables playing of a sound file.",
                    get			=	"EnableKBSound",
                    set			=	"ToggleEnableKBSound",
                },
                editSound = {
                    name 		= "Sound",
                    desc 		= "Adjust the sound that gets played.",
                    order 		= 2,
                    width		= 	"full",
                    type 		= "select",
                    values 		= Media:HashTable("sound"),
                    dialogControl = "LSM30_Sound",
                    get		    = function(info) return KillingBlowAnnouncer:GetSound(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetSound(info,key) end,
                },
                editSoundLevel = {
                    name 		= "Sound channel",
                    desc 		= "Adjust on which sound channel the sound gets played.",
                    order 		= 2,
                    width		= 	"full",
                    type 		= "select",
                    values 		= {["Master"] = "Master",["SFX"] = "SFX",["Ambience"] = "Ambience",["Music"] = "Music"},
                    get		    = function(info) return KillingBlowAnnouncer:GetSoundLevel(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetSoundLevel(info,key) end,
                },

                enableModus = {
                    name 		= "Killing blow modus",
                    desc 		= "Enable either message mode or image mode. Message mode will display a message in the middle of the screen. Image mode will display an image in the middle of the screen",
                    order 		= 6,
                    type 		= "select",
                    values 		=	{"Message mode",'Image mode'},
                    style 		= "radio",
                    get		    = function(info) return KillingBlowAnnouncer:GetModus(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetModus(info,key) end,
                },



            },
        },

    },

}
