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 messages that can be send to the chat.",
            type		=	"group",
            order		=	1,
            args		=	{
                simpleMessage        =   {
                    type        =   "header",
                    name        =    "Simple message",
                    order       =    1,
                    width       =   "full",
                },
                enableMSG		=	{  
                    type		=	"toggle",
                    name		=	"Enable simple message",
                    desc		=	"Displays a simple message that will be displayed in your specified chat window channel.",
                    order 		= 	 2,
                    width       =   "double", 
                    get			=	"EnableMSG",
                    set			=	"ToggleEnableMSG",
                },
                editChannel = {
                    name        = "Channel",
                    desc        = "Adjust in which channel the message should be displayed.",
                    order       = 3,
                    type        = "select",
                    values      = chatChannelsTable,
                    get         = function(info) return KillingBlowAnnouncer:GetChatChannel(info) end,
                    set         = function(info,key) KillingBlowAnnouncer:SetChatChannel(info,key) end,
                },
                msg = {
                    type = "input",
                    name = "Message",
                    desc = "The chat message displayed when you get a killing blow.",
                    order = 4,
                    width = "full",
                    usage = "To edit message, fill in the input field and press the okay button.",
                    get = "GetMessage",
                    set = "SetMessage",
                },
                header1		=	{
                    type		=	"header",
                    name		= 	 "Advanced message",
                    order 		= 	 5,
                    width 		= 	"full",
                },
                toggleMessage		=	{
                    type		=	"toggle",
                    name		=	"Enable advanced message",
                    desc		=	"Displays an advanced message variant of the simple message in the specified chat window channel.",
                    order 		= 	 6,
                    width 		= 	"full",
                    get			=	"EnableMSGAnnounce",
                    set			=	"ToggleEnableMSGAnnounce",
                },
                chatMessage = {
                    type = "input",
                    name = "Advanced message",
                    desc = "The advanced message displayed when you get a killing blow. Advanced message only works for player kils.",
                    order = 7,
                    width = "full",
                    usage = "To edit message, fill in the input field and press the okay button.",
                    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 = 8,
                    width = "full",
                },
                editChatChannel = {
                    name 		= "Channel",
                    desc 		= "Adjust in which channel the message should be displayed.",
                    order 		= 9, width = "full",
                    type 		= "select",
                    values 		= chatChannelsTable,
                    get		    = function(info) return KillingBlowAnnouncer:GetChatAnnounceChannel(info) end,
                    set 		= function(info,key) KillingBlowAnnouncer:SetChatAnnounceChannel(info,key) end,
                },
            },
        },
        Options2= {
            name		=	"Tracker",
            desc 		= 	"Options related to a tracker which tracks killing blows in the current zone/session.",
            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 dragging",
                    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		=	"Announcer",
            desc 		= 	"Options related to displaying customisable messages in the middle of the screen.",
            type		=	"group",
            order		=	3,
            args		=	{
                Options4= {
                    name		=	"Message options",
                    desc 		= 	"Options related to showing a text 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",
                            order		=	1,
                            set			=	"ToggleEnableSnap",
                        },
                        enableLock     =   {
                            type        =   "toggle",
                            name        =   "Enable dragging",
                            order       =   2,
                            desc        =   "Enables the user to drag the message frame around.",
                            get         =   "EnableMessageDrag",
                            set         =   "ToggleEnableMessageDrag",
                        },
                        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",
                        },
                       editHeight       =   {
                            type        =   "range",
                            name        =   "Height" ,
                            min         =   40,
                            max         =   500,
                            width       =   "double",
                            desc        =   "Adjust the message height. Min/max is limited because the message can disappear when using weird numbers.",
                            order       =   7,
                            get         =   "GetKBMHeight",
                            set         =   "SetKBMHeight",

                        },
                        editWidth       =   {
                            type        =   "range",
                            name        =   "Width" ,
                            min         =   40,
                            max         =   500,
                            width       =   "double",
                            desc        =   "Adjust the message width. Min/max is limited because the message can disappear when using weird numbers.",
                            order       =   7,
                            get         =   "GetKBMWidth",
                            set         =   "SetKBMWidth",

                        },
                        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    		=   29,
                            width    	=   "double",
                            desc		=	"Adjust the font size. Default is 29 (as of unknown reasons text disappears above fontsize 29).",
                            order		=	8,
                            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		=	"Image options",
                    desc 		= 	"Options related to showing an image.",
                    type		=	"group",
                    order		=	4,
                    args		=	{
                        enableKBIDebug		=	{
                            type		=	"toggle",
                            name		=	"Start image loop",
                            desc		=	"Loops the image to the window for editing purposes. Disable this option when done editing.",
                            get			=	"GetKBIDebug",
                            order		=	1,
                            set			=	"ToggleKBIDebug",
                        },
                        enableLock     =   {
                            type        =   "toggle",
                            name        =   "Enable dragging",
                            order       =   2,
                            desc        =   "Enables the user to drag the image frame around.",
                            get         =   "EnableImageDrag",
                            set         =   "ToggleEnableImageDrag",
                        },
                        chooseImage = {
                            name 		=	 "Image file",
                            desc 		=	 "Pick which image you want announced. See the 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_Background",
                            get		    =   function(info) return KillingBlowAnnouncer:GetKBIImage(info) end,
                            set 		=   function(info,key) KillingBlowAnnouncer:SetKBIImage(info,key) end,
                        },
                        editHeight		=	{
                            type		=	"range",
                            name		=	"Height" ,
                            min 		= 	0,
                            max    		=   1000,
                            width    	=   "double",
                            desc		=	"Adjust the image height.",
                            order		=	5,
                            get			=	"GetKBIHeight",
                            set			=	"SetKBIHeight",

                        },
                        editWidth		=	{
                            type		=	"range",
                            name		=	"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 announcer",
                    order		=  	1,
                    desc		=	"Enables the announcing using message or image.",
                    width		= 	"full",
                    get			=	"EnableKB",
                    set			=	"ToggleEnableKB",
                },
                enableModus = {
                    name 		= "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,
                },
            },
         },
         Options4 = {
            name        =   "Sound",
            desc        =   "Options related to playing a sound file.",
            type        =   "group",
            order       =   4,
            args        =   {
                enableKillingBlowSound     =   {
                    type        =   "toggle",
                    name        =   "Enable soundfiles",
                    order       =   1,
                    desc        =   "Enables playing of a random soundfile.",
                    get         =   "EnableKBSound",
                    set         =   "ToggleEnableKBSound",
                },
                  uncheckEmotes   =   {
                    type        =   "execute",
                    name        =   "Uncheck all files",
                    order       =   2,
                    func        =   function(info) KillingBlowAnnouncer:UncheckAllSounds() end,
                },
                editSoundLevel = {
                    name        = "Sound channel",
                    desc        = "Adjust on which sound channel the sound gets played.",
                    order       = 3,
                    width       =   "full",
                    type        = "select",
                    values      = soundChannelsTable,
                    get         = function(info) return KillingBlowAnnouncer:GetSoundLevel(info) end,
                    set         = function(info,key) KillingBlowAnnouncer:SetSoundLevel(info,key) end,
                },
                   editSound = {
                    name        = "Soundfiles",
                    desc        = "Pick the sounds from which one will randmly be played on a killing blow.",
                    order       = 4,
                    width       =   "full",
                    type        = "multiselect",
                    values      = Media:HashTable("sound"),
                    get         = function(info,key) return KillingBlowAnnouncer:ExistsInSounds(info,key) end,
                    set         = function(info,key) KillingBlowAnnouncer:SetSound(info,key) end,
                },
            },
           
        },
        Options5 = {
            name        =   "Emotes",
            desc        =   "Options related to playing emotes.",
            type        =   "group",
            order       =   4,
            args        =   {
                enableKillingBlowEmote    =   {
                    type        =   "toggle",
                    name        =   "Enable emotes",
                    order       =   1,
                    desc        =   "Enables playing of an random emote after a killing blow.",
                    get         =   "EnableEmotes",
                    set         =   "ToggleEnableEmotes",
                },
                uncheckEmotes   =   {
                    type        =   "execute",
                    name        =   "Uncheck all emotes",
                    order       =   2,
                    func        =   function(info) KillingBlowAnnouncer:UncheckAllEmotes() end,
                },
                emotes= {
                    name        = "Emotes",
                    desc        = "Pick the emotes from which one will randomly be played on a killing blow.",
                    order       = 3,
                    type        = "multiselect",
                    values      = emotesTable,
                    get         = function(info,key) return KillingBlowAnnouncer:ExistsInEmotes(info,key) end,
                    set         = function(info,key) KillingBlowAnnouncer:SetEmote(info,key) end,
                },
            },
           
        },

    },

}
