local M=script.Parent.Parent local B=M.Components local f=M.Modules local e=require(f.Packages)local D=require(e.Directory.Roact)local A=require(B.StudioSettings)local n=D.Component:extend("\083\116\117\100\105\111\084\104\101\109\101\080\114\111\118\105\100\101\114")function n.init(M)M:setState({CurrentTheme=A.Theme})M.StudioThemeChanged=A.ThemeChanged:Connect(function()M:setState({CurrentTheme=A.Theme})end)end function n.render(M)local B=D.oneChild(M.props[D.Children])return B(M.state.CurrentTheme)end function n.willUnmount(M)M.StudioThemeChanged:Disconnect()end local function H(M)return D.createElement(n,{},{Component=M})end return H
local PacketProfiler = script.Parent.Parent
local Components = PacketProfiler.Components
local Modules = PacketProfiler.Modules
local Packages = require(Modules.Packages)

local Roact = require(Packages.Directory.Roact)
local StudioSettings = require(Components.StudioSettings)

local StudioThemeProvider = Roact.Component:extend("StudioThemeProvider")

function StudioThemeProvider:init()
	self:setState({
		CurrentTheme = StudioSettings.Theme
	})
	self.StudioThemeChanged = StudioSettings.ThemeChanged:Connect(function()
		self:setState({
			CurrentTheme = StudioSettings.Theme
		})
	end)
end

function StudioThemeProvider:render()
	local Component = Roact.oneChild(self.props[Roact.Children])
	return Component(self.state.CurrentTheme)
end

function StudioThemeProvider:willUnmount()
	self.StudioThemeChanged:Disconnect()
end

local function StudioTheme(Component)
	return Roact.createElement(StudioThemeProvider, {}, {
		Component = Component,
	})
end

return StudioTheme