using aeqw89.DataKeys;
using Beam.Abstractions;

namespace Beam.Dynamic {
    /// <summary>
    /// <para>
    ///     A collection of specific useful methods and constants that facilitate the use of the application; allows other parts of the application to depend on architecture-specific arbitrary choices without compromising the Single-Responsibility principle or increasing redundant code. 
    /// </para>
    /// </summary>
    public partial interface IArchitecture {
        ///// <summary>
        ///// Gets the metadata associated with a <see cref="ResourceDictionary"/>
        ///// </summary>
        ///// <param name="web">The web client to use when downloading <see cref="WebResource"/>s</param>
        ///// <param name="pieceKey">The key of the <see cref="ResourceDictionary"/> stored in the <paramref name="sdd"/></param>
        ///// <param name="sdd">The <see cref="BeamDataDictionary"/> to be used to retrieve information</param>
        ///// <param name="logger">Optional logger for logging debug information</param>
        ///// <returns>A <see cref="DownloadContext{T}"/> object with the required information to perform the download</returns>
        //public DownloadContext<IDocumentMetaData>? GetMeta(HtmlWeb web, DataKey<ResourceDictionary> pieceKey, BeamDataDictionary sdd, CancellationToken  ct = default, ILogger? logger = null);
        ///// <summary>
        ///// Gets the <see cref="DownloadContext{T}"/> of the text record associated with <see cref="ResourceDictionary"/>
        ///// </summary>
        ///// <param name="web">The web client to use when downloading <see cref="WebResource"/>s</param>
        ///// <param name="pieceKey">The key of the <see cref="ResourceDictionary"/> stored in the <paramref name="sdd"/></param>
        ///// <param name="sdd">The <see cref="BeamDataDictionary"/> to be used to retrieve information</param>
        ///// <param name="metadata">Optional book metadata to include with the final text record</param>
        ///// <param name="logger">Optional logger for logging debug information</param>
        ///// <returns>A <see cref="DownloadContext{T}"/> object with the required information to perform the download</returns>
        //public DownloadContext<IDocument>? GetTextRecord(HtmlWeb web, DataKey<ResourceDictionary> pieceKey, BeamDataDictionary sdd, IDocumentMetaData? metadata = null, CancellationToken ct = default, ILogger? logger = null);

        /// <summary>
        /// The <see cref="DataKey{IDocumentMetaData}"/> to use when looking for the chapter metadata
        /// </summary>
        public DataKey<IDocumentMetaData> ChapterKey { get; set; }

        /// <summary>
        /// The <see cref="DataKey{IDocumentMetaData}"/> to use when looking for the book metadata
        /// </summary>
        public DataKey<IDocumentMetaData> BookKey { get; set; }

        /// <summary>
        /// The default architecture
        /// </summary>
        public static IArchitecture Default => new MainArchitecture();
    }
}
