--[[
	Pickup visualizer implementation
]]


local pickupVisualizer = {}

function pickupVisualizer.start()
	for _, instance in pairs(CollectionService:GetTagged(PICKUP_SPAWNER_TAG)) do
		pickupAdded(instance)
	end

	maid.pickupAddedConnection = CollectionService:GetInstanceAddedSignal(PICKUP_SPAWNER_TAG):Connect(pickupAdded)
	maid.pickupRemovedConnection = CollectionService:GetInstanceRemovedSignal(PICKUP_SPAWNER_TAG):Connect(pickupRemoved)

	maid.actionActivatedConnection = ActionPrompts.actionActivated:connect(actionActivated)
end

function pickupVisualizer.stop()
	for _, instance in pairs(CollectionService:GetTagged(PICKUP_SPAWNER_TAG)) do
		pickupRemoved(instance)
	end

	maid:clean()
end

return pickupVisualizer
