@using RBLFeederCommon.Enums

<Button Size="ButtonSize.Small" Type="ButtonType.Button"  @onclick="OnClicked" Color="ButtonColor.Primary" Outline="@outline" Position="Position.Relative">
        @Text
        <Badge Color="BadgeColor.Info"
               Position="Position.Absolute"
               Placement="BadgePlacement.TopRight"
               IndicatorType="BadgeIndicatorType.RoundedPill"
               VisuallyHiddenText="Anz. News">@Count</Badge>
    </Button>

@code {

    [Parameter]
    public RssFeedSources Source { get; set; }

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

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

    [Parameter]
    public int Count { get; set; }

    [Parameter]
    public EventCallback<RssFeedSources> OnClickedCallback { get; set; }

    bool outline = true;

    Task OnClicked()
    {
        outline = !outline;

        OnClickedCallback.InvokeAsync(Source);

        return Task.CompletedTask;
    }

}
