local L=require(script.Parent.Parent.Runtime)local w=require(script.Parent.Parent.automaticSize)return L.widget(function(s,F)if type(s)=="\102\117\110\099\116\105\111\110"and F==nil then F=s s={}end if s.padding then if type(s.padding)=="\110\117\109\098\101\114"then s.padding=UDim.new(0,s.padding)end else s.padding=UDim.new(0,10)end local m=L.useInstance(function(L)local F=Instance.new("\070\114\097\109\101")F.BackgroundTransparency=1 local m=Instance.new("\085\073\076\105\115\116\076\097\121\111\117\116")m.SortOrder=Enum.SortOrder.LayoutOrder m.FillDirection=Enum.FillDirection.Horizontal m.Padding=s.padding m.Parent=F L.frame=F w(F)return F end)local H=m.frame H.UIListLayout.HorizontalAlignment=s.alignment or Enum.HorizontalAlignment.Left L.scope(F)end)


local Runtime = require(script.Parent.Parent.Runtime)
local automaticSize = require(script.Parent.Parent.automaticSize)

return Runtime.widget(function(options, fn)
	if type(options) == "function" and fn == nil then
		fn = options
		options = {}
	end

	if options.padding then
		if type(options.padding) == "number" then
			options.padding = UDim.new(0, options.padding)
		end
	else
		options.padding = UDim.new(0, 10)
	end

	local refs = Runtime.useInstance(function(ref)
		local Frame = Instance.new("Frame")
		Frame.BackgroundTransparency = 1

		local UIListLayout = Instance.new("UIListLayout")
		UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
		UIListLayout.FillDirection = Enum.FillDirection.Horizontal
		UIListLayout.Padding = options.padding
		UIListLayout.Parent = Frame

		ref.frame = Frame

		automaticSize(Frame)

		return Frame
	end)

	local frame = refs.frame

	frame.UIListLayout.HorizontalAlignment = options.alignment or Enum.HorizontalAlignment.Left

	Runtime.scope(fn)
end)
