<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
  <PropertyGroup>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>disable</ImplicitUsings>
    <RootNamespace>LittleSim.Web</RootNamespace>
    <AssemblyName>LittleSim.Web</AssemblyName>
    <DefineConstants>$(DefineConstants);BLAZORGL</DefineConstants>
    <KniPlatform>BlazorGL</KniPlatform>
  </PropertyGroup>

  <PropertyGroup>
    <BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Pages\Index.razor.cs" />
    <Compile Include="Program.cs" />
    <Compile Include="LittleSimWebGame.cs" />
    <Compile Include="NetContract.cs" />
    <Compile Include="WorldViewScene.cs" />
  </ItemGroup>

  <ItemGroup>
    <!--
      Веб-клиент собирается против KNI (форк MonoGame с платформой Blazor/WebGL), поэтому
      ссылается только на платформо-независимые библиотеки движка: Core и Net.
      Графические библиотеки движка (DesktopGL) сюда подключать нельзя — у KNI свои
      сборки с теми же неймспейсами.
    -->
    <ProjectReference Include="..\..\engine\src\MrGameEng.Core\MrGameEng.Core.csproj" />
    <ProjectReference Include="..\..\engine\src\MrGameEng.Net\MrGameEng.Net.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="nkast.Xna.Framework" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Content" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Graphics" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Audio" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Media" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Input" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Game" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Devices" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.Storage" Version="4.2.9001" />
    <PackageReference Include="nkast.Xna.Framework.XR" Version="4.2.9001" />
    <PackageReference Include="nkast.Kni.Platform.Blazor.GL" Version="4.2.9001.2" />
    <PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Builder" Version="4.2.9001" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.17" />
    <PackageReference
      Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer"
      Version="8.0.17"
      PrivateAssets="all"
    />
  </ItemGroup>

  <ItemGroup>
    <KniContentReference Include="Content\LittleSimWebContent.mgcb" />
  </ItemGroup>
</Project>
