using System.Threading.Tasks;
using Toolbox.Declarations;
using Toolbox.Docking.Client.Interfaces;
using Toolbox.Docking.Client.Services;

namespace Toolbox.Docking.Client.Plugins
{

    /// <summary>
    /// Plugin module for explaining results.
    /// The classes which implements this interface must have these two attributes:
    ///      [Export([PLUGIN_NAME], typeof(ITbOptionsPlugin))]
    ///      [PartCreationPolicy(CreationPolicy.NonShared)]
    /// [PLUGIN_NAME] must correspond to server's implementation of: ITbObjectFactoryTunable.ClientOptionsModule
    /// Modules are loaded using Managed Extensibility Framework (MEF).
    /// </summary>
    public interface ITbOptionsPlugin
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="uiState"></param>
        /// <param name="tbObjectId"></param>
        /// <param name="options"></param>
        /// <param name="clientServices"></param>
        /// <returns>Return new options or null</returns>
        Task<string> ExecuteOptions(ITbUiState uiState, ITbObjectId tbObjectId, string options,
            ITbClientServiceLocator clientServices);
    }
}