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

  <PropertyGroup>
    <!-- When this is enabled, the project will be switched from nuget packages to consuming the ElectronNet orchestration directly -->
    <ElectronNetDevMode>true</ElectronNetDevMode>
  </PropertyGroup>

  <Import Project="..\ElectronNET\build\ElectronNET.props" Condition="$(ElectronNetDevMode)" />

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
  </PropertyGroup>
  <PropertyGroup>
    <IsPackable>false</IsPackable>
    <ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
    <PublishTrimmed>false</PublishTrimmed>
    <NuGetAudit>false</NuGetAudit>
  </PropertyGroup>
  <PropertyGroup Label="ElectronNetCommon">
    <PackageIcon>128.png</PackageIcon>
    <ApplicationIcon>wwwroot\assets\app-icon\win\app.ico</ApplicationIcon>
    <NoWin32Manifest>true</NoWin32Manifest>
    <ElectronIcon>wwwroot\assets\app-icon\win\app.ico</ElectronIcon>
    <Title>ElectronNET API Demo1</Title>
    <Version>1.0.2</Version>
    <Product>com.electronnet-apisamples.app</Product>
    <Description>Electron.NET Demo Application</Description>
    <Company>Electron.Net</Company>
    <Copyright>Copyright © 2025, Electron.NET</Copyright>
    <PackageTags>Electron;.NET;ASP;NET;Sample;App</PackageTags>
    <ElectronVersion>30.4.0</ElectronVersion>
    <ElectronSplashScreen>wwwroot\assets\img\about@2x.png</ElectronSplashScreen>
    <License>MIT</License>
    <ElectronSingleInstance>false</ElectronSingleInstance>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <ElectronBuilderVersion>26.0</ElectronBuilderVersion>
  </PropertyGroup>
  <PropertyGroup>
    <TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
    <TypeScriptUseNodeJS>true</TypeScriptUseNodeJS>
    <TypeScriptTSConfig>ElectronHostHook/tsconfig.json</TypeScriptTSConfig>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="publish\**" />
    <Content Remove="publish\**" />
    <EmbeddedResource Remove="publish\**" />
    <None Remove="publish\**" />
    <TypeScriptCompile Remove="**\node_modules\**" />
  </ItemGroup>
  <ItemGroup>
    <Compile Remove="Controllers\ManageWindowsController.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Remove="Views\Windows\HandleErrorCrashes.cshtml" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="wwwroot\assets\" />
  </ItemGroup>
  <ItemGroup>
    <None Update="Assets\electron.ico">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Assets\electron_32x32.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" Condition="$(ElectronNetDevMode)" />
    <ProjectReference Include="..\ElectronNET.AspNet\ElectronNET.AspNet.csproj" Condition="$(ElectronNetDevMode)" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="ElectronNET.Core" Version="0.1.0" Condition="'$(ElectronNetDevMode)' != 'true'" />
    <PackageReference Include="ElectronNET.Core.AspNet" Version="0.1.0" Condition="'$(ElectronNetDevMode)' != 'true'" />
    <PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.9.3" />
  </ItemGroup>

  <Import Project="..\ElectronNET\build\ElectronNET.targets" Condition="$(ElectronNetDevMode)" />

</Project>