--local cameraModule = playerModule:GetCameras()


local camera = workspace.CurrentCamera

local avatarEditorFrame = avatarEditorGui.Main
local catalogFrame = avatarEditorFrame.Catalog
local viewerFrame = avatarEditorFrame.Viewer

local detailsOverlay = avatarEditorGui.DetailsOverlay
local toggleButton = avatarEditorGui.Toggle

local doneButton = viewerFrame.Done
local viewButton = viewerFrame.View

local headerFrame = catalogFrame.Header
local categoryTabsFrame = headerFrame.CategoryTabs
local subCategoryTabsFrame = headerFrame.SubCategoryTabs
local searchFrame = headerFrame.Search

local containerFrame = catalogFrame.Container
local scrollingFrame = containerFrame.ScrollingFrame
local scrollingFrameUIGridLayout = scrollingFrame.UIGridLayout

local scaleFrame = containerFrame.ScaleFrame
local scaleFrameUIGridLayout = scaleFrame.UIGridLayout

local searchTextBox = searchFrame.TextBox
local clearSearchButton = searchFrame.Clear

local purchasePrompt = PurchasePrompt.new(detailsOverlay)

local activeButtons = Maid.new()
local activeConnections = Maid.new()
local activeCategoryButtons = {}
local activeSubCategoryButtons = {}

local numberValue = Instance.new("NumberValue")
numberValue.Value = CAMERA_OFFSET

local categoryButtons = TableUtil.Filter(categoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiButton")
end)
local subCategoryFrames = TableUtil.Filter(subCategoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiObject")
end)

local catalogFrameOpenTween = Tween:Create(catalogFrame, tweenInfo, {Position = UDim2.new(0, 0, 0, 0)})
local catalogFrameCloseTween = Tween:Create(catalogFrame, tweenInfo, {Position = UDim2.new(-0.6, 0, 0, 0)})
local viewerFrameOpenTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1, 0, 0, 0)})
local viewerFrameCloseTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1.4, 0, 0, 0)})
local viewFramePartialOpenTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1.4, -36, 0, 0)})
local fullViewCloseTween = Tween:Create(numberValue, tweenInfo, {Value = CAMERA_OFFSET})
local fullViewOpenTween = Tween:Create(numberValue, tweenInfo, {Value = 0.5})

local currentCategory = "Accessories"
local currentSubCategory = "Hair"

local isOpen = false
local fullView = false
