local M=script.Parent.Parent local B=M.Modules local f=require(B.Packages)local e=require(f.Directory.Roact)local D=e.Component:extend("\080\097\099\107\101\116\070\114\097\109\101")function D.render(M)local B=M.props return e.createElement("\073\109\097\103\101\076\097\098\101\108",{Size=B.PacketsChanged:map(function(f)local D=f[B.Index]if not D then return e.Constant.SkipBindingUpdate end local A=math.min(D.TotalSize/M.props.MaxFrameSize,1)local n=UDim2.fromScale(1/B.MaxFrames,A)if n==M.PreviousFrameSize then return e.Constant.SkipBindingUpdate end M.PreviousFrameSize=n return n end);Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\048\051\055\048\057\057\056\051\049\048";AnchorPoint=Vector2.new(0,1);Position=UDim2.fromScale(1-B.Index/B.MaxFrames,1),BorderSizePixel=0,Visible=B.PacketsChanged:map(function(f)local D=f[B.Index]~=nil if D==M.PreviousIsVisible then return e.Constant.SkipBindingUpdate end M.PreviousIsVisible=D return D end);BorderColor3=Color3.new(1,1,1)})end return D
local PacketProfiler = script.Parent.Parent
local Modules = PacketProfiler.Modules
local Packages = require(Modules.Packages)

local Roact = require(Packages.Directory.Roact)

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

function PacketFrame:render()
	local props = self.props
	return Roact.createElement("ImageLabel", {
		Size = props.PacketsChanged:map(function(Packets)
			local FrameData = Packets[props.Index]
			if not FrameData then
				return Roact.Constant.SkipBindingUpdate
			end

			local FrameScale = math.min(FrameData.TotalSize / self.props.MaxFrameSize, 1)
			local FrameSize = UDim2.fromScale(1 / props.MaxFrames, FrameScale)
			if FrameSize == self.PreviousFrameSize then
				return Roact.Constant.SkipBindingUpdate
			end

			self.PreviousFrameSize = FrameSize
			return FrameSize
		end),
		Image = "rbxassetid://10370998310",
		AnchorPoint = Vector2.new(0, 1),
		Position = UDim2.fromScale(1 - (props.Index / props.MaxFrames), 1),
		BorderSizePixel = 0,
		Visible = props.PacketsChanged:map(function(Packets)
			local IsVisible = Packets[props.Index] ~= nil
			if IsVisible == self.PreviousIsVisible then
				return Roact.Constant.SkipBindingUpdate
			end

			self.PreviousIsVisible = IsVisible
			return IsVisible
		end),
		BorderColor3 = Color3.new(1, 1, 1),
	})
end

return PacketFrame