local M=(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 D=M("\066\108\101\110\100")local e=M("\077\097\105\100")return function(M)local k=e.new()local n=D.State("\104\105")k:GiveTask(((D.New("\070\114\097\109\101"))({Size=UDim2.new(1,0,1,0);BackgroundTransparency=1;Parent=M;[D.Children]={(D.New("\084\101\120\116\066\111\120"))({Size=UDim2.new(0,200,0,50);Text=n;[D.OnChange("\084\101\120\116")]=n;[D.OnEvent("\070\111\099\117\115\101\100")]=function()print("\070\111\099\117\115\101\100")end;[function(M)return M.Focused end]=function()print("\070\111\099\117\115\101\100 \040\118\105\097 \102\117\110\099\041")end;[function(M)return M:GetPropertyChangedSignal("\084\101\120\116")end]=function()print("\080\114\111\112\101\114\116\121 \099\104\097\110\103\101\100 \102\114\111\109 \058\071\101\116\080\114\111\112\101\114\116\121\067\104\097\110\103\101\100\083\105\103\110\097\108\040\041")end});(D.New("\084\101\120\116\066\111\120"))({Size=UDim2.new(0,200,0,50);[D.OnChange("\084\101\120\116")]=n,Text=n});(D.New("\085\073\076\105\115\116\076\097\121\111\117\116"))({Padding=UDim.new(0,10)})}})):Subscribe())return function()k: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("hi")

	maid:GiveTask((Blend.New "Frame" {
		Size = UDim2.new(1, 0, 1, 0);
		BackgroundTransparency = 1;
		Parent = target;

		[Blend.Children] = {
			Blend.New "TextBox" {
				Size = UDim2.new(0, 200, 0, 50);
				Text = state;
				[Blend.OnChange "Text"] = state;
				[Blend.OnEvent "Focused"] = function()
					print("Focused")
				end;

				[function(inst) return inst.Focused end] = function()
					print("Focused (via func)")
				end;

				-- this also works
				[function(inst) return inst:GetPropertyChangedSignal("Text") end] = function()
					print("Property changed from :GetPropertyChangedSignal()")
				end;
			};

			Blend.New "TextBox" {
				Size = UDim2.new(0, 200, 0, 50);
				[Blend.OnChange "Text"] = state; -- read state
				Text = state; -- write state
			};

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

	return function()
		maid:DoCleaning()
	end
end
