using Toolbox.Docking.Api.Control;
using Toolbox.Docking.Api.Data;

namespace Toolbox.Docking.Api.Objects.Calculator
{
    /// <summary>
    /// Toolbox calculator object. 
    /// </summary>
    public interface ITbCalculator : ITbObject
    {
        /// <summary>
        /// Calculate parameter value.
        /// </summary>
        /// <param name="target">The target basket, containing the <see cref="Chemical"/></param>
        /// <returns>
        /// Return calculated value for the Chemical in the target work basket.
        /// NOTE: The resulting TbScalarData object should be in the same Unit as the one returned by
        /// the <see cref="ITbCalculatorFactory.ScaleDeclaration"/> of the factory that produced the calculator.
        /// </returns>
        TbScalarData Calculate(ITbBasket target);
    }
}