
if (GetLocale() == "zhCN") then
	BIGFOOT_TOOLTIP = "鼠标提示";
	ENABLE_BIGFOOT_TOOLTIP = "启用大脚鼠标提示";
elseif (GetLocale() == "zhTW") then
	BIGFOOT_TOOLTIP = "鼠標提示";
	ENABLE_BIGFOOT_TOOLTIP = "啓用大腳鼠標提示";
else
	BIGFOOT_TOOLTIP = "BigFoot Tooltip";
	ENABLE_BIGFOOT_TOOLTIP = "Enable BigFoot Tooltip";
end

function BFTT_DelayShow()
	if (not BFTT_Loaded) then
		BigFoot_DelayCall(BFTT_DelayShow, 0.1);
		return;
	end

	BFTT_Toggle(true);
	BFTT_Enable_Options(true);
	ModManagement_Refresh();
end

if (IsConfigurableAddOn("BFTooltip")) then
	ModManagement_RegisterMod( 
		"BFTT", 
		"Interface\\Icons\\INV_Misc_Coin_09", 
		BIGFOOT_TOOLTIP, 
		"", 
		nil, 
		{ ["frame"] = "BFTT_OPTION_FRAME", ["offsetx"] = 300, ["offsety"] = -75 }
	);

	ModManagement_RegisterCheckBox(
		"BFTT",
		ENABLE_BIGFOOT_TOOLTIP,
		nil,
		"EnableBFTooltip",
		1,
		function (arg)
			if (arg == 1) then
				if (not IsAddOnLoaded("BFTooltip")) then
					LoadAddOn("BFTooltip");
				end
				
				if (IsAddOnLoaded("BFTooltip")) then
					BigFoot_DelayCall(BFTT_DelayShow, 0.1);
				end
			else
				if (IsAddOnLoaded("BFTooltip")) then
					BFTT_Toggle(false);
					BFTT_Enable_Options(false);
				end
			end
		end
	);
end
