local n=require(script.Parent.Parent.Parent.Roact)local H=require(script.Parent.Parent)local w=n.Component:extend("\083\119\105\116\099\104\069\120\097\109\112\108\101\067\111\109\112\111\110\101\110\116")function w.init(n)n:setState({a=true,b=false})end function w.render(w)return n.createElement(H.ThemeProvider,{Theme=H.Themes.Dark},{MainFrame=n.createElement("\070\114\097\109\101",{Size=UDim2.fromScale(1,1),BackgroundColor3=Color3.new(1,1,1),BorderSizePixel=0},{n.createElement("\085\073\071\114\105\100\076\097\121\111\117\116",{CellSize=UDim2.fromOffset(36,24);CellPadding=UDim2.fromOffset(10,10);HorizontalAlignment=Enum.HorizontalAlignment.Center,VerticalAlignment=Enum.VerticalAlignment.Center});SwitchA=n.createElement(H.Switch,{Checked=w.state.a;OnChecked=function(n)w:setState({a=n})end});SwitchB=n.createElement(H.Switch,{Checked=w.state.b,OnChecked=function(n)w:setState({b=n})end})})})end return function(H)local q=n.mount(n.createElement(w),H)return function()n.unmount(q)end end
local Roact = require(script.Parent.Parent.Parent.Roact)
local RoactMaterial = require(script.Parent.Parent)

local ExampleComponent = Roact.Component:extend("SwitchExampleComponent")

function ExampleComponent:init()
	self:setState({
		a = true,
		b = false,
	})
end

function ExampleComponent:render()
	return Roact.createElement(RoactMaterial.ThemeProvider, {
		Theme = RoactMaterial.Themes.Dark,
	}, {
		MainFrame = Roact.createElement("Frame", {
			Size = UDim2.fromScale(1, 1),
			BackgroundColor3 = Color3.new(1, 1, 1),
			BorderSizePixel = 0,
		}, {
			Roact.createElement("UIGridLayout", {
				CellSize = UDim2.fromOffset(36, 24),
				CellPadding = UDim2.fromOffset(10, 10),
				HorizontalAlignment = Enum.HorizontalAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
			}),

			SwitchA = Roact.createElement(RoactMaterial.Switch, {
				Checked = self.state.a,
				OnChecked = function(NewValue)
					self:setState({
						a = NewValue,
					})
				end,
			}),

			SwitchB = Roact.createElement(RoactMaterial.Switch, {
				Checked = self.state.b,
				OnChecked = function(NewValue)
					self:setState({
						b = NewValue,
					})
				end,
			}),
		}),
	})
end

return function(Target)
	local Tree = Roact.mount(Roact.createElement(ExampleComponent), Target)

	return function()
		Roact.unmount(Tree)
	end
end