--本插件用于在线游戏的问题 查询.通过bbs来进行补充
local gui = LibStub("AceGUI-3.0");
local reg = LibStub("AceConfigRegistry-3.0");
local dialog = LibStub("AceConfigDialog-3.0");
local L = wsLocale:GetLocale("WoWShell")

wsFAQ = LibStub("AceAddon-3.0"):NewAddon("wsFAQ", "AceConsole-3.0");

local _order = 1;
local function order()
	_order = _order + 1;
	return _order;
end


--[[
	游戏中打开一个在线帮助文档, 提供wowshell插件的使用及各种设置问题
]]--
function createHelper()
	if not helper then
		helper = {
			type = "group",
			name = L["精灵帮助指南"],
			width = "300",
			order = order(),
			childGroups = "tree",
			args = {
				searchBox = {
					type = "input",
					desc = "Seach",
					name = "",
					order = order(),
					--method
				},
				faqhome = {
					type = "group",
					name = "Home",
					desc = "",
					order = order(),
					args = {
						title = {
							type = "header",
							name = L["WoWShell在线使用手册"],
							order = order(),
						},
						pagedescription = {
							type = "description",
							name = " ";
							order = order();
						},
					},
				},
				faqlist = {
					type = "group",
					name = "AddOns",
					order = order(),
					args = {
						--各个插件的问题指引
					},
				},
				faqhistory = {
					type = "group",
					name = "Update Log",
					desc = "WoWShell Update Log",
					order = order(),
					args = {
					
					},
				}
			},
		}
	end

	return helper
end

function wsFAQ:registerHelper()
	LibStub("AceConfig-3.0"):RegisterOptionsTable("wshelper", createHelper)
end

function wsFAQ:OnInitialize()
	self:registerHelper();
	self:RegisterChatCommand("wsfaq", function() LibStub("AceConfigDialog-3.0"):Open("wshelper") end)
end