using BomLocalService.Models;
using Microsoft.Playwright;
namespace BomLocalService.Services.Interfaces;
///
/// Service interface for scraping radar screenshots from the BOM website.
/// Orchestrates the multi-step process of navigating BOM, finding locations, and capturing radar screenshots.
///
public interface IScrapingService
{
///
/// Scrapes a radar screenshot from the BOM website for a given location.
/// Performs the complete workflow: navigates to BOM, searches for location, navigates to radar page,
/// waits for map to render, captures screenshot, extracts metadata, and saves to cache.
///
/// The suburb name (e.g., "Pomona", "Brisbane")
/// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC")
/// Folder path for saving debug files (screenshots, HTML, logs) if debug mode is enabled
/// The Playwright page instance to use for scraping
/// List to capture console messages from the browser (for debugging)
/// List to capture network request information (for debugging)
/// Cancellation token to cancel the operation
/// Radar screenshot response with image path and metadata
Task ScrapeRadarScreenshotAsync(
string suburb,
string state,
string debugFolder,
IPage page,
List<(string type, string text, DateTime timestamp)> consoleMessages,
List<(string method, string url, int? status, string resourceType, DateTime timestamp)> networkRequests,
CancellationToken cancellationToken = default);
}