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

  <PropertyGroup>
    <!-- Android SDK and JDK paths -->
    <AndroidSdkDirectory Condition="Exists('$(LOCALAPPDATA)\Android\Sdk')">$(LOCALAPPDATA)\Android\Sdk</AndroidSdkDirectory>
    <JavaSdkDirectory Condition="Exists('C:\Program Files\Microsoft\jdk-21.0.10.7-hotspot')">C:\Program Files\Microsoft\jdk-21.0.10.7-hotspot</JavaSdkDirectory>
  </PropertyGroup>

  <PropertyGroup>
    <TargetFrameworks>net10.0-android</TargetFrameworks>
    <RuntimeIdentifiers>android-arm64;android-x64</RuntimeIdentifiers>
    <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
    <!-- Uncomment to add iOS/desktop support later:
    <TargetFrameworks>$(TargetFrameworks);net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
    -->
    <OutputType>Exe</OutputType>
    <RootNamespace>Scry</RootNamespace>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <!-- Hot Reload for Debug builds -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <MauiEnableXamlHotReload>true</MauiEnableXamlHotReload>
    <EnableHotReload>true</EnableHotReload>
    <UseInterpreter>true</UseInterpreter>
  </PropertyGroup>

  <PropertyGroup>
    <!-- Display name -->
    <ApplicationTitle>Scry</ApplicationTitle>

    <!-- App Identifier -->
    <ApplicationId>land.charm.scry</ApplicationId>

    <!-- Versions -->
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>

    <SupportedOSPlatformVersion
            Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"
        >21.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion
            Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'"
        >15.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion
            Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'"
        >15.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion
            Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'"
        >10.0.17763.0</SupportedOSPlatformVersion>
  </PropertyGroup>

  <ItemGroup>
    <!-- App Icon -->
    <MauiIcon
            Include="Resources\AppIcon\appicon.svg"
            ForegroundFile="Resources\AppIcon\appiconfg.svg"
            Color="#512BD4"
        />

    <!-- Splash Screen -->
    <MauiSplashScreen
            Include="Resources\Splash\splash.svg"
            Color="#512BD4"
            BaseSize="128,128"
        />

    <!-- Images -->
    <MauiImage Include="Resources\Images\*" />

    <!-- Custom Fonts -->
    <MauiFont Include="Resources\Fonts\*" />

    <!-- Raw Assets -->
    <MauiAsset
            Include="Resources\Raw\**"
            LogicalName="%(RecursiveDir)%(Filename)%(Extension)"
        />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="CommunityToolkit.Maui" />
    <PackageReference Include="CommunityToolkit.Maui.Camera" />
    <PackageReference Include="CommunityToolkit.Mvvm" />
    <PackageReference Include="Microsoft.Maui.Controls" />
    <PackageReference Include="Microsoft.Maui.Controls.Compatibility" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Scry.Core\Scry.Core.csproj" />
  </ItemGroup>

</Project>
