<Project Sdk="Microsoft.NET.Sdk.Razor">

    <PropertyGroup>
        <TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>

        <OutputType>Exe</OutputType>
        <RootNamespace>SilverOS.Welcome.App</RootNamespace>
        <UseMaui>true</UseMaui>
        <SingleProject>true</SingleProject>
        <ImplicitUsings>enable</ImplicitUsings>
        <EnableDefaultCssItems>false</EnableDefaultCssItems>
        <Nullable>enable</Nullable>

        <!-- Display name -->
        <ApplicationTitle>SilverOS Welcome</ApplicationTitle>

        <!-- App Identifier -->
        <ApplicationId>uk.silverlabs.silveros.welcome</ApplicationId>

        <!-- Versions -->
        <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
        <ApplicationVersion>1</ApplicationVersion>

        <!-- Unpackaged (no MSIX) -->
        <WindowsPackageType>None</WindowsPackageType>

        <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>

        <!--
          Cold-start: precompile to ReadyToRun so the self-contained image does not
          JIT the whole app on first launch (this wizard runs exactly once, on the
          slowest possible "fresh OS, cold disk" path, so first-run JIT is pure cost).
          R2R only — trimming/NativeAOT are NOT safe for MAUI Blazor Hybrid (heavy
          reflection in Blazor + DI). Larger binaries are fine: the payload is baked
          into the image, never downloaded. Only takes effect on `dotnet publish -r win-x64`.
        -->
        <PublishReadyToRun Condition="'$(RuntimeIdentifier)' != ''">true</PublishReadyToRun>
    </PropertyGroup>

    <ItemGroup>
        <!-- App Icon -->
        <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

        <!-- Splash Screen -->
        <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

        <!-- Images -->
        <MauiImage Include="Resources\Images\*" />
        <MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

        <!-- Custom Fonts -->
        <MauiFont Include="Resources\Fonts\*" />

        <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
        <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.9" />
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\SilverOS.Welcome.Core\SilverOS.Welcome.Core.csproj" />
      <ProjectReference Include="..\SilverOS.Welcome.UI\SilverOS.Welcome.UI.csproj" />
    </ItemGroup>

</Project>
