local C=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local g=C:WaitForChild("\077\111\100\117\108\101\115")local q=require(g.src.utils.Logger)local h=require(g.src.utils.Dict)local x=require(g.src.utils.None)local function t(C,g)C=C or{mostVisited={},mostPlayed={};mostCoins={}}if g.type=="\097\100\100\076\101\097\100\101\114\098\111\097\114\100\073\116\101\109\115"then local q=g.items local x=g.leaderboardKey return h.join(C,{[x]=q})end return C end return t
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local logger = require(Modules.src.utils.Logger)

local Dict = require(Modules.src.utils.Dict)
local None = require(Modules.src.utils.None)

local function leaderboards(state, action)
	state = state or {
		mostVisited = {},
		mostPlayed = {},
		mostCoins = {},
	}

	if action.type == 'addLeaderboardItems' then
		local items = action.items
		local leaderboardKey = action.leaderboardKey

		return Dict.join(state, { [leaderboardKey] = items })
	end

	return state
end

return leaderboards