using BomLocalService.Models;
using Microsoft.Playwright;
namespace BomLocalService.Services.Interfaces;
///
/// Service interface for parsing time and metadata information from BOM website content.
/// Extracts observation times, forecast times, weather station names, and distances from BOM weather map pages.
///
public interface ITimeParsingService
{
///
/// Extracts last updated information from a BOM weather map page.
/// Scrapes the weather metadata section to get observation time, forecast time, weather station, and distance.
///
/// The Playwright page instance containing the loaded BOM weather map
/// Last updated information with parsed times and metadata
Task ExtractLastUpdatedInfoAsync(IPage page);
///
/// Parses last updated text from BOM website to extract structured information.
/// Handles various text formats like "Observations: 11 minutes ago, 8:20 pm AEST at Gympie weather station, 30 km from Pomona, QLD".
/// Converts times to UTC using the configured timezone.
///
/// The raw text content from the BOM weather metadata section
/// Parsed last updated information with observation time, forecast time, weather station, and distance
LastUpdatedInfo ParseLastUpdatedText(string text);
}