local n=script:FindFirstAncestor("\077\097\122\101\071\101\110\101\114\097\116\111\114\080\108\117\103\105\110")local Z=n.Plugin local w=require(n:WaitForChild("\082\111\097\099\116"))local i=require(Z.Components.Theme)local X=require(Z.Components.RoundButton)local G=require(Z.Components.UIPadding)local K=w.createElement local function V(n)local Z=n.text local w=n.onClick local G=n.LayoutOrder local V local F return i.with(function(i)if n.secondary then V=i.Brand1 F=i.Background2 else V=i.TextOnAccent F=i.Brand1 end local y=K(X,{Text=Z;onClicked=w;TextColor3=V;BackgroundColor3=F})local J=K("\070\114\097\109\101",{Size=UDim2.new(1,0,0,60);BackgroundTransparency=1,LayoutOrder=G},{y})return J end)end return V
local Root = script:FindFirstAncestor('MazeGeneratorPlugin')
local Plugin = Root.Plugin

local Roact = require(Root:WaitForChild('Roact'))

local Theme = require(Plugin.Components.Theme)
local RoundButton = require(Plugin.Components.RoundButton)
local UIPadding = require(Plugin.Components.UIPadding)

local e = Roact.createElement

local function FormButton(props)
	local text = props.text
	local onClick = props.onClick
	local LayoutOrder = props.LayoutOrder

	local TextColor3
	local BackgroundColor3

	return Theme.with(function(theme)
		if props.secondary then
			TextColor3 = theme.Brand1
			BackgroundColor3 = theme.Background2
		else
			TextColor3 = theme.TextOnAccent
			BackgroundColor3 = theme.Brand1
		end

		local button = e(RoundButton, {
			Text = text,
			onClicked = onClick,
			TextColor3 = TextColor3,
			BackgroundColor3 = BackgroundColor3,
		})

		local frame = e(
			'Frame',
			{
				Size = UDim2.new(1, 0, 0, 60),
				BackgroundTransparency = 1,
				LayoutOrder = LayoutOrder,
			},
			{ button }
		)
		return frame
	end)
end

return FormButton