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=w.createElement local function G(n)local Z=n.checked local G=n.layoutOrder local K=n.onChange return i.with(function(n)return X("\073\109\097\103\101\066\117\116\116\111\110",{LayoutOrder=G;Size=UDim2.new(0,20,0,20);BorderSizePixel=2;BorderColor3=n.Text2,BackgroundColor3=n.Background2;[w.Event.Activated]=function()K(not Z)end},{Indicator=X("\070\114\097\109\101",{Size=UDim2.new(0,18,0,18);Position=UDim2.new(.5,0,.5,0),AnchorPoint=Vector2.new(.5,.5);BorderSizePixel=0,BackgroundColor3=n.Brand1;BackgroundTransparency=Z and 0 or 1})})end)end return G
local Root = script:FindFirstAncestor('MazeGeneratorPlugin')
local Plugin = Root.Plugin

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

local Theme = require(Plugin.Components.Theme)

local e = Roact.createElement

local function Checkbox(props)
	local checked = props.checked
	local layoutOrder = props.layoutOrder
	local onChange = props.onChange

	return Theme.with(function(theme)
		return e(
			'ImageButton',
			{
				LayoutOrder = layoutOrder,
				Size = UDim2.new(0, 20, 0, 20),
				BorderSizePixel = 2,
				BorderColor3 = theme.Text2,
				BackgroundColor3 = theme.Background2,
				[Roact.Event.Activated] = function()
					onChange(not checked)
				end,
			},
			{ Indicator = e('Frame', {
				Size = UDim2.new(0, 18, 0, 18),
				Position = UDim2.new(0.5, 0, 0.5, 0),
				AnchorPoint = Vector2.new(0.5, 0.5),
				BorderSizePixel = 0,
				BackgroundColor3 = theme.Brand1,
				BackgroundTransparency = checked and 0 or 1,
			}) }
		)
	end)
end

return Checkbox