local n=require(script.Parent.Parent.Runtime)local t=require(script.Parent.Parent.Style)local H=require(script.Parent.Parent.create)return n.widget(function(B)local S,Z=n.useState(false)local I=n.useInstance(function(n)local B=t.get()return H("\084\101\120\116\066\117\116\116\111\110",{[n]="\098\117\116\116\111\110",BackgroundColor3=B.bg3,BorderSizePixel=0;Font=Enum.Font.SourceSans,Size=UDim2.new(0,100,0,40),TextColor3=B.textColor;AutomaticSize=Enum.AutomaticSize.X,TextSize=21,H("\085\073\080\097\100\100\105\110\103",{PaddingLeft=UDim.new(0,10);PaddingRight=UDim.new(0,10)}),H("\085\073\067\111\114\110\101\114");Activated=function()Z(true)end})end)local O=I.button O.Text=B local G={clicked=function()if S then Z(false)return true end return false end}return G end)


local Runtime = require(script.Parent.Parent.Runtime)
local Style = require(script.Parent.Parent.Style)
local create = require(script.Parent.Parent.create)

return Runtime.widget(function(text)
	local clicked, setClicked = Runtime.useState(false)
	local refs = Runtime.useInstance(function(ref)
		local style = Style.get()

		return create("TextButton", {
			[ref] = "button",
			BackgroundColor3 = style.bg3,
			BorderSizePixel = 0,
			Font = Enum.Font.SourceSans,
			Size = UDim2.new(0, 100, 0, 40),
			TextColor3 = style.textColor,
			AutomaticSize = Enum.AutomaticSize.X,
			TextSize = 21,

			create("UIPadding", {
				PaddingLeft = UDim.new(0, 10),
				PaddingRight = UDim.new(0, 10),
			}),

			create("UICorner"),

			Activated = function()
				setClicked(true)
			end,
		})
	end)

	local instance = refs.button

	instance.Text = text

	local handle = {
		clicked = function()
			if clicked then
				setClicked(false)
				return true
			end

			return false
		end,
	}

	return handle
end)
