@namespace BootstrapBlazor.Components
@inherits BootstrapComponentBase

<div class="swal2-header">
    @if (Category == SwalCategory.Success)
    {
        <div class="@IconClassString">
            <div class="swal2-success-circular-line-left"></div>
            <span class="swal2-success-line-tip"></span><span class="swal2-success-line-long"></span>
            <div class="swal2-success-ring"></div><div class="swal2-success-fix"></div>
            <div class="swal2-success-circular-line-right"></div>
        </div>
    }
    else if (Category == SwalCategory.Error)
    {
        <div class="@IconClassString">
            <span class="swal2-x-mark">
                <span class="swal2-x-mark-line-left"></span>
                <span class="swal2-x-mark-line-right"></span>
            </span>
        </div>
    }
    else if (Category == SwalCategory.Warning)
    {
        <div class="@IconClassString">
            <div class="swal2-icon-content">!</div>
        </div>
    }
    else if (Category == SwalCategory.Question)
    {
        <div class="@IconClassString">
            <div class="swal2-icon-content">?</div>
        </div>
    }
    else if (Category == SwalCategory.Information)
    {
        <div class="@IconClassString">
            <div class="swal2-icon-content">i</div>
        </div>
    }
    @if (!string.IsNullOrEmpty(Title))
    {
        <h2 class="swal2-title">@Title</h2>
    }
</div>

@if (BodyTemplate != null)
{
    @BodyTemplate
}
else
{
    <div class="swal2-content d-flex">
        @Content
    </div>
}

<div class="swal2-actions">
    @if (ShowClose)
    {
        <Button Color="Color.Secondary" Icon="@CloseButtonIcon" Text="@InternalCloseButtonText" OnClickWithoutRender="OnClickClose" />
    }
    @if (IsConfirm)
    {
        <Button Color="Color.Danger" Icon="@ConfirmButtonIcon" Text="@ConfirmButtonText" OnClickWithoutRender="OnClickConfirm" class="ms-3" />
    }
    @ButtonTemplate
</div>

@if (ShowFooter)
{
    <div class="swal2-footer d-flex">
        @FooterTemplate
    </div>
}
