@namespace DeepDrftPublic.Client.Controls
<div class="icon-container">
    @if (!RendererInfo.IsInteractive)
    {
        @* Interactive runtime (WASM, or Server on first visit) not attached yet — the prerendered
           button has no wired click handler, so clicks would vanish. Show a spinner in its place
           until the component hydrates, at which point it re-renders into the live button. *@
        <MudProgressCircular Color="Color"
                             Size="Size"
                             Indeterminate="true"
                             Class="mud-icon-button" />
    }
    else
    {
        
        <MudIconButton Icon="@Icon"
                       Color="Color"
                       Size="Size"
                       Disabled="@Disabled"
                       OnClick="@OnToggle"/>
    }
</div>
