-- Configuration does not work well with arrays so convert the backgrounds into
-- a dictionary.

local backgroundsDict = {}
for index, assetId in ipairs(DEFAULT_BACKGROUNDS) do
	backgroundsDict[assetId] = {
		image = assetId,
		order = index,
	}
end

local validator = t.map(
	t.string,
	t.strictInterface({
		image = t.match("rbxassetid://[0-9]+"),
		order = t.number,
	})
)

local backgrounds = Configuration.new("backgrounds", backgroundsDict, validator)

return backgrounds
