local q=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local Q=q:WaitForChild("\077\111\100\117\108\101\115")local R=((game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")):WaitForChild("\083\116\097\114\116\101\114\080\108\097\121\101\114\083\099\114\105\112\116\115")).clientSrc local j=require(R.Components.common.TextLabel)local E=require(Q.Roact)local x=E.createElement local F=require(R.Components.common.Frame)local J=E.PureComponent:extend("\078\097\109\101\086\097\108\117\101\084\097\098\108\101\082\111\119")function J.render(q)local Q=q.props local R=Q.item local E=Q.noValueField or false local J=Q.nameField or"\107\101\121"local S=Q.valueField or"\118\097\108\117\101"local k=R[J]or""local i=R[S]or""local g=R[S]or 1 local X={}X.Name=x(j,{LayoutOrder=1,Size=UDim2.new(E and 1 or.7,0,0,30);Text=k;TextSize=20;BackgroundTransparency=1,TextColor3=Q.TextColor3;TextYAlignment=Enum.TextYAlignment.Center})if not E then X.Value=x(j,{LayoutOrder=1,Size=UDim2.new(.3,0,0,30),Text=i;TextSize=20;BackgroundTransparency=1,TextColor3=Q.TextColor3,TextYAlignment=Enum.TextYAlignment.Center})end return x(F,{LayoutOrder=-g},X)end return J
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
-- local logger = require(Modules.src.utils.Logger)
local clientSrc = game:GetService('StarterPlayer'):WaitForChild('StarterPlayerScripts').clientSrc
local TextLabel = require(clientSrc.Components.common.TextLabel)
local Roact = require(Modules.Roact)
local createElement = Roact.createElement
local Frame = require(clientSrc.Components.common.Frame)

--- Table row component
local NameValueTableRow = Roact.PureComponent:extend'NameValueTableRow'

function NameValueTableRow:render()
	local props = self.props
	local item = props.item
	local noValueField = props.noValueField or false
	local nameField = props.nameField or 'key'
	local valueField = props.valueField or 'value'

	local nameText = item[nameField] or ''
	local valueText = item[valueField] or ''

	local order = item[valueField] or 1

	local children = {}

	children.Name = createElement(TextLabel, {
		LayoutOrder = 1,
		Size = UDim2.new(noValueField and 1 or 0.7, 0, 0, 30),
		Text = nameText,
		TextSize = 20,
		BackgroundTransparency = 1,
		TextColor3 = props.TextColor3,
		TextYAlignment = Enum.TextYAlignment.Center,
	})

	if not noValueField then
		children.Value = createElement(TextLabel, {
			LayoutOrder = 1,
			Size = UDim2.new(0.3, 0, 0, 30),
			Text = valueText,
			TextSize = 20,
			BackgroundTransparency = 1,
			TextColor3 = props.TextColor3,
			TextYAlignment = Enum.TextYAlignment.Center,
		})
	end
	return createElement(Frame, { LayoutOrder = -order }, children)
end

return NameValueTableRow