local addonName, addon = ...
local childName = addon['childName']
local child = addon[childName]
local L = LibStub("AceLocale-3.0"):GetLocale(childName, true)
function child:PrefChanged()
	child.events.UPDATE_INVENTORY_DURABILITY()
end
local init = {
	Setup = function(self)
		local config = LibStub:GetLibrary("zzConfig")
		local options = child['options']
		local main = options['args'][childName]
--		print("setup prefs", childName)
		config:AddConfigEntry(main, "autorepair", "toggle", L['Autorepair'], nil, 1)
		config:AddConfigEntry(main, "showlowest", "toggle", L['Show lowest'], L['Show durability of your lowest item only'], 1)
		config:AddConfigEntry(main, "listall", "toggle", L['Show all slots'], L['Show all slots in the tooltip instead of damaged only'], 1)
		config:AddConfigEntry(main, "guildbankrepair", "toggle", L['Allow Guildbank Repair'], nil, 1)
	end
}
addon.RegisterCallback(init, format("Init%s", childName), 'Setup')