pub fn RoleSwitch(allocator: zx.Allocator) zx.Component {
    const user_swtc = users[0];

    return (
        <main @allocator={allocator}>
            <section>
                {switch (user_swtc.user_type) {
                    .admin => ("Admin"),
                    .member => ("Member"),
                }}
            </section>
            <section>
                {switch (user_swtc.user_type) {
                    .admin => (<p>Powerful</p>),
                    .member => (<p>Powerless</p>),
                }}
            </section>
        </main>
    );
}

const zx = @import("zx");

const UserType = enum { admin, member };

const User = struct { name: []const u8, age: u32, user_type: UserType };

const users = [_]User{
    .{ .name = "John", .age = 20, .user_type = .admin },
    .{ .name = "Jane", .age = 21, .user_type = .member },
};
