using PowderCoating.Application.DTOs.Job;
using PowderCoating.Application.DTOs.Quote;

namespace PowderCoating.Web.Helpers;

internal static class GuidedActivationDefaults
{
    public static CreateQuoteDto BuildQuoteDraft(int? customerId)
    {
        return new CreateQuoteDto
        {
            CustomerId = customerId,
            QuoteDate = DateTime.Today,
            ExpirationDate = DateTime.Today.AddDays(30),
            Description = "Sample onboarding quote",
            Notes = "Sample onboarding quote",
            QuoteItems =
            [
                BuildSampleItem("Sample onboarding quote")
            ]
        };
    }

    public static CreateJobDto BuildJobDraft(int customerId, int jobPriorityId)
    {
        return new CreateJobDto
        {
            CustomerId = customerId,
            JobPriorityId = jobPriorityId,
            Description = "Wheel Set",
            SpecialInstructions = "Sample onboarding job",
            JobItems =
            [
                BuildSampleItem("Sample onboarding job")
            ]
        };
    }

    private static CreateQuoteItemDto BuildSampleItem(string notes)
    {
        return new CreateQuoteItemDto
        {
            Description = "Wheel Set",
            Quantity = 4,
            SurfaceAreaSqFt = 0,
            EstimatedMinutes = 0,
            IsGenericItem = true,
            ManualUnitPrice = 125m,
            Notes = notes,
            IncludePrepCost = false,
            Complexity = "Moderate"
        };
    }
}
