@inherits LayoutComponentBase
@using DevExpress.Blazor

<div class="app-shell">

    <!-- RIBBON -->
    <header class="app-ribbon-host">
        <AppRibbon />
    </header>

    <!-- KALKULATION -->
    <div class="calculation-bar">
        <DxComboBox Data="@Versions"
                    Value="@SelectedVersion"
                    ValueChanged="@((string v) => OnVersionChanged(v))"
                    ValueExpression="() => SelectedVersion"
                    Width="220px"
                    DropDownStyle="DropDownStyle.DropDownList"
                    AllowUserInput="false" />

        <DxComboBox Data="@Scenarios"
                    Value="@SelectedScenario"
                    ValueChanged="@((string v) => OnScenarioChanged(v))"
                    ValueExpression="() => SelectedScenario"
                    Width="260px"
                    DropDownStyle="DropDownStyle.DropDownList"
                    AllowUserInput="false" />

       



    </div>

    <!-- CONTENT -->
    <main class="app-body">
        @Body
    </main>

</div>

@code {

    List<string> Versions = new()
    {
        "Vorkalkulation 2024",
        "Vorkalkulation 2025"
    };

    List<string> Scenarios = new()
    {
        "Vorkalkulation 2024 EUR",
        "Vorkalkulation 2024 USD"
    };

    string SelectedVersion = "Vorkalkulation 2024";
    string SelectedScenario = "Vorkalkulation 2024 EUR";

    void OnVersionChanged(string value)
    {
        SelectedVersion = value;
        Console.WriteLine($"Version changed: {value}");
    }

    void OnScenarioChanged(string value)
    {
        SelectedScenario = value;
        Console.WriteLine($"Scenario changed: {value}");
    }

   
}



