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

    <PropertyGroup>
        <TargetFramework>netstandard2.1</TargetFramework>
        <RazorLangVersion>3.0</RazorLangVersion>
        <WwwRootResourcePath>wwwroot</WwwRootResourcePath>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="QRCoder" Version="1.4.1" />
        <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.12" />
        <PackageReference Include="BlazorIonic" Version="1.0.14" />
        <PackageReference Include="ZXing.Net.Mobile" Version="2.4.1" />
        <PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.12" />
        <PackageReference Include="ReactiveUI" Version="13.2.2" />
        <PackageReference Include="ReactiveUI.Blazor" Version="13.2.2" />
    </ItemGroup>

    <PropertyGroup Condition="'$(Configuration)' == 'Release' ">
        <DefineConstants>LIVESHARP_DISABLE</DefineConstants>
    </PropertyGroup>

    <ItemGroup Condition="'$(Configuration)' != 'Release' ">
        <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.12" />
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\Chaincase.Common\Chaincase.Common.csproj" />
      <ProjectReference Include="..\WalletWasabi.SDK\WalletWasabi\WalletWasabi.csproj" />
    </ItemGroup>
    <ItemGroup>
      <Folder Include="ViewModels\" />
      <Folder Include="Components\" />
      <Folder Include="wwwroot\style\" />
      <Folder Include="wwwroot\img\" />
    </ItemGroup>

    <ItemGroup>
      <EmbeddedResource Include="wwwroot\style\global.css">
        <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
      </EmbeddedResource>
    </ItemGroup>
    <ItemGroup>
      <_ContentIncludedByDefault Remove="wwwroot\theme\theme.css" />
      <_ContentIncludedByDefault Remove="wwwroot\theme\theme.js" />
    </ItemGroup>
    <PropertyGroup>
        <!-- File with mtime of last successful npm install -->
        <NpmInstallStampFile>node_modules/.install-stamp</NpmInstallStampFile>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
      <LangVersion>8.0</LangVersion>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
      <LangVersion>8.0</LangVersion>
    </PropertyGroup>
    <Target Name="NpmInstall" BeforeTargets="BeforeBuild" Inputs="package.json" Outputs="$(NpmInstallStampFile)">
        <Exec Command="npm install" />
        <Message Text="npm installed!" />
        <Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
    </Target>
</Project>
