local _module = {}
_module.create = function(frame)
local args = frame.args
local year = tonumber(args.year) or error("Parameter: 'year' is missing or invalid")
local j = 1
local teams = mw.loadData("Module:IndianPremierLeague/Teams")
local filteredTeams = {}
for i, v in ipairs(teams) do
-- Filter the teams based on the year
if year >= v.startYear and (not v.endYear or v.endYear >= year) then
filteredTeams[j] = v
j = j + 1
end
end
return require("Module:CricketLeagueGroupStageSummary").create(args.useParentData and frame:getParent() or frame, year .. " IPL Group Stage Match Summary", filteredTeams, true, nil, args.useWebSlice)
end
return _module