if not Profiteer then
	return
end

local Profiteer = Profiteer
local ProfiteerMenu = {}
Profiteer.menu = ProfiteerMenu

function ProfiteerMenu:InitAddonMenu(addOnName)
	local panelData = {
		type = "panel",
		name = addOnName,
		displayName = Profiteer.colors.title .. addOnName,
		author = "Barvazon",
		slashCommand = "/profiteersetup",
		registerForRefresh = true
	}

	local optionsData = {
		[1] = {
			type = "checkbox",
			name = "Hide glyphs with no price suggestion",
			tooltip = "Hide glyphs which do not have a price suggestion",
			getFunc = function() return Profiteer.settings.hideNoPrice end,
			setFunc = function(check) Profiteer.settings.hideNoPrice = check end,
			default = false
		},
		[2] = {
			type = "checkbox",
			name = "Reverse mouse wheel direction",
			tooltip = "Reverse the scrolling direction when using the mouse wheel",
			getFunc = function() return Profiteer.settings.reverseMouseWheel end,
			setFunc = function(check) Profiteer.settings.reverseMouseWheel = check end,
			default = false
		},
	}

	local LAM2 = LibStub:GetLibrary("LibAddonMenu-2.0")
	LAM2:RegisterAddonPanel("ProfiteerOptions", panelData)
	LAM2:RegisterOptionControls("ProfiteerOptions", optionsData)
end