-- ROBLOX deviation END


exports.default = function(snapshot: Snapshot, afterUpdate: boolean): Array<string>
	local statuses = {}

	if Boolean.toJSBoolean(snapshot.added) then
		table.insert(statuses, SNAPSHOT_ADDED(ARROW .. pluralize("snapshot", snapshot.added) .. " written."))
	end

	if Boolean.toJSBoolean(snapshot.updated) then
		table.insert(statuses, SNAPSHOT_UPDATED(ARROW .. pluralize("snapshot", snapshot.updated) .. " updated."))
	end

	if Boolean.toJSBoolean(snapshot.unmatched) then
		table.insert(statuses, FAIL_COLOR(ARROW .. pluralize("snapshot", snapshot.unmatched) .. " failed."))
	end

	if Boolean.toJSBoolean(snapshot.unchecked) then
		if afterUpdate then
			table.insert(statuses, SNAPSHOT_UPDATED(ARROW .. pluralize("snapshot", snapshot.unchecked) .. " removed."))
		else
			table.insert(
				statuses,
				SNAPSHOT_OUTDATED(ARROW .. pluralize("snapshot", snapshot.unchecked) .. " obsolete.")
			)
		end

		Array.forEach(snapshot.uncheckedKeys, function(key: string)
			table.insert(statuses, "	" .. DOT .. key)
		end)
	end

	if snapshot.fileDeleted then
		table.insert(statuses, SNAPSHOT_UPDATED(ARROW .. "snapshot file removed."))
	end

	return statuses
end

return exports
