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

    <PropertyGroup>
        <TargetFramework>net9.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
        <BlazorCacheBootResources>false</BlazorCacheBootResources>
        <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
        <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    </PropertyGroup>

    <ItemGroup>
        <Compile Remove="Common\NewFolder\**"/>
        <Content Remove="Common\NewFolder\**"/>
        <Content Include="..\.dockerignore">
            <Link>.dockerignore</Link>
        </Content>
        <EmbeddedResource Remove="Common\NewFolder\**"/>
        <None Remove="Common\NewFolder\**"/>

        <!-- =========================================================== -->
        <!-- TEMPORARILY EXCLUDED - Missing Proto Projects               -->
        <!-- TODO: Create these proto projects in BackOffice.BFF         -->
        <!-- =========================================================== -->

        <!-- DiscountShop Pages & Services - FULLY ENABLED -->
        <!-- <Compile Remove="Pages\DiscountShop\**" /> -->
        <!-- <Content Remove="Pages\DiscountShop\**" /> -->
        <!-- <Compile Remove="Services\DiscountProduct\**" /> -->
        <!-- <Compile Remove="Services\DiscountCategory\**" /> -->
        <!-- <Compile Remove="Services\DiscountOrder\**" /> -->

        <!-- Tag Pages & Services - ENABLED -->
        <!-- <Compile Remove="Pages\\Tag\\**" /> -->
        <!-- <Content Remove="Pages\\Tag\\**" /> -->
        <!-- <Compile Remove="Services\\Tag\\**" /> -->

        <!-- PublicMessages Pages & Services - ENABLED -->
        <!-- <Compile Remove="Pages\PublicMessages\**" /> -->
        <!-- <Content Remove="Pages\PublicMessages\**" /> -->
        <!-- <Compile Remove="Services\PublicMessage\**" /> -->

        <!-- ManualPayment - ENABLED -->
        <!-- <Compile Remove="Pages\Payment\ManualPayments.razor" /> -->
        <!-- <Content Remove="Pages\Payment\ManualPayments.razor" /> -->
        <!-- <Compile Remove="Pages\Payment\ManualPayments.razor.cs" /> -->
        <!-- <Compile Remove="Pages\Payment\Components\ManualPaymentDialog.razor" /> -->
        <!-- <Content Remove="Pages\Payment\Components\ManualPaymentDialog.razor" /> -->
        <!-- <Compile Remove="Pages\Payment\Components\ManualPaymentDialog.razor.cs" /> -->

        <!-- Dashboard widgets - ENABLED -->
        <!-- <Compile Remove="Pages\Dashboard\DiscountShopWidget.razor" /> -->
        <!-- <Content Remove="Pages\Dashboard\DiscountShopWidget.razor" /> -->
        <!-- <Compile Remove="Pages\Dashboard\DiscountShopWidget.razor.cs" /> -->

        <!-- BulkEdit - ENABLED -->
        <!-- <Compile Remove="Pages\Products\BulkEdit.razor" /> -->
        <!-- <Content Remove="Pages\Products\BulkEdit.razor" /> -->
        <!-- <Compile Remove="Pages\Products\BulkEdit.razor.cs" /> -->

        <!-- GalleryDialog - ENABLED (proto added) -->
        <!-- <Compile Remove="Pages\Products\Components\GalleryDialog.razor" /> -->
        <!-- <Content Remove="Pages\Products\Components\GalleryDialog.razor" /> -->
        <!-- <Compile Remove="Pages\Products\Components\GalleryDialog.razor.cs" /> -->

        <!-- CreateDialog/UpdateDialog - ENABLED (proto added) -->
        <!-- <Compile Remove="Pages\Products\Components\CreateDialog.razor" /> -->
        <!-- <Content Remove="Pages\Products\Components\CreateDialog.razor" /> -->
        <!-- <Compile Remove="Pages\Products\Components\CreateDialog.razor.cs" /> -->
        <!-- <Compile Remove="Pages\Products\Components\UpdateDialog.razor" /> -->
        <!-- <Content Remove="Pages\Products\Components\UpdateDialog.razor" /> -->
        <!-- <Compile Remove="Pages\Products\Components\UpdateDialog.razor.cs" /> -->

        <!-- Category/Product DragDrop pages - ENABLED -->
        <!-- <Compile Remove="Pages\Category\CategoryProductsDragDropPage.razor" /> -->
        <!-- <Content Remove="Pages\Category\CategoryProductsDragDropPage.razor" /> -->
        <!-- <Compile Remove="Pages\Category\CategoryProductsDragDropPage.razor.cs" /> -->
        <!-- <Compile Remove="Pages\Products\ProductCategoriesDragDropPage.razor" /> -->
        <!-- <Content Remove="Pages\Products\ProductCategoriesDragDropPage.razor" /> -->
        <!-- <Compile Remove="Pages\Products\ProductCategoriesDragDropPage.razor.cs" /> -->

        <!-- UserOrder Components - RESTORED - proto methods exist -->
        <!-- <Compile Remove="Pages\UserOrder\Components\CancelOrderDialog.razor" /> -->
        <!-- <Content Remove="Pages\UserOrder\Components\CancelOrderDialog.razor" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\CancelOrderDialog.razor.cs" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor" /> -->
        <!-- <Content Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor.cs" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor" /> -->
        <!-- <Content Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor.cs" /> -->

        <!-- UserOrderDetailsDialog - RESTORED - VAT fields exist in proto -->
        <!-- <Compile Remove="Pages\UserOrder\Components\UserOrderDetailsDialog.razor" /> -->
        <!-- <Content Remove="Pages\UserOrder\Components\UserOrderDetailsDialog.razor" /> -->
        <!-- <Compile Remove="Pages\UserOrder\Components\UserOrderDetailsDialog.razor.cs" /> -->

        <!-- UserOrderMainPage - RESTORED - dialogs are back -->
        <!-- <Compile Remove="Pages\UserOrder\UserOrderMainPage.razor" /> -->
        <!-- <Content Remove="Pages\UserOrder\UserOrderMainPage.razor" /> -->
        <!-- <Compile Remove="Pages\UserOrder\UserOrderMainPage.razor.cs" /> -->

        <!-- Transactions - ENABLED -->
        <!-- <Compile Remove="Pages\Payment\Transactions.razor" /> -->
        <!-- <Content Remove="Pages\Payment\Transactions.razor" /> -->
        <!-- <Compile Remove="Pages\Payment\Transactions.razor.cs" /> -->
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Blazored.LocalStorage" Version="4.5.0"/>
        <PackageReference Include="DateTimeConverterCL" Version="1.0.0"/>
        <PackageReference Include="Grpc.Core" Version="2.46.6"/>
        <PackageReference Include="Grpc.Net.Client" Version="2.71.0"/>
        <PackageReference Include="Grpc.Net.Client.Web" Version="2.71.0"/>
        <PackageReference Include="HtmlAgilityPack" Version="1.12.1"/>
        <PackageReference Include="Mapster" Version="7.4.0"/>
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.11"/>
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.11"/>
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.11" PrivateAssets="all"/>
        <PackageReference Include="MudBlazor" Version="8.14.0"/>
        <PackageReference Include="Newtonsoft.Json" Version="13.0.4"/>
        <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.8.0"/>
        <PackageReference Include="Tizzani.MudBlazor.HtmlEditor" Version="2.3.0"/>
        
        <!-- Proto dependencies (needed when using DLL references) -->
        <PackageReference Include="Google.Protobuf" Version="3.28.3"/>
        <PackageReference Include="Google.Api.CommonProtos" Version="2.10.0"/>
        <PackageReference Include="FluentValidation" Version="11.2.2"/>
        <PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.2"/>
    </ItemGroup>
    
    <!-- ============================================================ -->
    <!-- Proto References: Direct reference to CMS Protobuf project   -->
    <!-- This enables direct communication with CMS (no BFF needed)   -->
    <!-- ============================================================ -->
    
    <!-- CMS Protobuf NuGet package (used for both local dev and Docker builds) -->
    <ItemGroup>
        <PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.184" />
    </ItemGroup>
    
    <!-- ============================================================ -->
    <!-- OLD BFF Proto References (DEPRECATED - kept for reference)   -->
    <!-- ============================================================ -->
    
    <!-- CI/CD Mode: Use pre-built DLLs from libs/ folder -->
    <ItemGroup Condition="false AND Exists('../../libs/BackOffice.BFF.Common.Protobuf.dll')">
        <Reference Include="BackOffice.BFF.Common.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Common.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Category.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Category.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.ClubMembership.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.ClubMembership.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Commission.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Commission.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Configuration.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Configuration.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.DiscountCategory.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.DiscountCategory.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.DiscountOrder.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.DiscountOrder.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.DiscountProduct.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.DiscountProduct.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.DiscountShoppingCart.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.DiscountShoppingCart.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Health.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Health.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Inventory.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Inventory.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.ManualPayment.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.ManualPayment.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.NetworkMembership.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.NetworkMembership.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Otp.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Otp.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Package.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Package.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Products.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Products.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.ProductTag.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.ProductTag.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.PublicMessage.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.PublicMessage.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Role.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Role.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.Tag.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.Tag.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.User.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.User.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.UserAddress.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.UserAddress.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.UserOrder.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.UserOrder.Protobuf.dll</HintPath>
        </Reference>
        <Reference Include="BackOffice.BFF.UserRole.Protobuf">
            <HintPath>../../libs/BackOffice.BFF.UserRole.Protobuf.dll</HintPath>
        </Reference>
    </ItemGroup>
    
    <!-- Dev Mode: OLD BFF ProjectReference (DEPRECATED) -->
    <ItemGroup Condition="false AND !Exists('../../libs/BackOffice.BFF.Common.Protobuf.dll')">
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Common.Protobuf/BackOffice.BFF.Common.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Category.Protobuf/BackOffice.BFF.Category.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Health.Protobuf/BackOffice.BFF.Health.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Inventory.Protobuf/BackOffice.BFF.Inventory.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ManualPayment.Protobuf/BackOffice.BFF.ManualPayment.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Otp.Protobuf/BackOffice.BFF.Otp.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Package.Protobuf/BackOffice.BFF.Package.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Products.Protobuf/BackOffice.BFF.Products.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/BackOffice.BFF.PublicMessage.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Role.Protobuf/BackOffice.BFF.Role.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.User.Protobuf/BackOffice.BFF.User.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.UserAddress.Protobuf/BackOffice.BFF.UserAddress.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.UserOrder.Protobuf/BackOffice.BFF.UserOrder.Protobuf.csproj" />
        <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.UserRole.Protobuf/BackOffice.BFF.UserRole.Protobuf.csproj" />
    </ItemGroup>

    <ItemGroup>
        <ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js"/>
    </ItemGroup>


</Project>
