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

	<PropertyGroup>
		<TargetFrameworks>net10.0-android</TargetFrameworks>
		<OutputType>Exe</OutputType>
		<RootNamespace>BookReader</RootNamespace>
		<UseMaui>true</UseMaui>
		<SingleProject>true</SingleProject>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<ApplicationTitle>BookReader</ApplicationTitle>
		<ApplicationId>com.bookreader.app</ApplicationId>
		<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
		<ApplicationVersion>1</ApplicationVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>

		<!-- Разрешить понижение версий пакетов если нужно -->
		<NoWarn>$(NoWarn);NU1605</NoWarn>
	</PropertyGroup>

	<ItemGroup>
		<!-- Явно указываем версию MAUI Controls чтобы удовлетворить зависимость CommunityToolkit -->
		<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.40" />
		<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="10.0.40" />
		
		<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
		<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.11" />
		<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
		<PackageReference Include="CommunityToolkit.Maui" Version="14.0.0" />
		<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.3" />
		<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
		<PackageReference Include="VersOne.Epub" Version="3.3.5" />
		<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.3" />
	</ItemGroup>

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

	<ItemGroup>
	  <AndroidResource Remove="Platforms\Android\Resources\xml\network_security_config.xml" />
	</ItemGroup>

	<ItemGroup>
	  <MauiXaml Update="Resources\Styles\AppStyles.xaml">
	    <Generator>MSBuild:Compile</Generator>
	  </MauiXaml>
	</ItemGroup>
	<ItemGroup>
		<!-- App Icon -->
		<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#3E2723" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#3E2723" BaseSize="128,128" />
	</ItemGroup>
</Project>
