local L = AceLibrary("AceLocale-2.2"):new("OptiTaunt")

-- setup options
OptiTaunt.options = {
		type='group',
		args = {
			title = {
				order = 1,
				type = "header",
				name = "OptiTaunt |cff8080ff"..GetAddOnMetadata("OptiTaunt", "Version").." "..GetAddOnMetadata("OptiTaunt", "X-Build").."|r",
			},
			ability_options = {
			type = "group",
			order = 2, 
			name = L["opt_name_announces"],
			desc = L["opt_desc_announces"],
			args = {
			        },
			},
			trinket_options = {
			type = "group",
			order = 3, 
			name = INVTYPE_TRINKET,
			desc = L["opt_desc_announces"],
			args = {
			        },
			},
			debuff_menu = {
			type = "group",
			order = 4, 
			name = L["opt_name_debuff_announces"],
			desc = L["opt_desc_debuff_announces"],
			args = {
				debuff_options = {
					type = "group",
					order = 1, 
					name = L["opt_name_debuff_announces"],
					desc = L["opt_desc_debuff_announces"],
					args = {
			        },
				},
				disarm_options = {
					type = "group",
					order = 1.1, 
					name = L["opt_name_disarm_announces"],
					desc = L["opt_desc_disarm_announces"],
					args = {
							},
				},
				debuff_stun_options = {
					type = "group",
					order = 2, 
					name = L["opt_name_debuff_stun_announces"],
					desc = L["opt_desc_debuff_stun_announces"],
					args = {
			        },
				},
				debuff_magic_options = {
					type = "group",
					order = 3, 
					name = L["opt_name_debuff_magic_announces"],
					desc = L["opt_desc_debuff_magic_announces"],
					args = {
			        },
				},
				debuff_curse_options = {
					type = "group",
					order = 4, 
					name = L["opt_name_debuff_curse_announces"],
					desc = L["opt_desc_debuff_curse_announces"],
					args = {
			        },
				},
				debuff_poison_options = {
					type = "group",
					order = 5, 
					name = L["opt_name_debuff_poison_announces"],
					desc = L["opt_desc_debuff_poison_announces"],
					args = {
			        },
				},
				debuff_disease_options = {
					type = "group",
					order = 6, 
					name = L["opt_name_debuff_disease_announces"],
					desc = L["opt_desc_debuff_disease_announces"],
					args = {
			        },
				},
				healreq_options = {
					type = "group",
					order = 7, 
					name = L["opt_name_healreq_announces"],
					desc = L["opt_desc_healreq_announces"],
					args = {
			        },
				},
				},
			},
			head0 = {
				order = 5,
				type = "header",
				name = " ",
			},
			announcesettings = {
			  	type = "group",
				order = 6,
			  	name = L["opt_name_announcesettings"],
			  	desc = L["opt_desc_announcesettings"],
			  	args = {
					announce_resist = {
						type = 'toggle',
						order = 1,
						name = L["opt_name_announceresist"],
						desc = L["opt_desc_announceresist"],
						get = "IsAnnounceResist",
						set = "ToggleAnnounceResist",
					},
					announce_immune = {
						type = 'toggle',
						order = 2,
						name = L["opt_name_announceimmue"],
						desc = L["opt_desc_announceimmue"],
						get = "IsAnnounceImmune",
						set = "ToggleAnnounceImmune",
					},
					head_announce1 = {
						order = 3,
						type = "header",
						name = " ",
					},
					announce_ability = {
						type = 'toggle',
						order = 4,
						name = L["opt_name_announceability"],
						desc = L["opt_desc_announceability"],
						get = "IsAnnounceAbility",
						set = "ToggleAnnounceAbility",
					},
					announce_ability_end = {
						type = 'toggle',
						order = 5,
						name = L["opt_name_announceabilityend"],
						desc = L["opt_desc_announceabilityend"],
						get = "IsAnnounceAbilityEnd",
						set = "ToggleAnnounceAbilityEnd",
					},
					announce_ability_on_target = {
						type = 'toggle',
						order = 6,
						name = L["opt_name_announceabilityontarget"],
						desc = L["opt_desc_announceabilityontarget"],
						get = "IsAnnounceAbilityOnTarget",
						set = "ToggleAnnounceAbilityOnTarget",
					},
					announce_ability_on_target_end = {
						type = 'toggle',
						order = 7,
						name = L["opt_name_announceabilityontargetend"],
						desc = L["opt_desc_announceabilityontargetend"],
						get = "IsAnnounceAbilityOnTargetEnd",
						set = "ToggleAnnounceAbilityOnTargetEnd",
					},
					head_announce2 = {
						order = 8,
						type = "header",
						name = " ",
					},	
					announce_disarm = {
						type = 'toggle',
						order = 9,
						name = L["opt_name_announcedisarm"],
						desc = L["opt_desc_announcedisarm"],
						get = "IsAnnounceDisarm",
						set = "ToggleAnnounceDisarm",
					},
					announce_disarm_end = {
						type = 'toggle',
						order = 10,
						name = L["opt_name_announcedisarmend"],
						desc = L["opt_desc_announcedisarmend"],
						get = "IsAnnounceDisarmEnd",
						set = "ToggleAnnounceDisarmEnd",
					},
					head_announce3 = {
						order = 11,
						type = "header",
						name = " ",
					},
					announce_debuff = {
						type = 'toggle',
						order = 12,
						name = L["opt_name_announcedebuff"],
						desc = L["opt_desc_announcedebuff"],
						get = "IsAnnounceDebuff",
						set = "ToggleAnnounceDebuff",
					},
					announce_debuff_end = {
						type = 'toggle',
						order = 13,
						name = L["opt_name_announcedebuffend"],
						desc = L["opt_desc_announcedebuffend"],
						get = "IsAnnounceDebuffEnd",
						set = "ToggleAnnounceDebuffEnd",
					},
					head_announce4 = {
						order = 14,
						type = "header",
						name = " ",
					},
					announce_debuff_stun = {
						type = 'toggle',
						order = 15,
						name = L["opt_name_announcedebuffstun"],
						desc = L["opt_desc_announcedebuffstun"],
						get = "IsAnnounceDebuffStun",
						set = "ToggleAnnounceDebuffStun",
					},		
					announce_debuff_magic = {
						type = 'toggle',
						order = 16,
						name = L["opt_name_announcedebuffmagic"],
						desc = L["opt_desc_announcedebuffmagic"],
						get = "IsAnnounceDebuffMagic",
						set = "ToggleAnnounceDebuffMagic",
					},		
					announce_debuff_curse = {
						type = 'toggle',
						order = 17,
						name = L["opt_name_announcedebuffcurse"],
						desc = L["opt_desc_announcedebuffcurse"],
						get = "IsAnnounceDebuffCurse",
						set = "ToggleAnnounceDebuffCurse",
					},		
					announce_debuff_poison = {
						type = 'toggle',
						order = 18,
						name = L["opt_name_announcedebuffpoison"],
						desc = L["opt_desc_announcedebuffpoison"],
						get = "IsAnnounceDebuffPoison",
						set = "ToggleAnnounceDebuffPoison",
					},		
					announce_debuff_disease = {
						type = 'toggle',
						order = 19,
						name = L["opt_name_announcedebuffdisease"],
						desc = L["opt_desc_announcedebuffdisease"],
						get = "IsAnnounceDebuffDisease",
						set = "ToggleAnnounceDebuffDisease",
					},		
					announce_healreq = {
						type = 'toggle',
						order = 20,
						name = L["opt_name_announcehealreq"],
						desc = L["opt_desc_announcehealreq"],
						get = "IsAnnounceHealreq",
						set = "ToggleAnnounceHealreq",
					},
				},
			},
			head1 = {
				order = 10,
				type = "header",
				name = " ",
			},
			messagetexts = {
			  	type = "group",
				order = 11,
			  	name = L["opt_name_messagetexts"],
			  	desc = L["opt_desc_messagetexts"],
			  	args = {
			  		resistmessage = {
						type = "text",
						order = 1,
						name = L["opt_name_resistmessage"],
						desc = "---",
						get = "GetResistMessage",
						set = "SetResistMessage",
						usage = L["opt_usage_resistmessage"],
					},
					immunemessage = {
						type = "text",
						order = 2,
						name = L["opt_name_immunemessage"],
						desc = "---",
						get = "GetImmuneMessage",
						set = "SetImmuneMessage",
						usage = L["opt_usage_immunemessage"],
					},
					head_message1 = {
						order = 3,
						type = "header",
						name = " ",
					},
					abilitymessage = {
						type = "text",
						order = 4,
						name = L["opt_name_abilitymessage"],
						desc = "---",
						get = "GetAbilityMessage",
						set = "SetAbilityMessage",
						usage = L["opt_usage_abilitymessage"],
					},
					abilityendmessage = {
						type = "text",
						order = 5,
						name = L["opt_name_abilityendmessage"],
						desc = "---",
						get = "GetAbilityEndMessage",
						set = "SetAbilityEndMessage",
						usage = L["opt_usage_abilityendmessage"],
					},
					abilityontargetmessage = {
						type = "text",
						order = 6,
						name = L["opt_name_abilityontargetmessage"],
						desc = "---",
						get = "GetAbilityOnTargetMessage",
						set = "SetAbilityOnTargetMessage",
						usage = L["opt_usage_abilityontargetmessage"],
					},
					abilityontargetendmessage = {
						type = "text",
						order = 7,
						name = L["opt_name_abilityontargetendmessage"],
						desc = "---",
						get = "GetAbilityOnTargetEndMessage",
						set = "SetAbilityOnTargetEndMessage",
						usage = L["opt_usage_abilityontargetendmessage"],
					},
					counterspellmessage = {
						type = "text",
						order = 8,
						name = L["opt_name_counterspellmessage"],
						desc = "---",
						get = "GetCounterspellMessage",
						set = "SetCounterspellMessage",
						usage = L["opt_usage_counterspellmessage"],
					},
					head_message2 = {
						order = 9,
						type = "header",
						name = " ",
					},
					disarmmessage = {
						type = "text",
						order = 10,
						name = L["opt_name_disarmmessage"],
						desc = "---",
						get = "GetDisarmMessage",
						set = "SetDisarmMessage",
						usage = L["opt_usage_disarmmessage"],
					},
					disarmendmessage = {
						type = "text",
						order = 11,
						name = L["opt_name_disarmendmessage"],
						desc = "---",
						get = "GetDisarmEndMessage",
						set = "SetDisarmEndMessage",
						usage = L["opt_usage_disarmendmessage"],
					},
					head_message3 = {
						order = 12,
						type = "header",
						name = " ",
					},
					debuffmessage = {
						type = "text",
						order = 13,
						name = L["opt_name_debuffmessage"],
						desc = "---",
						get = "GetDebuffMessage",
						set = "SetDebuffMessage",
						usage = L["opt_usage_debuffmessage"],
					},
					debuffendmessage = {
						type = "text",
						order = 14,
						name = L["opt_name_debuffendmessage"],
						desc = "---",
						get = "GetDebuffEndMessage",
						set = "SetDebuffEndMessage",
						usage = L["opt_usage_debuffendmessage"],
					},
					head_message4 = {
						order = 15,
						type = "header",
						name = " ",
					},
					debuff_stun_message = {
						type = "text",
						order = 16,
						name = L["opt_name_debuffstunmessage"],
						desc = "---",
						get = "GetDebuffStunMessage",
						set = "SetDebuffStunMessage",
						usage = L["opt_usage_debuffstunmessage"],
					},
					debuff_magic_message = {
						type = "text",
						order = 17,
						name = L["opt_name_debuffmagicmessage"],
						desc = "---",
						get = "GetDebuffMagicMessage",
						set = "SetDebuffMagicMessage",
						usage = L["opt_usage_debuffmagicmessage"],
					},
					debuff_curse_message = {
						type = "text",
						order = 18,
						name = L["opt_name_debuffcursemessage"],
						desc = "---",
						get = "GetDebuffCurseMessage",
						set = "SetDebuffCurseMessage",
						usage = L["opt_usage_debuffcursemessage"],
					},
					debuff_poison_message = {
						type = "text",
						order = 19,
						name = L["opt_name_debuffpoisonmessage"],
						desc = "---",
						get = "GetDebuffPoisonMessage",
						set = "SetDebuffPoisonMessage",
						usage = L["opt_usage_debuffpoisonmessage"],
					},
					debuffdiseasemessage = {
						type = "text",
						order = 20,
						name = L["opt_name_debuffdiseasemessage"],
						desc = "---",
						get = "GetDebuffDiseaseMessage",
						set = "SetDebuffDiseaseMessage",
						usage = L["opt_usage_debuffdiseasemessage"],
					},
					healreq_message = {
						type = "text",
						order = 21,
						name = L["opt_name_healreqmessage"],
						desc = "---",
						get = "GetHealreqMessage",
						set = "SetHealreqMessage",
						usage = L["opt_usage_healreqmessage"],
					},
				},
			},
			togglespelllink = {
				type = 'toggle',
				order = 12,
				name = L["opt_name_spelllink"],
				desc = L["opt_desc_spelllink"],
				get = "IsSpellLink",
				set = "ToggleSpellLink",
			},
			head2 = {
				order = 20,
				type = "header",
				name = " ",
			},
			audio = {
				type = 'toggle',
				order = 21,
				name = L["opt_name_audio"],
				desc = L["opt_desc_audio"],
				get = "IsGiveAudioWarning",
				set = "ToggleGiveAudioWarning",
			},
			aggrocheck = {
				type = 'toggle',
				order = 22,
				name = L["opt_name_aggrocheck"],
				desc = L["opt_desc_aggrocheck"],
				get = "IsAggroCheck",
				set = "ToggleAggroCheck",
			},
			pvpcheck = {
				type = 'toggle',
				order = 23,
				name = L["opt_name_pvpcheck"],
				desc = L["opt_desc_pvpcheck"],
				get = "IsPvPCheck",
				set = "TogglePvPCheck"
			},
			whisperwarriors = {
				type = 'toggle',
				order = 24,
				name = L["opt_name_whisperwarriors"],
				desc = L["opt_desc_whisperwarriors"],
				get = "IsWhisperWarriors",
				set = "ToggleWhisperWarriors",
			},
			config = {
				type = 'execute',
				order = 29,
				name = "Show config menu",
				desc = "Show config menu",
				guiHidden = true,
				wfHidden = true,
				func = function()
					AceLibrary("Dewdrop-2.0"):Open('OptiTaunt', 'children', function()
						AceLibrary("Dewdrop-2.0"):FeedAceOptionsTable(OptiTaunt.options)
					end)
				end,
			},
			head3 = {
				order = 30,
				type = "header",
				name = " ",
			},
			pulltimer = {
				type = 'execute',
				name = "Pulltimer",
				desc = "Starts the PullTimer",
				func = "PullTimer",
				order = 31,
			},
			pulltimeroptions = {
			  	type = "group",
				order = 32,
			  	name = L["opt_name_pulltimeroptions"],
			  	desc = L["opt_desc_pulltimeroptions"],
			  	args = {
					countmessage = {
						type = "text",
						order = 2,
						name = L["opt_name_countmessage"],
						desc = "---",
						get = "GetPullCountMessage",
						set = "SetPullCountMessage",
						usage = L["opt_usage_countmessage"],
					},
			  		pullmessage = {
						type = "text",
						order = 3,
						name = L["opt_name_pullmessage"],
						desc = "---",
						get = "GetPullMessage",
						set = "SetPullMessage",
						usage = L["opt_usage_pullmessage"],
					},
					scale = {
						type = "range",
						order = 4,
						name = L["opt_name_pullscale"],
						desc = L["opt_usage_pullscale"],
						isPercent = false,
						min = 3,
						max = 20,
						step = 1,
						get = "GetPullTimerRange",
						set = "SetPullTimerRange",
					},
				},
			},
			head4 = {
				order = 40,
				type = "header",
				name = " ",
			},
			printtauntstatistics = {
				type = 'execute',
				name = L["PrintTauntStatistics"],
				desc = L["opt_desc_printtauntstatistics"],
				func = "PrintTauntStatistics",
				order = 41,
			},
			resetcounters = {
				type = 'execute',
				name = L["Reset counters"],
				desc = L["opt_desc_resetcounters"],
				func = "ResetCounters",
				order = 42,
			},
			head5 = {
				order = 50,
				type = "header",
				name = " ",
			},
			showminimapicon = {
				type = 'toggle',
				name = "Show the minimap icon",
				desc = "Toggles the minimap",
				order = 51,
				get = "IsMinimapIcon",
				set = "ToggleMinimapIcon",
			},
		},
	}

--setup FuBar-2.0
OptiTaunt.hasIcon = true
OptiTaunt.defaultMinimapPosition = 340
OptiTaunt.cannotDetachTooltip = true
OptiTaunt.independentProfile = true
OptiTaunt.defaultPosition = "LEFT"
OptiTaunt.hideWithoutStandby = true
OptiTaunt.hasNoColor = true
OptiTaunt.hasIcon = "Interface\\Icons\\Spell_Nature_Reincarnation"
