local h=script.Parent.Parent.Parent.Vendor local z=require(h.Roact)local r=require(script.Parent.Item)local k={}local P=5 for h=P,1,-1 do table.insert(k,z.createElement(r,{NumLayers=P,Layer={Id=h,Name="\076\097\121\101\114 "..h,Properties={Visible=math.random()>.5;Locked=false}};Size=UDim2.new(0,300,0,60),OnActivated=function()print("\099\108\105\099\107\101\100")end}))end return function(h)local r=z.createFragment({Layout=z.createElement("\085\073\076\105\115\116\076\097\121\111\117\116",{Padding=UDim.new(0,5),SortOrder=Enum.SortOrder.LayoutOrder;FillDirection=Enum.FillDirection.Vertical,HorizontalAlignment=Enum.HorizontalAlignment.Center;VerticalAlignment=Enum.VerticalAlignment.Center});unpack(k)})local P=z.mount(r,h)return function()z.unmount(P)end end
local Vendor = script.Parent.Parent.Parent.Vendor
local Roact = require(Vendor.Roact)

local Item = require(script.Parent.Item)

local layers = {}
local max = 5

for i = max, 1, -1 do
	table.insert(layers, Roact.createElement(Item, {
		NumLayers = max,
		Layer = {
			Id =i,
			Name = "Layer " .. i,
			Properties = {
				Visible = math.random() > 0.5,
				Locked = false
			}
		},
		Size = UDim2.new(0, 300, 0, 60),
		OnActivated = function() print("clicked") end
	}))
end

return function(target)
	local element = Roact.createFragment({
		Layout = Roact.createElement("UIListLayout", {
			Padding = UDim.new(0, 5),
			SortOrder = Enum.SortOrder.LayoutOrder,
			FillDirection = Enum.FillDirection.Vertical,
			HorizontalAlignment = Enum.HorizontalAlignment.Center,
			VerticalAlignment = Enum.VerticalAlignment.Center,
		}),
		unpack(layers)
	})
	
	local handle = Roact.mount(element, target)
	return function()
		Roact.unmount(handle)
	end
end