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

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0-windows</TargetFramework>
    <UseWPF>true</UseWPF>
    <!--
      WinForms in addition to WPF for the system-tray NotifyIcon â€” there's no
      WPF equivalent. The two frameworks coexist cleanly in .NET 8; UseWindowsForms
      adds System.Windows.Forms.dll without changing the application model.
    -->
    <UseWindowsForms>true</UseWindowsForms>
    <RootNamespace>DragonISO.App</RootNamespace>
    <AssemblyName>DragonISO</AssemblyName>
    <EnableWindowsTargeting>true</EnableWindowsTargeting>
    <ApplicationIcon>Assets\Dragon-ISO.ico</ApplicationIcon>
    <!--
      Required by ParticipantViewModel.ScaleNearestNeighborBgra, which writes
      directly into a WriteableBitmap's pinned BackBuffer (IntPtr) for 10Ã—
      better thumbnail update perf than going through Span<byte>.
    -->
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Dragon-ISO.Engine\Dragon-ISO.Engine.csproj" />
    <ProjectReference Include="..\Dragon-ISO.Engine.NdiInterop\Dragon-ISO.Engine.NdiInterop.csproj" />
    <!--
      System.Management gives us Win32_Process via ManagementObjectSearcher,
      used in App.xaml.cs's ShouldDeElevate() to look up the parent process
      name (we re-spawn ourselves via runas /trustlevel:0x20000 when the
      parent is explorer.exe AND we're elevated â€” that combo triggers an
      NDI mDNS-isolation bug that returns zero discovered sources).
    -->
    <PackageReference Include="System.Management" Version="8.0.0" />
  </ItemGroup>

  <!--
    Grant the test assembly access to internal types â€” specifically the
    OperatorPresetStore.PathOverride hook used to redirect file IO away from
    %LOCALAPPDATA% during tests. We use AssemblyAttribute rather than
    AssemblyInfo.cs so it co-locates with the project's other config.
  -->
  <ItemGroup>
    <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
      <_Parameter1>Dragon-ISO.App.Tests</_Parameter1>
    </AssemblyAttribute>
  </ItemGroup>

  <!--
    Strings.resx â€” user-facing English MessageBox copy. Embedded as a
    .NET resource so ResourceManager can resolve Dragon-ISO.App.Properties.Strings
    by basename. Strings.Designer.cs is hand-written (see file comment).
  -->
  <ItemGroup>
    <EmbeddedResource Update="Properties\Strings.resx">
      <LogicalName>Dragon-ISO.App.Properties.Strings.resources</LogicalName>
    </EmbeddedResource>
  </ItemGroup>

  <!-- Wild Dragon brand assets â€” embedded as resources so the published binary is self-contained. -->
  <ItemGroup>
    <!-- Source navy-blue dragon-mark, kept for AboutWindow / installer iconography. -->
    <Resource Include="Assets\dragon-mark.png" />
    <!--
      Theme-aware silhouette variants used by Theme.Dark / Theme.Light to expose
      a single Wd.BrandMark.Image resource key. The dark theme picks the white
      dragon (visible on #0A0A0A), the light theme picks the black dragon
      (visible on #FAFAFB). Generated from dragon-mark.png via
      Assets/_recolor_dragon.py â€” re-run if the source mark ever changes.
    -->
    <Resource Include="Assets\dragon-mark-white.png" />
    <Resource Include="Assets\dragon-mark-black.png" />
    <Resource Include="Assets\wild-dragon-wordmark.png" />
    <Resource Include="Assets\Dragon-ISO.ico" />
    <!--
      Inter Variable from rsms/inter v3.19 (OFL). Single .ttf covers every weight
      from 100 (Thin) to 900 (Black) so we don't ship a directory of duplicates.
    -->
    <Resource Include="Assets\Fonts\Inter.ttf" />
    <!--
      JetBrains Mono Variable v2.304 (OFL). Used for machine names, source IDs,
      and stat counters where a fixed-width font reads better than Inter.
    -->
    <Resource Include="Assets\Fonts\JetBrainsMono.ttf" />
  </ItemGroup>

</Project>
