local Z=script:FindFirstAncestor("\077\097\122\101\071\101\110\101\114\097\116\111\114\080\108\117\103\105\110")local I=Z.Plugin local S=require(Z:WaitForChild("\082\111\097\099\116"))local C=require(Z.M)local f=require(I.Components.UICorner)local L=S.createElement local n="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\050\054\051\048\053\057\048\052"local y="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\050\054\051\048\055\057\055\049"local i=require(I.Components.Theme)local s={close={Image=n;ImageRectOffset=Vector2.new(284,4),ImageRectSize=Vector2.new(24,24)};inbox={Image=n;ImageRectOffset=Vector2.new(404,484);ImageRectSize=Vector2.new(36,36)};shop={Image=y;ImageRectOffset=Vector2.new(684,44),ImageRectSize=Vector2.new(36,36)}}local function U(Z)local I local n local y=UDim2.new(1,0,0,50)if Z.icon then y=UDim2.new(.7,0,.7,0)n=L("\085\073\065\115\112\101\099\116\082\097\116\105\111\067\111\110\115\116\114\097\105\110\116")I=L("\073\109\097\103\101\066\117\116\116\111\110",C.extend({Position=UDim2.new(.5,0,.5,0),AnchorPoint=Vector2.new(.5,.5),Size=UDim2.new(0,25,0,25);BackgroundTransparency=1,ZIndex=2,[S.Event.MouseButton1Click]=function()Z.onClicked()end},s[Z.icon]))end return i.with(function(i)return L("\084\101\120\116\066\117\116\116\111\110",C.extend({Font=i.ButtonFont,Size=y,BackgroundColor3=i.Brand1;TextColor3=i.TextOnAccent;TextSize=26,Text="";[S.Event.MouseButton1Click]=function()Z.onClicked()end},C.omit(Z,"\105\099\111\110","\111\110\067\108\105\099\107\101\100")),{UICorner=L(f);n,I})end)end return U
local Root = script:FindFirstAncestor('MazeGeneratorPlugin')
local Plugin = Root.Plugin

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

local UICorner = require(Plugin.Components.UICorner)
local e = Roact.createElement

local materialIconsAsset = 'rbxassetid://3926305904'
local materialIconsAsset2 = 'rbxassetid://3926307971'
local Theme = require(Plugin.Components.Theme)

local MaterialIcons = {
	close = {
		Image = materialIconsAsset,
		ImageRectOffset = Vector2.new(284, 4),
		ImageRectSize = Vector2.new(24, 24),
	},
	inbox = {
		Image = materialIconsAsset,
		ImageRectOffset = Vector2.new(404, 484),
		ImageRectSize = Vector2.new(36, 36),
	},
	shop = {
		Image = materialIconsAsset2,
		ImageRectOffset = Vector2.new(684, 44),
		ImageRectSize = Vector2.new(36, 36),
	},
}

local function RoundButton(props)
	local image
	local aspect

	local size = UDim2.new(1, 0, 0, 50)

	if props.icon then
		size = UDim2.new(0.7, 0, 0.7, 0)
		aspect = e('UIAspectRatioConstraint')
		image = e(
			'ImageButton',
			M.extend(
				{
					Position = UDim2.new(0.5, 0, 0.5, 0),
					AnchorPoint = Vector2.new(0.5, 0.5),
					Size = UDim2.new(0, 25, 0, 25),
					BackgroundTransparency = 1,
					ZIndex = 2,
					[Roact.Event.MouseButton1Click] = function()
						props.onClicked()
					end,
				},
				MaterialIcons[props.icon]
			)
		)
	end
	return Theme.with(function(theme)
		return e(
			'TextButton',

			M.extend(
				{
					Font = theme.ButtonFont,
					Size = size,
					BackgroundColor3 = theme.Brand1,
					TextColor3 = theme.TextOnAccent,
					TextSize = 26,
					Text = '',
					[Roact.Event.MouseButton1Click] = function()
						props.onClicked()
					end,
				},
				M.omit(props, 'icon', 'onClicked')
			),
			{
				UICorner = e(UICorner),
				aspect,
				image,
			}
		)
	end)
end

return RoundButton