<LumexDataGrid Data="@_users"
               Color="@_color"
               SelectionMode="@SelectionMode.Single">
    <PropertyColumn Property="@(p => p.Name)" />
    <PropertyColumn Property="@(p => p.Role)" />
    <PropertyColumn Property="@(p => p.Status)" />
</LumexDataGrid>

<fieldset class="flex gap-4">
    @foreach( var color in _colors )
    {
        var value = color.ToString();

        <div class="flex gap-1">
            <input type="radio"
                   id="@value.ToLower()"
                   name="color"
                   @bind:event="onchange"
                   @bind:get="@color"
                   @bind:set="@OnColorSelect" />
            <label for="@value.ToLower()">@value</label>
        </div>
    }
</fieldset>

@code {
    private readonly IQueryable<User> _users = new List<User>
    {
        new( "Alice Johnson", "Administrator", "Active" ),
        new( "Bob Smith", "Editor", "Inactive" ),
        new( "Charlie Brown", "Viewer", "Pending" ),
        new( "Diana Lee", "Moderator", "Active" )
    }.AsQueryable();

    private readonly ThemeColor[] _colors = [
        ThemeColor.Default,
        ThemeColor.Primary,
        ThemeColor.Secondary,
        ThemeColor.Success,
        ThemeColor.Warning,
        ThemeColor.Danger,
        ThemeColor.Info
    ];

    private ThemeColor _color = ThemeColor.Default;

    private void OnColorSelect( ThemeColor value )
    {
        _color = value;
    }

    private record User( string Name, string Role, string Status );
}