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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <SpaRoot>ClientApp\</SpaRoot>
    <UserSecretsId>3fa67cb5-d27b-45a4-9d50-39219ff7aa70</UserSecretsId>
    <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    <DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
	<ContainerDevelopmentMode>Regular</ContainerDevelopmentMode>
	<EnableSourceControlManagerQueries>true</EnableSourceControlManagerQueries>
  </PropertyGroup>

  <ItemGroup>
		<AdditionalFiles Include="..\Common\stylecop.json">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</AdditionalFiles>
		<AdditionalFiles Include="..\.globalconfig">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</AdditionalFiles>
	</ItemGroup>

  <ItemGroup>
    <Compile Remove="ClientApp\dist\**" />
    <Compile Remove="ClientApp\src\app\modules\pages\board\components\**" />
    <Compile Remove="ClientApp\src\app\shared\components\**" />
    <Compile Remove="ClientApp\src\app\shared\constants\**" />
    <Content Remove="$(SpaRoot)**" />
    <Content Remove="ClientApp\dist\**" />
    <Content Remove="ClientApp\src\app\modules\pages\board\components\**" />
    <Content Remove="ClientApp\src\app\shared\components\**" />
    <Content Remove="ClientApp\src\app\shared\constants\**" />
    <EmbeddedResource Remove="ClientApp\dist\**" />
    <EmbeddedResource Remove="ClientApp\src\app\modules\pages\board\components\**" />
    <EmbeddedResource Remove="ClientApp\src\app\shared\components\**" />
    <EmbeddedResource Remove="ClientApp\src\app\shared\constants\**" />
    <None Remove="$(SpaRoot)**" />
    <None Remove="ClientApp\dist\**" />
    <None Remove="ClientApp\src\app\modules\pages\board\components\**" />
    <None Remove="ClientApp\src\app\shared\components\**" />
    <None Remove="ClientApp\src\app\shared\constants\**" />
    <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.300" />
    <PackageReference Include="AWSSDK.S3" Version="3.7.305.29" />
    <PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
    <PackageReference Include="IdentityModel" Version="6.2.0" />
    <PackageReference Include="Iuliia" Version="2.0.4" />
    <PackageReference Include="IdentityModel.AspNetCore" Version="3.0.0" />
    <PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="5.1.0" />
    <PackageReference Include="IdentityModel.AspNetCore.ScopeValidation" Version="1.1.1" />
    <PackageReference Include="MessagePack" Version="2.5.187" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.16" />
    <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.16" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
	<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.19" />
    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.15" />
    <PackageReference Include="Microsoft.Exchange.WebServices.NETStandard" Version="1.1.1" />
    <PackageReference Include="NuGet.Packaging" Version="6.14.0" />
    <PackageReference Include="RazorEngineCore" Version="2023.11.1" />
    <PackageReference Include="MiaPlaza.ExpressionUtils" Version="1.2.0" />
    <PackageReference Include="Miyconst.Cyriller" Version="0.1.1" />
    <PackageReference Include="prometheus-net" Version="6.0.0" />
    <PackageReference Include="prometheus-net.AspNetCore" Version="6.0.0" />
    <PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.1.2" />
    <PackageReference Include="Serilog.Expressions" Version="5.0.0" />
    <PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
    <PackageReference Include="Serilog.Sinks.AmazonS3" Version="1.2.3" />
    <PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
    <PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="4.2.0" />
    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Serilog" Version="4.3.0" />
    <PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
    <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
    <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="8.1.1" />
    <PackageReference Include="System.Formats.Asn1" Version="8.0.2" />
    <PackageReference Include="System.IO.Packaging" Version="9.0.5" />
    <PackageReference Include="System.Net.Http" Version="4.3.4" />
    <PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
    <PackageReference Include="System.Text.Encodings.Web" Version="9.0.0" />
    <PackageReference Include="System.Text.Json" Version="9.0.0" />
    <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />

    <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.12.0" />
    <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" />
    <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
    <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
    <PackageReference Include="Scrutor" Version="6.1.0" />
  </ItemGroup>

  <ItemGroup>
    <Folder Remove="ClientApp\dist" />
    <Folder Include="wwwroot\css\" />
    <Folder Include="wwwroot\img\" />
    <None Remove="App_Data\key-3822b1fb-84eb-4772-a64f-401ce0307c0b.xml" />
    <None Remove="ClientApp\src\app\modules\components\index.ts" />
    <None Remove="ClientApp\src\app\modules\flights.module.ts" />
    <None Remove="ClientApp\src\app\modules\schedule.module.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\dispatch-mode.enum.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\flight-loaded-state.enum.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\flight-status.enum.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\index.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\language.enum.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\operation-status.enum.ts" />
    <None Remove="ClientApp\src\app\shared\enumerators\time-type.enum.ts" />
    <None Remove="ClientApp\src\app\shared\models\aircraft.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\airport-info-modification.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\airport-info.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\arrival-station.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\arrival-times.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\booking-classes.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\cross-leg-index.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\day-change.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\days-of-week.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\departure-station.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\departure-times.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\equipment.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\flight-id.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\flight-time.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\flight-update-signal.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\flight.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\index.ts" />
    <None Remove="ClientApp\src\app\shared\models\onboard-service.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\operating-by.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\operator.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\passenger-info.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\passengers.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\period-flight-time.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\requests\aircraft-type.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\requests\search-flight-request.ts" />
    <None Remove="ClientApp\src\app\shared\models\schedule-item.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\service-class.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\service-type.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\traffic-restrictions.model.ts" />
    <None Remove="ClientApp\src\app\shared\models\type-flight-time.model.ts" />
    <None Remove="ClientApp\src\app\shared\services\flights-updater.service.ts" />
    <None Remove="ClientApp\src\app\shared\services\http-cancel.service.ts" />
    <None Remove="ClientApp\src\app\shared\services\localization.service.ts" />
    <None Remove="ClientApp\src\app\shared\services\version.service.ts" />
    <Content Include="App_Data\key-3822b1fb-84eb-4772-a64f-401ce0307c0b.xml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="ClientApp\src\app\test\schedule.json" />
    <Folder Include="ClientApp\src\app\modules\pages\schedule\components\" />
    <Folder Include="ClientApp\src\assets\img\" />
    <Folder Include="ClientApp\src\styles\components\shared\" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Aeroflot.Flights.WebApi\Aeroflot.Flights.WebApi.csproj" />
	<ProjectReference Include="..\Aeroflot.Flights.DataSpace\Aeroflot.Flights.DataSpace.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Aeroflot.Common.Core">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Common.Core.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Common2">
      <HintPath>..\Common\Aeroflot.Common2.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Common2.DataSpace">
      <HintPath>..\Common\Aeroflot.Common2.DataSpace.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Common2.Observability.AspNetCore">
      <HintPath>..\Common\Aeroflot.Common2.Observability.AspNetCore.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Platform.ApiWrapper">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.ApiWrapper.dll</HintPath>
    </Reference>
    <!--<Reference Include="Aeroflot.Platform.Common.DataContracts">
      <HintPath>..\Common\Aeroflot.Platform.Common.DataContracts.dll</HintPath>
    </Reference>-->
    <Reference Include="Aeroflot.Platform.Common.DataContracts">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.Common.DataContracts.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Platform.Common.Observability">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.Common.Observability.dll</HintPath>
    </Reference>

    <Reference Include="Aeroflot.Common2.ApiWrapper">
      <HintPath>..\Common\Aeroflot.Common2.ApiWrapper.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Platform.Flights.Entities">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.Flights.Entities.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Platform.Handlers.Interfaces">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.Handlers.Interfaces.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Platform.Readers.Interfaces">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Platform.Readers.Interfaces.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Security.Core">
      <HintPath>..\Aeroflot.Platform.Libraries\Aeroflot.Security.Core.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Security2">
      <HintPath>..\Common\Aeroflot.Security2.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Security2.DataSpace">
      <HintPath>..\Common\Aeroflot.Security2.DataSpace.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Security2.Entities">
      <HintPath>..\Common\Aeroflot.Security2.Entities.dll</HintPath>
    </Reference>
    <Reference Include="Aeroflot.Security2.Entities.DataSpace">
      <HintPath>..\Common\Aeroflot.Security2.Entities.DataSpace.dll</HintPath>
    </Reference>
  </ItemGroup>

  <ItemGroup>
    <TypeScriptCompile Include="ClientApp\src\app\modules\components\index.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\modules\flights.module.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\modules\page-modules\schedule.module.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\dispatch-mode.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\flight-loaded-state.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\flight-status.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\index.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\language.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\operation-status.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\enumerators\time-type.enum.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\aircraft.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\airport-info-modification.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\airport-info.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\arrival-station.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\arrival-times.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\booking-classes.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\cross-leg-index.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\day-change.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\days-of-week.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\departure-station.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\departure-times.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\equipment.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\flight-id.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\flight-time.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\flight-update-signal.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\index.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\onboard-service.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\operating-by.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\operator.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\passenger-info.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\passengers.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\period-flight-time.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\aircraft-type.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\requests\search-flight-request.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\leg.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\flight.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\schedule-item.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\service-class.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\service-type.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\traffic-restrictions.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\models\type-flight-time.model.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\services\flights-updater.service.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\services\http-cancel.service.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\services\localization.service.ts" />
    <TypeScriptCompile Include="ClientApp\src\app\shared\services\version.service.ts" />
  </ItemGroup>


  <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
    <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' != 'true'" />
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:prod" Condition="'$(DOTNET_RUNNING_IN_CONTAINER)' != 'true'" />

    <!-- Include the newly-built files in the publish output -->
    <ItemGroup>
      <DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
      <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
        <RelativePath>%(DistFiles.Identity)</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
        <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
      </ResolvedFileToPublish>
    </ItemGroup>
  </Target>
	
</Project>