local v=game:GetService("\080\108\097\121\101\114\115")local b=script.Parent.Parent.Parent.Parent local i=require(b.Parent.Fusion)local V=require(b.SourceCode.Client.UI.States)local R=require(b.Parent.OnyxUI)local s=require(script.Parent.OnyxUITheme)local a=R.Themer local f={"\084\111\112\098\097\114\072\085\068","\080\114\111\109\112\116\072\085\068"}local G={Name="\085\073\067\111\110\116\114\111\108\108\101\114",Scope=i.scoped(i),XPMultiplierDropdownIcons={}}function G.MountUI(b,v)return(a.Theme:is(s)):during(function()local i=v(b.Scope,{Parent=b.RoroomsUI})return i end)end function G.KnitStart(v)V:Start()for i,V in ipairs(f)do local R=b.SourceCode.Client.UI.ScreenGuis:FindFirstChild(V)if R then local b=require(R)v:MountUI(b)end end end G.RoroomsUI=(G.Scope:New("\083\099\114\101\101\110\071\117\105"))({Name="\082\111\114\111\111\109\115\085\073";Parent=v.LocalPlayer:WaitForChild("\080\108\097\121\101\114\071\117\105");ResetOnSpawn=false})return G
local Players = game:GetService("Players")

local Rorooms = script.Parent.Parent.Parent.Parent
local Fusion = require(Rorooms.Parent.Fusion)
local States = require(Rorooms.SourceCode.Client.UI.States)
local OnyxUI = require(Rorooms.Parent.OnyxUI)
local OnyxUITheme = require(script.Parent.OnyxUITheme)

local Themer = OnyxUI.Themer

local DEFAULT_UIS = { "TopbarHUD", "PromptHUD" }

local UIController = {
	Name = "UIController",

	Scope = Fusion.scoped(Fusion),
	XPMultiplierDropdownIcons = {},
}

function UIController:MountUI(Component)
	return Themer.Theme:is(OnyxUITheme):during(function()
		local UIObject = Component(self.Scope, {
			Parent = self.RoroomsUI,
		})

		return UIObject
	end)
end

function UIController:KnitStart()
	States:Start()

	for _, GuiName in ipairs(DEFAULT_UIS) do
		local GuiModule = Rorooms.SourceCode.Client.UI.ScreenGuis:FindFirstChild(GuiName)
		if GuiModule then
			local Gui = require(GuiModule)
			self:MountUI(Gui)
		end
	end
end

UIController.RoroomsUI = UIController.Scope:New "ScreenGui" {
	Name = "RoroomsUI",
	Parent = Players.LocalPlayer:WaitForChild("PlayerGui"),
	ResetOnSpawn = false,
}

return UIController
