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

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0-windows</TargetFramework>
    <UseWPF>true</UseWPF>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <!-- Allow Linux Gitea runners to publish this WPF project for win-x64; no-op on Windows. -->
    <EnableWindowsTargeting>true</EnableWindowsTargeting>
    <ApplicationIcon>ClaudeTaskSetup.ico</ApplicationIcon>
  </PropertyGroup>

  <ItemGroup>
    <!-- Embed icon so it is available via pack URI in WPF windows. -->
    <Resource Include="ClaudeTaskSetup.ico" />
  </ItemGroup>

  <!-- Debug: asInvoker so Rider/VS can debug without elevation -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <ApplicationManifest>app.debug.manifest</ApplicationManifest>
  </PropertyGroup>

  <!-- Release: requireAdministrator for service registration + shortcuts -->
  <PropertyGroup Condition="'$(Configuration)' != 'Debug'">
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>

  <PropertyGroup Condition="'$(PublishSingleFile)' == 'true'">
    <!-- Framework-dependent: the WPF runtime pack isn't distributed for cross-compile
         on Linux CI, which made self-contained bundles crash on startup with AV in the
         apphost. Target machines already have the .NET 8 Desktop Runtime. -->
    <SelfContained>false</SelfContained>
    <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier>
    <PublishTrimmed>false</PublishTrimmed>
    <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
    <IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
    <EnableCompressionInSingleFile>false</EnableCompressionInSingleFile>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.1" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\ClaudeDo.Data\ClaudeDo.Data.csproj" />
  </ItemGroup>

</Project>
