local Masque = LibStub('Masque')
Masque:Group('Combuctor', 'inventory')
Masque:Group('Combuctor', 'bank')
Masque:Group('Combuctor', 'guildbank')
Masque:Group('Combuctor', 'voidstorage')

local ItemSlot = Combuctor.ItemSlot

local oldNew = ItemSlot.New
function ItemSlot:New(...)
	local item = oldNew(self,...)
	local name = item:GetName()
	
	Masque:Group('Combuctor', item:GetID()):AddButton(item, {
		Count = _G[name .. 'Count'],
		Icon = _G[name .. 'IconTexture'],
		Normal = _G[name .. 'NormalTexture'],
		
		Highlight = item:GetHighlightTexture(),
		Pushed = item:GetPushedTexture(),
		
		Cooldown = item.cooldown,
		Border = item.border,
		
		AutoCastable = false, AutoCast = false,
		HotKey = false, Name = false, Duration = false,
		Disabled = false, Checked = false,
		Flash = false,
	})
	
	return item
end

local oldFree = ItemSlot.Free
function ItemSlot:Free()
	Masque:Group('Combuctor', self:GetID()):RemoveButton(self)
	oldFree(self)
end