<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
    <Nullable>enable</Nullable>
    <WasmBuildNative>True</WasmBuildNative>
  </PropertyGroup>

  <ItemGroup>
    <BlazorLinkerDescriptor Include="LinkerConfig.xml" />
  </ItemGroup>

  <!-- In debug, make builds faster by reducing optimizations -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <WasmNativeStrip>false</WasmNativeStrip>
    <EmccCompileOptimizationFlag>-O1</EmccCompileOptimizationFlag>
    <RunAOTCompilation>false</RunAOTCompilation>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <Optimize>true</Optimize>
    <WasmNativeStrip>true</WasmNativeStrip>
    <EmccCompileOptimizationFlag>-O3</EmccCompileOptimizationFlag>
    <EmccLinkOptimizationFlag>-O3</EmccLinkOptimizationFlag>
    <RunAOTCompilation>false</RunAOTCompilation>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0"/>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all"/>
  </ItemGroup>

  <Import Project="..\..\src\Web\Avalonia.Web.Blazor\Avalonia.Web.Blazor.targets" />
  <Import Project="..\..\src\Web\Avalonia.Web.Blazor\Avalonia.Web.Blazor.CompilationTuning.props" />

  <ItemGroup>
    <ProjectReference Include="..\..\src\Web\Avalonia.Web.Blazor\Avalonia.Web.Blazor.csproj"/>
    <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj"/>
  </ItemGroup>

</Project>
