local C=script.Parent.benchmarks return function(c,n)local S=(require(C.utils))(c,n)local U=(require(C.app))(c,n)local O=(require(C.cases.Tree))(c,n)local w=(require(C.cases.SierpinskiTriangle))(c,n)local p={["\077\111\117\110\116 \100\101\101\112 \116\114\101\101"]=S.createTestBlock(function(C)return{benchmarkType="\109\111\117\110\116",Component=O.Tree;getComponentProps=function()return{breadth=2;components=C;depth=7,id=0,wrap=1}end;Provider=C.Provider;sampleCount=50,anchorPoint=Vector2.new(.5,.5)}end);["\077\111\117\110\116 \119\105\100\101 \116\114\101\101"]=S.createTestBlock(function(C)return{benchmarkType="\109\111\117\110\116",Component=O.Tree,getComponentProps=function()return{breadth=6;components=C;depth=3,id=0,wrap=2}end;Provider=C.Provider,sampleCount=50;anchorPoint=Vector2.new(.5,.5)}end),["\085\112\100\097\116\101 \100\121\110\097\109\105\099 \115\116\121\108\101\115"]=S.createTestBlock(function(C)return{benchmarkType="\117\112\100\097\116\101";Component=w.SierpinskiTriangle;getComponentProps=function(c)return{components=C;s=200;renderCount=c.cycle,sampleCount=c.sampleCount;x=0;y=0}end,Provider=C.Provider,sampleCount=50;anchorPoint=Vector2.new(0,0)}end)}return function(C)return c.createElement("\083\099\114\101\101\110\071\117\105",{IgnoreGuiInset=true,ZIndexBehavior=Enum.ZIndexBehavior.Sibling},c.createElement(U,{tests=p}))end end
local Benchmarks = script.Parent.benchmarks

-- ROBLOX deviation: return an element instead of rendering here so bootstrap
-- code needed to connect to engine can reside elsewhere.
return function(Roact, ReactRoblox)
	local Utils = require(Benchmarks.utils)(Roact, ReactRoblox)
	local App = require(Benchmarks.app)(Roact, ReactRoblox)
	local Tree = require(Benchmarks.cases.Tree)(Roact, ReactRoblox)
	local SierpinskiTriangle = require(Benchmarks.cases.SierpinskiTriangle)(Roact, ReactRoblox)

	local tests = {
		["Mount deep tree"] = Utils.createTestBlock(function(components)
			return {
				benchmarkType = "mount",
				Component = Tree.Tree,
				getComponentProps = function()
					return { breadth = 2, components = components, depth = 7, id = 0, wrap = 1 }
				end,
				Provider = components.Provider,
				sampleCount = 50,
				anchorPoint = Vector2.new(0.5, 0.5),
			}
		end),
		["Mount wide tree"] = Utils.createTestBlock(function(components)
			return {
				benchmarkType = "mount",
				Component = Tree.Tree,
				getComponentProps = function()
					return { breadth = 6, components = components, depth = 3, id = 0, wrap = 2 }
				end,
				Provider = components.Provider,
				sampleCount = 50,
				anchorPoint = Vector2.new(0.5, 0.5),
			}
		end),
		["Update dynamic styles"] = Utils.createTestBlock(function(components)
			return {
				benchmarkType = "update",
				Component = SierpinskiTriangle.SierpinskiTriangle,
				getComponentProps = function(props)
					return {
						components = components,
						s = 200,
						renderCount = props.cycle,
						sampleCount = props.sampleCount,
						x = 0,
						y = 0,
					}
				end,
				Provider = components.Provider,
				sampleCount = 50,
				anchorPoint = Vector2.new(0, 0),
			}
		end),
		-- ["Mount text tree"] = Utils.createTestBlock(function(components)
		-- 	return {
		-- 		benchmarkType = "mount",
		-- 		Component = TextTree.TextTree,
		-- 		getComponentProps = function()
		-- 			return { breadth = 6, components = components, depth = 3, id = 0, wrap = 2 }
		-- 		end,
		-- 		Provider = components.Provider,
		-- 		sampleCount = 50,
		-- 	}
		-- end),
	}

	return function(props)
		return Roact.createElement(
			"ScreenGui",
			{ IgnoreGuiInset = true, ZIndexBehavior = Enum.ZIndexBehavior.Sibling },
			Roact.createElement(App, { tests = tests })
		)
	end
end
