local a=(require(((game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")):FindFirstChild("\076\111\097\100\101\114\085\116\105\108\115",true)).Parent)).load(script)local Z=a("\066\108\101\110\100")local T=a("\077\097\105\100")return function(a)local D=T.new()local U=Z.State({"\097";"\098","\099"})D:GiveTask(U)D:GiveTask(((Z.New("\084\101\120\116\076\097\098\101\108"))({Parent=a;[Z.Children]={(Z.New("\084\101\120\116\066\117\116\116\111\110"))({Text="\065\100\100";AutoButtonColor=true;Size=UDim2.new(0,100,0,20);[Z.OnEvent("\065\099\116\105\118\097\116\101\100")]=function()local a={}for Z,T in pairs(U.Value)do table.insert(a,T)end table.insert(a,string.char(string.byte("\097")+#a))U.Value=a end}),Z.ComputedPairs(U,function(a,T)print("\067\111\109\112\117\116\101",T)return(Z.New("\084\101\120\116\076\097\098\101\108"))({Text=tostring(T);Size=UDim2.new(0,20,0,20)})end);(Z.New("\085\073\076\105\115\116\076\097\121\111\117\116"))({Padding=UDim.new(0,5)})}})):Subscribe())return function()D:DoCleaning()end end


local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)

local Blend = require("Blend")
local Maid = require("Maid")

return function(target)
	local maid = Maid.new()

	local state = Blend.State({"a", "b", "c"})
	maid:GiveTask(state)

	maid:GiveTask((Blend.New "TextLabel" {
		Parent = target;

		[Blend.Children] = {
			Blend.New "TextButton" {
				Text = "Add";
				AutoButtonColor = true;
				Size = UDim2.new(0, 100, 0, 20);
				[Blend.OnEvent "Activated"] = function()
					local newState = {}
					for _, item in pairs(state.Value) do
						table.insert(newState, item)
					end
					table.insert(newState, string.char(string.byte("a") + #newState))
					state.Value = newState
				end;
			};
			Blend.ComputedPairs(state, function(_index, value)
				print("Compute", value)
				return Blend.New "TextLabel" {
					Text = tostring(value);
					Size = UDim2.new(0, 20, 0, 20);
				}
			end);

			Blend.New "UIListLayout" {
				Padding = UDim.new(0, 5);
			};
		};
	}):Subscribe())

	return function()
		maid:DoCleaning()
	end
end
