local addonName, addon = ...
local childName = addon['childName']
local child = addon[childName]
local L = LibStub("AceLocale-3.0"):GetLocale(childName, true)
function child:PrefChanged(info, value, oldvalue)
	if(info[#info] == 'toggleMap' and value ~= oldvalue) then
		SetBinding(value, "CLICK zzCoords_MinimapToggleFrame:LeftButton")
	end
	child:ZoneEvent()
end
local init = {
	Setup = function(self)
		local config = LibStub:GetLibrary("zzConfig")
		local options = child['options']
		local main = options['args'][childName]
		config:AddConfigEntry(main,"hideLDBCoords","toggle",L['Hide LDB coords'],L['This hides the coords-display in your broker display'],2)
		config:AddConfigEntry(main,"colorLDB","toggle",L['Colorized Zone'],L['Show PvP informations about current area'],1)
		config:AddConfigEntry(main,"hideMapCoords","toggle",L['Hide Map coords'],L['This hides the coords-display at the bottom of your map'],2)
		config:AddConfigEntry(main,"ShowZone","toggle",L['Show Zone'],nil,1)
		config:AddConfigEntry(main,"ShowSubZone","toggle",L['Show Subzone'],nil,1)
		config:AddConfigEntry(main,"ShowMapID","toggle",L['Show MapID'],nil,2)
		config:AddConfigEntry(main,"maxLength","range",L['Max Length'],L['Limits the maximum length of the zone'],1,0,255,1)
		config:AddConfigEntry(main,'windowXY',"header",L['Mapcoords Window'],nil,6)
		config:AddConfigEntry(main,"windowX","range",L['Window X'],L['Adjusts the X-Offset on windowed map'],7,-512,512,1)
		config:AddConfigEntry(main,"windowY","range",L['Window Y'],L['Adjusts the Y-Offset on windowed map'],8,-512,512,1)
		config:AddConfigEntry(main,"toggleMap","keybinding",L['Toggle Minimap'],L['Set keybind'],5)
	end
}
addon.RegisterCallback(init, format("Init%s", childName), 'Setup')