local W={}local U=script.Parent.Parent local V=U.Vendor local H=require(V.GuiLib.LazyLoader)local M=H.Classes local x=U.UI local S=x.MeshCreator_EditorGui local v=require(script.HeaderHandler)local j=require(script.ToolBarHandler)local c=require(script.LoadingWindowHandler)function W.new(U)local V=setmetatable(W,{})V.EditorGui=S:Clone()V.HeaderHandler=v.new(V.EditorGui.HeaderFrame)V.ToolBarHandler=j.new(V.EditorGui.ToolBarFrame)V.LoadingWindowHandler=c.new(V.EditorGui.LoadingWindowFrame)if U:FindFirstChild("\077\101\115\104\067\114\101\097\116\111\114\095\069\100\105\116\111\114\071\117\105")then(U:FindFirstChild("\077\101\115\104\067\114\101\097\116\111\114\095\069\100\105\116\111\114\071\117\105")):Destroy()end V.EditorGui.Parent=U return V end return W
local EditorGuiHandler = {}

local Root = script.Parent.Parent
local Vendor = Root.Vendor
local GuiLib = require(Vendor.GuiLib.LazyLoader)
local GuiClasses = GuiLib.Classes
local UI = Root.UI
local EditorGui = UI.MeshCreator_EditorGui
local HeaderHandler = require(script.HeaderHandler)
local ToolBarHandler = require(script.ToolBarHandler)
local LoadingWindowHandler = require(script.LoadingWindowHandler)

function EditorGuiHandler.new(parent)
	local self = setmetatable(EditorGuiHandler, {})
	
	self.EditorGui = EditorGui:Clone()
	self.HeaderHandler = HeaderHandler.new(self.EditorGui.HeaderFrame)
	self.ToolBarHandler = ToolBarHandler.new(self.EditorGui.ToolBarFrame)
	self.LoadingWindowHandler = LoadingWindowHandler.new(self.EditorGui.LoadingWindowFrame)

	if parent:FindFirstChild("MeshCreator_EditorGui") then
		parent:FindFirstChild("MeshCreator_EditorGui"):Destroy()
	end

	self.EditorGui.Parent = parent
	
	return self
end

return EditorGuiHandler