-- ----------------------------------------------------------------------------
layoutShedToolbox.mExits =
{
}
layoutShedToolbox.mPOIs = 
{
}
layoutShedToolbox.mHOs = 
{
	[objectShedFuse4] = 
	{
		siblings = {objectShedFuse4Dark, objectShedFuse4Pocket},
	},
	[objectShedPliers] = 
	{
		siblings = {objectShedPliersDark, objectShedPliersPocket},
	},
	[objectShedScrew] = 
	{
		siblings = {objectShedScrewDark},
	},
	[objectShedScrewdriver] = 
	{
		siblings = {objectShedScrewdriverDark, objectShedScrewdriverPocket},
	},
}
layoutShedToolbox.mIOs =
{
	[objectShedToolboxKeyhitarea] = 
	{
		links = {objectShedToolboxkey}
	},
}
-- ----------------------------------------------------------------------------
function layoutShedToolbox:onConstruct()
	
	Layout.onConstruct(self)
	objectShedToolboxKey:ss(kInactive)

end
-- ----------------------------------------------------------------------------
function layoutShedToolbox:onInitialize()
	
	Layout.onInitialize(self)
	
	objectShedToolboxShine:ss(kDone)

end
-- ----------------------------------------------------------------------------
function layoutShedToolbox:onClickObject(object, x, y)

	if (object == objectShedToolboxKeyhitarea and objectShedToolboxkey:getState() ~= kSelected) then
		think("MESSAGE_INTRO_TOOLBOX")
		
		if (objectShedToolboxkey:isIdle()) then
			objectShedToolboxkey:ss(kActive)
			
			-- Highlight animations
			objectShedCabinetInsect:ss(kIdle)
			layoutShed:showCabinetHighlight()
		end
	end
	
	return Layout.onClickObject(self, object, x, y)

end
-- ----------------------------------------------------------------------------
function layoutShedToolbox:onUsedAll(object, props)

	if (object == objectShedToolboxKeyhitarea) then
		self:openToolbox()
		return true
	end
	
	return Layout.onUsedAll(self, object, props)
end
-- ----------------------------------------------------------------------------
function layoutShedToolbox:openToolbox()

	objectShedToolboxKey:ss(kIdle)
	objectShedToolboxKeyhitarea:ss(kIdle)
	objectShedScrew:ss(kActive)
	objectShedScrewdriver:ss(kActive)
	objectShedToolboxLocked:ss(kDone)
	objectShedToolboxOpen:ss(kActive)
	
	objectShedToolboxClosed:animate("OpenToolbox",
		{ alpha=0,		duration=kTimeFadeSwitch	}
	)
	
end
