<button
    type="@Type"
    class="@BuildCssClass()"
    title="@Title"
    aria-label="@AriaLabel"
    disabled="@Disabled"
    @onclick="OnClick">
    @ChildContent
</button>

@code {
    [Parameter]
    public RenderFragment? ChildContent { get; set; }

    [Parameter]
    public EventCallback<MouseEventArgs> OnClick { get; set; }

    [Parameter]
    public string Type { get; set; } = "button";

    [Parameter]
    public string Title { get; set; } = string.Empty;

    [Parameter]
    public string? AriaLabel { get; set; }

    [Parameter]
    public bool Disabled { get; set; }

    [Parameter]
    public string? CssClass { get; set; }

    private string BuildCssClass() =>
        string.IsNullOrWhiteSpace(CssClass)
            ? "app-bar-action-button"
            : $"app-bar-action-button {CssClass}";
}
