local ReplicatedStorage = game:GetService("ReplicatedStorage")

local GameConfig = require(ReplicatedStorage.Shared.GameConfig)

local EventService = {}
EventService.__index = EventService

function EventService:GetActiveModifiers(nowUnix)
	local incomeMultiplier = 1
	local mutationBonus = 0

	for _, eventDef in ipairs(GameConfig.Events) do
		if eventDef.startUtc > 0 and nowUnix >= eventDef.startUtc and nowUnix <= eventDef.endUtc then
			incomeMultiplier *= eventDef.incomeMultiplier
			mutationBonus += eventDef.mutationBonus
		end
	end

	return {
		incomeMultiplier = incomeMultiplier,
		mutationBonus = mutationBonus,
	}
end

return EventService
