--[[
    Turns brake lights on or off depending on the status
]]

function VehicleLightsComponent:updateStatus(statusesChanged)
	if statusesChanged.Braking ~= nil then
		local brakeLightsOn = statusesChanged.Braking
		if brakeLightsOn ~= self.state.brakeLights then
			self.state.brakeLights = brakeLightsOn
			self:toggleLights(self.brakeLights, brakeLightsOn)
		end
	end
end

return VehicleLightsComponent
