@inherits LayoutComponentBase
@using MudBlazor
@using VisionBuilder.UI.Common.ViewModel
@using VisionBuilder.UI.Common.Services
@using VisionBuilder.UI.Common
@inject MainWindowVM MainWindowVm
@inject IPasswordInputService PasswordInputService
@implements IDisposable

<MudThemeProvider Theme="@_currentTheme" />
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />

<div class="app-root @(_testMode ? "test-mode" : "")">
    <div class="app-content">
        @Body
    </div>
    <div class="app-divider"></div>
    <div class="app-toolbar">
        <div class="toolbar-buttons">
            @if (_showTestModeButton)
            {
                <MudButton Variant="Variant.Outlined" Color="Color.Primary" Class="toolbar-btn" OnClick="ToggleTestMode">Test Mode</MudButton>
            }
            <MudButton Variant="Variant.Outlined" Color="Color.Primary" Class="toolbar-btn" OnClick="OnSettings">Settings</MudButton>
        </div>
        <span class="toolbar-version">@_version</span>
    </div>
</div>
