using System.Collections.Generic;

namespace Toolbox.Docking.Api.Objects
{
    /// <summary>
    /// Factory for objects which have options.
    /// The objects (calculators, profilers, metabolisms or qsars) produced from this factory 
    /// must implement ITbTunableObject.
    /// Tunable objects are not cashed from the system!
    /// </summary>
    public interface ITbObjectFactoryTunable : ITbObjectFactory
    {
        /// <summary>
        /// Client side options module identification.
        /// Client side modules are loaded using Managed Extensibility Framework (MEF)
        /// See ITbOptionsPlugin
        /// </summary>
        string ClientOptionsModule { get; }

        /// <summary>
        /// Returns the default options of the object serialized to string. 
        /// </summary>
        /// <returns>
        /// Returns the options set. If no options return <b>String.Empty</b>.
        /// </returns>
        string DefaultOptions { get; }

        /// <summary>
        /// Convert serialized options to human readable string rows.
        /// Used for reporting of options.
        /// </summary>
        /// <param name="options">The options encoded as string </param>
        /// <returns>Prepares a UI friendly string of the object's options</returns>
        IReadOnlyList<string> FormatOptions(string options);
    }
}