if (GetLocale() == "zhCN") then	
	MOD_COMBAT_INDICATOR_TITLE = {"战斗指示", "zhandouzhishi"};
	COMBAT_INDICATOR_ENABLE_TEXT = "开启战斗指示器";
	COMBAT_INDICATOR_ENABLE_MOB_SPELL = "显示怪物魔法信息";
	COMBAT_INDICATOR_SHOW_COMBAT_LEAVE = "进入和离开战斗时进行提示";
	COMBAT_INDICATOR_SHOW_COMBO_POINT = "显示盗贼连击点数";

	COMBAT_INDICATOR_ENABLE_SCT = "使用SCT (更多功能)";
	COMBAT_INDICATOR_SCT_SETTINGS = "功能设置...";
elseif (GetLocale() == "zhTW") then
	MOD_COMBAT_INDICATOR_TITLE = {"戰鬥指示器", "zhandouzhishi"};
	COMBAT_INDICATOR_ENABLE_TEXT = "開啟戰鬥指示器";	
	COMBAT_INDICATOR_ENABLE_MOB_SPELL = "顯示怪物魔法訊息";
	COMBAT_INDICATOR_SHOW_COMBAT_LEAVE = "離開戰鬥狀態時進行提示";
	COMBAT_INDICATOR_SHOW_COMBO_POINT = "顯示盜賊連擊點數";

	COMBAT_INDICATOR_ENABLE_SCT = "使用SCT (更多功能)";
	COMBAT_INDICATOR_SCT_SETTINGS = "功能設置...";
else
	MOD_COMBAT_INDICATOR_TITLE = "Combat Indicator";
	COMBAT_INDICATOR_ENABLE_TEXT = "Enable Combat Indicator";

	COMBAT_INDICATOR_ENABLE_MOB_SPELL = "Show mob's spell";
	COMBAT_INDICATOR_SHOW_COMBAT_LEAVE = "Notify me if leaving combat";
	COMBAT_INDICATOR_SHOW_COMBO_POINT = "Show combo points";
	
	COMBAT_INDICATOR_ENABLE_SCT = "USE SCT (...)";
	COMBAT_INDICATOR_SCT_SETTINGS = "Options...";
end

if (IsConfigurableAddOn("CombatIndicator") or IsConfigurableAddOn("sct")) then
	ModManagement_RegisterMod(
		"CombatIndicator",
		"Interface\\Icons\\Ability_Warrior_PunishingBlow",
		MOD_COMBAT_INDICATOR_TITLE,
		"",
		nil,
		nil
	);
end

if (IsConfigurableAddOn("CombatIndicator")) then
	ModManagement_RegisterCheckBox(
		"CombatIndicator",
		COMBAT_INDICATOR_ENABLE_TEXT,
		nil,
		"EnableCombatIndicator",
		1,
		function (arg)
			if (arg == 1) then
				if (not IsAddOnLoaded("CombatIndicator")) then
					LoadAddOn("CombatIndicator");
				end

				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicator_Enable(true);					

					if (BigFoot_GetModVariable("CombatIndicator", "EnableCombatIndicator") ~= 0) then
						BigFoot_SetModVariable("CombatIndicator", "EnableSCT", 0);
						DSCT_Enable(false);
					end

					ModManagement_Refresh();								
				end
			else
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicator_Enable(false);
				end
			end
		end
	);

	ModManagement_RegisterCheckBox(
		"CombatIndicator",
		COMBAT_INDICATOR_ENABLE_MOB_SPELL,
		nil,
		"EnableShowSpell",
		1,
		function (arg)
			if (arg == 1) then
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorShowSpell_Enable(true);
				end
			else
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorShowSpell_Enable(false);
				end
			end
		end
		,
		1
	);

	ModManagement_RegisterCheckBox(
		"CombatIndicator",
		COMBAT_INDICATOR_SHOW_COMBAT_LEAVE,
		nil,
		"EnableCombatLeave",
		1,
		function (arg)
			if (arg == 1) then
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorLeaveCombat_Enable(true);
				end
			else
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorLeaveCombat_Enable(false);
				end
			end
		end
		,
		1
	);

	ModManagement_RegisterCheckBox(
		"CombatIndicator",
		COMBAT_INDICATOR_SHOW_COMBO_POINT,
		nil,
		"EnableComboPoint",
		1,
		function (arg)
			if (arg == 1) then
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorShowCombo_Enable(true);
				end
			else
				if (IsAddOnLoaded("CombatIndicator")) then
					CombatIndicatorShowCombo_Enable(false);
				end
			end
		end
		,
		1
	);
end

if (IsConfigurableAddOn("sct")) then
	ModManagement_RegisterCheckBox(
		"CombatIndicator",
		COMBAT_INDICATOR_ENABLE_SCT,
		nil,
		"EnableSCT",
		1,
		function (arg)
			if (arg == 1) then
				if (not IsAddOnLoaded("sct")) then
					LoadAddOn("sct");
				end

				if (IsAddOnLoaded("sct")) then
					DSCT_Enable(true);

					if (BigFoot_GetModVariable("CombatIndicator", "EnableCombatIndicator") ~= 0) then
						BigFoot_SetModVariable("CombatIndicator", "EnableCombatIndicator", 0);
						CombatIndicator_Enable(false);
					end

					ModManagement_Refresh();
				end
			else
				if (IsAddOnLoaded("sct")) then
					DSCT_Enable(false);
				end
			end
		end
	);

	ModManagement_RegisterButton(
		"CombatIndicator",
		COMBAT_INDICATOR_SCT_SETTINGS,
		function()
			if (IsAddOnLoaded("sct") and DSCTOptions) then
				 DSCT_showMenu();
			end
		end,
		nil,
		1
	);
end
