<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFrameworks>$(SharedTargetFrameworks)</TargetFrameworks>
    </PropertyGroup>

    <ItemGroup>
        <ProjectReference Include="..\UniGetUI.Core.Classes\UniGetUI.Core.Classes.csproj" />
        <ProjectReference Include="..\UniGetUI.Core.Data\UniGetUI.Core.Data.csproj" />
        <ProjectReference Include="..\UniGetUI.Core.LanguageEngine\UniGetUI.Core.LanguageEngine.csproj" />
        <ProjectReference Include="..\UniGetUI.Core.Logger\UniGetUI.Core.Logging.csproj" />
        <ProjectReference Include="..\UniGetUI.Core.Settings\UniGetUI.Core.Settings.csproj" />
        <ProjectReference Include="..\UniGetUI.Core.Tools\UniGetUI.Core.Tools.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Enums\UniGetUI.PackageEngine.Structs.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Bun\UniGetUI.PackageEngine.Managers.Bun.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Cargo\UniGetUI.PackageEngine.Managers.Cargo.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Dotnet\UniGetUI.PackageEngine.Managers.Dotnet.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Generic.NuGet\UniGetUI.PackageEngine.Managers.Generic.NuGet.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Npm\UniGetUI.PackageEngine.Managers.Npm.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Pip\UniGetUI.PackageEngine.Managers.Pip.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.PowerShell7\UniGetUI.PackageEngine.Managers.PowerShell7.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Vcpkg\UniGetUI.PackageEngine.Managers.Vcpkg.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.Operations\UniGetUI.PackageEngine.Operations.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.PackageLoader\UniGetUI.PackageEngine.PackageLoaders.csproj" />
        <ProjectReference Include="..\UniGetUI.PackageEngine.PackageManagerClasses\UniGetUI.PackageEngine.Classes.csproj" />
    </ItemGroup>

    <!-- Windows-only managers (only target $(WindowsTargetFramework)). Declared unconditionally on Windows builds
         so the project graph sees them; SetTargetFramework pins them to their only TFM regardless of consumer,
         and ReferenceOutputAssembly disables the /reference inclusion for the net10.0 inner build. -->
    <ItemGroup Condition="'$(BuildSharedWindowsTargetFrameworks)' == 'true'">
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.PowerShell\UniGetUI.PackageEngine.Managers.PowerShell.csproj"
                          SetTargetFramework="TargetFramework=$(WindowsTargetFramework)">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' != '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Scoop\UniGetUI.PackageEngine.Managers.Scoop.csproj"
                          SetTargetFramework="TargetFramework=$(WindowsTargetFramework)">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' != '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.WinGet\UniGetUI.PackageEngine.Managers.WinGet.csproj"
                          SetTargetFramework="TargetFramework=$(WindowsTargetFramework)">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' != '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Chocolatey\UniGetUI.PackageEngine.Managers.Chocolatey.csproj"
                          SetTargetFramework="TargetFramework=$(WindowsTargetFramework)">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' != '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
    </ItemGroup>

    <!-- Multi-target managers (Linux + Windows TFMs). Declared unconditionally so the graph is correct;
         ReferenceOutputAssembly disables the /reference for the Windows inner build. -->
    <ItemGroup>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Apt\UniGetUI.PackageEngine.Managers.Apt.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Dnf\UniGetUI.PackageEngine.Managers.Dnf.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Pacman\UniGetUI.PackageEngine.Managers.Pacman.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Homebrew\UniGetUI.PackageEngine.Managers.Homebrew.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Snap\UniGetUI.PackageEngine.Managers.Snap.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
        <ProjectReference Include="..\UniGetUI.PackageEngine.Managers.Flatpak\UniGetUI.PackageEngine.Managers.Flatpak.csproj">
            <ReferenceOutputAssembly Condition="'$(TargetFramework)' == '$(WindowsTargetFramework)'">false</ReferenceOutputAssembly>
        </ProjectReference>
    </ItemGroup>

    <ItemGroup>
        <Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="PhotoSauce.MagicScaler" Version="0.15.0" />
    </ItemGroup>
</Project>