namespace NexusReader.Application.DTOs.Media;

// Note: These DTOs are registered in AppJsonContext.cs for JSON source generation.

/// <summary>
/// Request DTO for chapter validation/sanitization.
/// </summary>
public record ValidateChapterRequest(string Content);

/// <summary>
/// Response DTO containing sanitized chapter content.
/// </summary>
public record ValidateChapterResponse(string SanitizedContent);

/// <summary>
/// Response DTO containing the uploaded media file URL.
/// </summary>
public record UploadResultDto(string Url);

/// <summary>
/// Represents a structured JSON backup envelope stored in LocalStorage.
/// </summary>
public class LocalBackupEnvelope
{
    public Guid ChapterId { get; set; }
    public DateTime Timestamp { get; set; }
    public string MarkdownContent { get; set; } = string.Empty;
}

/// <summary>
/// Request DTO for chapter autosaving.
/// </summary>
public record AutosaveChapterRequest(string MarkdownContent);
