local i=script.Parent.Parent.Packages local c=script.Parent local P=require(i.Fusion)local m=require(c.Icon)local f=P.New local C=P.State local v=P.Children return function(i)local c=C({})local P=(f("\070\114\097\109\101"))({BackgroundTransparency=.99;Size=UDim2.fromOffset(300,200);Parent=i;[v]={(f("\085\073\076\105\115\116\076\097\121\111\117\116"))({FillDirection=Enum.FillDirection.Vertical});m({Text="\100\117\109\109\121-\100\101\109\111-\105\099\111\110 \123\049\125";Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\055\051\051\054\053\053\056\051\052",LayoutOrder=1;OnInvoke=function()print(1)end});m({Text="\100\117\109\109\121-\100\101\109\111-\105\099\111\110 \123\050\125",Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\055\051\051\054\053\053\056\051\052";LayoutOrder=2,OnInvoke=function()print(2)end});m({Text="\100\117\109\109\121-\100\101\109\111-\105\099\111\110 \123\051\125",Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\055\051\051\054\053\053\056\051\052";LayoutOrder=3,OnInvoke=function()print(3)end})}})return function()P:Destroy()end end
local Packages = script.Parent.Parent.Packages
local Components = script.Parent

local Fusion = require(Packages.Fusion)
local Component = require(Components.Icon)

local New = Fusion.New
local State = Fusion.State
local Children = Fusion.Children

return function(target)
    local list = State({})

    local component = New "Frame" {
        BackgroundTransparency = 0.99,
        Size = UDim2.fromOffset(300, 200),
        Parent = target,

        [Children] = {
            New "UIListLayout" {
                FillDirection = Enum.FillDirection.Vertical,
            },

            Component {
                Text = "dummy-demo-icon {" .. 1 .. "}",
                Image = "rbxassetid://7733655834",
                LayoutOrder = 1,
                OnInvoke = function()
                    print(1)
                end,
            },

            Component {
                Text = "dummy-demo-icon {" .. 2 .. "}",
                Image = "rbxassetid://7733655834",
                LayoutOrder = 2,
                OnInvoke = function()
                    print(2)
                end,
            },

            Component {
                Text = "dummy-demo-icon {" .. 3 .. "}",
                Image = "rbxassetid://7733655834",
                LayoutOrder = 3,
                OnInvoke = function()
                    print(3)
                end,
            },
        },
    }
--[[
    for i = 1, 3 do
        local newList = list:get()
        table.insert(newList, Component {
            Text = "dummy-demo-icon {" .. i .. "}",
            Image = "rbxassetid://7733655834",
            LayoutOrder = i,
            OnInvoke = function()
                print(i)
            end,
        })
        list:set(newList)
    end--]]

    return function()
        component:Destroy()
    end
end