<MudTooltip Text="@Tooltip" Delay="500">
    <button type="button" class="@Class" @onclick="Click">
        <span class="mdi @Icon"></span>
    </button>
</MudTooltip>

@code {
    [Parameter]
    public string Icon { get; set; } = "mdi-alpha";

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

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

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

    [Parameter]
    public EventCallback OnClick { get; set; }

    public string Class => $"{(Large ? "large" : "")} {(Disabled ? "disabled" : "")}";

    private async Task Click()
    {
        if (Disabled) return;

        await OnClick.InvokeAsync();
    }
}
