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

    <PropertyGroup Label="Main">
        <AssemblyName>CodeChops.Crossblade</AssemblyName>
        <RootNamespace>CodeChops.Crossblade</RootNamespace>
        <TargetFramework>net8.0</TargetFramework>
        <LangVersion>12</LangVersion>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <IsTrimmable>true</IsTrimmable>
    </PropertyGroup>

    <ItemGroup>
        <SupportedPlatform Include="browser" />
    </ItemGroup>

    <PropertyGroup Label="Package">
        <Version>1.0.11</Version>
        <PackageReleaseNotes>Removed Position parameter.</PackageReleaseNotes>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <Title>CodeChops.Crossblade</Title>
        <Description>Easy crossfades for your Blazor website.</Description>
        <PackageId>CodeChops.Crossblade</PackageId>
        <PackageProjectUrl>https://github.com/code-chops/Crossblade</PackageProjectUrl>
        <PackageTags>CodeChops;CodeChops.Crossblade;Crossfade;Cross fade;Blazor;Razor component;Blazor</PackageTags>
        <RepositoryUrl>https://github.com/code-chops/Crossblade</RepositoryUrl>
        <RepositoryType>Git</RepositoryType>
        <PublishRepositoryUrl>true</PublishRepositoryUrl>
        <Authors>CodeChops (@Code-Chops), Max Bergman</Authors>
        <Company>CodeChops</Company>
        <PackageIcon>icon.png</PackageIcon>
        <PackageLicenseFile>LICENSE</PackageLicenseFile>
		<PackageReadmeFile>README.md</PackageReadmeFile>
        <Copyright>Copyright (c) CodeChops $([System.DateTime]::Now.ToString(yyyy))</Copyright>
        <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
        <NoWarn>
            CS1591, <!-- Missing XML comment for publicly visible type or member -->
            CS1573, <!-- Parameter has no matching param tag in the XML comment -->
            CS1712, <!-- Type parameter has no matching typeparam tag in the XML comment (but other type parameters do) -->
        </NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
    </PropertyGroup>

    <!-- Creates local nuget packages if in release mode and environment variable LocalNuGetPackagesFolder is configured -->
    <Target Name="AddNugetPackage" AfterTargets="Pack" Condition="'$(Configuration)' == 'Release' AND '$(LocalNuGetPackagesFolder)' != null">
        <Exec Command="$(LocalNuGetPackagesFolder)\nuget.exe add $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg -source $(LocalNuGetPackagesFolder)" />
    </Target>

    <ItemGroup Label="PackageAssets">
        <None Include="..\LICENSE" Pack="true" PackagePath="" />
        <None Include="..\icon.png" Pack="true" Visible="true" PackagePath="" />
        <None Include="..\README.md" Pack="true" PackagePath="\" />
    </ItemGroup>

    <ItemGroup Label="PackageReferences">
        <PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.2" />
    </ItemGroup>
</Project>