using OF_DL.Models;
namespace OF_DL.Services;
///
/// UI callback contract for download orchestration. Implementations handle
/// status display, progress bars, and notifications in a UI-framework-specific way.
///
public interface IDownloadEventHandler
{
///
/// Wraps work in a status indicator (spinner) during API fetching.
/// The implementation controls how the status is displayed.
///
Task WithStatusAsync(string statusMessage, Func> work);
///
/// Wraps work in a progress bar during downloading.
/// The implementation controls how progress is displayed.
///
Task WithProgressAsync(string description, long maxValue, bool showSize,
Func> work);
///
/// Called when content of a specific type is found for a creator.
///
void OnContentFound(string contentType, int mediaCount, int objectCount);
///
/// Called when no content of a specific type is found for a creator.
///
void OnNoContentFound(string contentType);
///
/// Called when downloading of a content type completes.
///
void OnDownloadComplete(string contentType, DownloadResult result);
///
/// Called when starting to process a specific user/creator.
///
void OnUserStarting(string username);
///
/// Called when all downloads for a user/creator are complete.
///
void OnUserComplete(string username, CreatorDownloadResult result);
///
/// Called when a purchased tab user's downloads are complete.
///
void OnPurchasedTabUserComplete(string username, int paidPostCount, int paidMessagesCount);
///
/// Called when the entire scrape operation completes.
///
void OnScrapeComplete(TimeSpan elapsed);
///
/// General status message display.
///
void OnMessage(string message);
}