pub fn UserList(arena: zx.Allocator) zx.Component {
    const users = [_]struct { name: []const u8, role: UserRole }{
        .{ .name = "John", .role = .admin },
        .{ .name = "Jane", .role = .member },
        .{ .name = "Jim", .role = .guest },
    };
    return (
        <main @allocator={arena}>
            {for (users) |user| (
                <div>
                    <p>{user.name}</p>
                    {switch (user.role) {
                        .admin => (<span>Admin</span>),
                        .member => (<span>Member</span>),
                        .guest => (<span>Guest</span>),
                    }}
                </div>
            )}
        </main>
    );
}

const zx = @import("zx");

const UserRole = enum { admin, member, guest };
