@inject RolemasterDb.App.Frontend.AppState.ShellOmniboxState ShellOmniboxState

<div class="shell-omnibox">
    <AppBarActionButton
        CssClass="@(ShellOmniboxState.IsOpen ? "shell-omnibox-trigger is-open" : "shell-omnibox-trigger")"
        Title="Search tables or commands"
        AriaLabel="Search tables or commands"
        OnClick="ToggleOpenAsync">
        <span class="shell-omnibox-trigger-label">Search tables or commands</span>
    </AppBarActionButton>
</div>

@code {
    private Task ToggleOpenAsync(MouseEventArgs _)
    {
        ShellOmniboxState.Toggle();
        return Task.CompletedTask;
    }
}
