namespace Toolbox.Docking.Api.Control
{
    /// <summary>
    /// Combines work task and <see cref="Chemical"/> into an unit of work.
    /// </summary>
    public interface ITbBasket
    {
        /// <summary>
        /// Currently executed task. To be used for progress control.
        /// It also provides access to Toolbox services via the ITbWorkTask's <see cref="ITbWorkTask.CalcService"/>  .
        /// </summary>
        ITbWorkTask WorkTask { get; }

        /// <summary>
        /// Chemical to work on.
        /// </summary>
        Chemical.Chemical Chemical{ get; }

        /// <summary>
        /// Chemical which is defined as target in TB workflow. 
        /// This is used in operations which execution on "Chemical" is in respect to "TargetChemical".
        /// (for example it is used in Structural similarity)
        /// Equals to WorkTask.TargetChemical, or explicitly defined target structure
        /// </summary>
        Chemical.Chemical TargetChemical { get; }

        /// <summary>
        /// Return new basket task for different work chemical.
        /// </summary>
        /// <param name="newWorkChem">Chemical for which the sub-basket should be created. </param>
        /// <returns>Resulting Toolbox basket.</returns>
        ITbBasket SubBasket(Chemical.Chemical newWorkChem);

        /// <summary>
        /// Return new basket task for different work chemical with explicitly defined target chemical.
        /// </summary>
        /// <param name="newWorkChem">Chemical for which the sub-basket should be created. </param>
        /// <param name="explicitTargetChem">Defines target chemical</param>
        /// <returns>Resulting Toolbox basket.</returns>
        ITbBasket SubBasket(Chemical.Chemical newWorkChem, Chemical.Chemical explicitTargetChem);
    }
}