@if (Loading)
{
    <div class="text-center py-4">
        <div class="spinner-border spinner-border-sm text-primary" role="status"></div>
        @if (!string.IsNullOrEmpty(LoadingText))
        {
            <p class="text-muted small mt-2 mb-0">@LoadingText</p>
        }
    </div>
}
else if (!string.IsNullOrEmpty(Error))
{
    <div class="alert alert-warning small py-2 mb-0">
        <i class="bi bi-exclamation-triangle me-1"></i>@Error
    </div>
}
else
{
    @ChildContent
}

@code {
    [Parameter] public bool Loading { get; set; }
    [Parameter] public string? Error { get; set; }
    [Parameter] public string? LoadingText { get; set; }
    [Parameter] public RenderFragment? ChildContent { get; set; }
}
