using Microsoft.AspNetCore.Http;

namespace PowderCoating.Application.Interfaces;

public interface IQuotePhotoService
{
    /// <summary>Save an uploaded photo to temp storage. Returns (success, tempId, relativePath, error).</summary>
    Task<(bool Success, string TempId, string FilePath, string ErrorMessage)> SaveTempPhotoAsync(
        IFormFile file, int companyId);

    /// <summary>Move a temp photo to permanent quote storage. Returns new relative path.</summary>
    Task<(bool Success, string FilePath, string ErrorMessage)> PromoteTempPhotoAsync(
        string tempId, int quoteId, int companyId);

    /// <summary>Read photo bytes for AI processing.</summary>
    Task<(bool Success, byte[] Data, string ContentType)> ReadPhotoAsync(string filePath);

    /// <summary>Delete a photo file.</summary>
    Task<bool> DeletePhotoAsync(string filePath);

    /// <summary>Read all temp photos for a given tempId for AI processing.</summary>
    Task<List<(byte[] Data, string ContentType, string FileName)>> ReadTempPhotosAsync(string tempId);

    /// <summary>Clean up all temp photos for a given tempId (on wizard cancel/abandon).</summary>
    Task CleanupTempAsync(string tempId);
}
