local k=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local c=require(k.Packages.Fusion)local O=c.New local M=c.Children local t=c.Computed local S=c.OnEvent local w=c.Value return function(k)k.Collapsed=k.Collapsed or w(false)return(O("\070\114\097\109\101"))({BackgroundTransparency=1;Size=UDim2.new(1,0,0,24);[M]={(O("\070\114\097\109\101"))({BackgroundTransparency=1,Size=UDim2.fromScale(1,1);[M]={(O("\070\114\097\109\101"))({BackgroundColor3=k.Color;BackgroundTransparency=.3,BorderSizePixel=0;Size=UDim2.fromScale(1,1)}),(O("\084\101\120\116\076\097\098\101\108"))({Font=Enum.Font.GothamBold,Text=k.Name;TextColor3=Color3.fromHex("\035\070\070\070\070\070\070"),TextSize=12,TextXAlignment=Enum.TextXAlignment.Left,BackgroundTransparency=1,Position=UDim2.fromOffset(16,0),Size=UDim2.fromScale(.75,1),TextWrapped=true,ZIndex=2});(O("\084\101\120\116\076\097\098\101\108"))({Font=Enum.Font.Gotham,Text=k.Count;TextColor3=Color3.fromHex("\035\070\070\070\070\070\070"),TextTransparency=.5;TextSize=12;TextXAlignment=Enum.TextXAlignment.Right,BackgroundTransparency=1;AnchorPoint=Vector2.new(1,0),Position=UDim2.new(1,-16,0,0),Size=UDim2.fromScale(0,1),ZIndex=2})};[S("\073\110\112\117\116\069\110\100\101\100")]=function(c)if table.find({Enum.UserInputType.MouseButton1;Enum.UserInputType.Touch},c.UserInputType)then k.Collapsed:set(not k.Collapsed:get())end end})}})end
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Fusion = require(ReplicatedStorage.Packages.Fusion)

local New = Fusion.New
local Children = Fusion.Children
local Computed = Fusion.Computed
local OnEvent = Fusion.OnEvent
local Value = Fusion.Value

return function(props)
    props.Collapsed = props.Collapsed or Value(false)
    return New "Frame" {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 24),
    
        [Children] = {
            New "Frame" {
                BackgroundTransparency = 1,
                Size = UDim2.fromScale(1, 1),
    
                [Children] = {
                    New "Frame" {
                        BackgroundColor3 = props.Color,
                        BackgroundTransparency = 0.3,
                        BorderSizePixel = 0,
                        Size = UDim2.fromScale(1, 1),
                    },
    
                    New "TextLabel" {
                        Font = Enum.Font.GothamBold,
                        Text = props.Name,
                        TextColor3 = Color3.fromHex("#FFFFFF"),
                        TextSize = 12,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        BackgroundTransparency = 1,
                        Position = UDim2.fromOffset(16, 0),
                        Size = UDim2.fromScale(0.75, 1),
                        TextWrapped = true,
                        ZIndex = 2,
                    },

                    New "TextLabel" {
                        Font = Enum.Font.Gotham,
                        Text = props.Count,
                        TextColor3 = Color3.fromHex("#FFFFFF"),
                        TextTransparency = 0.5,
                        TextSize = 12,
                        TextXAlignment = Enum.TextXAlignment.Right,
                        BackgroundTransparency = 1,
                        AnchorPoint = Vector2.new(1, 0),
                        Position = UDim2.new(1, -16, 0, 0),
                        Size = UDim2.fromScale(0, 1),
                        ZIndex = 2,
                    },
                },

                [OnEvent "InputEnded"] = function(input)
                    if table.find({ Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch }, input.UserInputType) then
                        props.Collapsed:set(not props.Collapsed:get())
                    end
                end,
            },
        }
    }
end