local s=require(script.Parent.Parent.formatTable)local Q=require(script.Parent.Parent.getAllComponentData)local a=s.formatTable local i=s.FormatMode return function(s)return s.widget(function(s,q,U)local z=Q(s,q)local u="\060\098\062\069\110\116\105\116\121 "..(q.."\060\047\098\062\n\n")for s,Q in pairs(z)do u..=tostring(s).." "if next(Q)==nil then u..="\123 \125\n"else u..=a(Q,i.Long,0,2).."\n"end end U.tooltip(u,{tag="\077\097\116\116\101\114\068\101\098\117\103\103\101\114\084\111\111\108\116\105\112\095\065\108\116\072\111\118\101\114",backgroundTransparency=.15})end)end
local formatTableModule = require(script.Parent.Parent.formatTable)
local getAllComponentData = require(script.Parent.Parent.getAllComponentData)
local formatTable = formatTableModule.formatTable
local FormatMode = formatTableModule.FormatMode

return function(plasma)
	return plasma.widget(function(world, id, custom)
		local entityData = getAllComponentData(world, id)

		local str = "<b>Entity " .. id .. "</b>\n\n"

		for component, componentData in pairs(entityData) do
			str ..= tostring(component) .. " "

			if next(componentData) == nil then
				str ..= "{ }\n"
			else
				str ..= (formatTable(componentData, FormatMode.Long, 0, 2) .. "\n")
			end
		end

		custom.tooltip(str, {
			tag = "MatterDebuggerTooltip_AltHover",
			backgroundTransparency = 0.15,
		})
	end)
end
