using System.Collections.Generic;
using System.Windows;

namespace Toolbox.Docking.Client.Services
{
    public interface ITbDialogService
    {
        /*
         * For any window shown by this method, the following is guaranteed to be true:
         * 1. The Shell (MainWindow) will take ownership of the window
         * 2. The dialog will be positioned at the center of it's Owner (The Shell)
         */
        void Show(Window window, WindowStartupLocation location = WindowStartupLocation.CenterOwner);

        /*
         * For any dialog shown by this method, the following is guaranteed to be true:
         * 1. The Shell (MainWindow) will take ownership of the dialog
         * 2. The dialog will be positioned at the center of it's Owner (The Shell)
         */
        bool ShowDialog(Window dialog, WindowStartupLocation location = WindowStartupLocation.CenterOwner);

        /// <summary>
        /// Requests confirmation from the user
        /// </summary>
        /// <param name="message">The question to be asked</param>
        /// <param name="title"></param>
        /// <param name="skippable"></param>
        /// <param name="messageAlignment"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns>True, if the user agree</returns>
        bool Confirm(string message, string title = null, bool skippable = false, TextAlignment messageAlignment = TextAlignment.Center, int width = 550, int height = 200);

        /// <summary>
        /// Use this instead MessageBox.Show(), which happens to be non-modal for unknown reasons
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="title"></param>
        /// <param name="additionalInfo">Key value pairs which will be rendered as additional message information</param>
        /// <param name="msgAlignment">Shows how to align the message in the dialog</param>
        void ShowMessage(string msg, string title, IEnumerable<KeyValuePair<string, string>> additionalInfo = null, TextAlignment msgAlignment = TextAlignment.Center);

    }
}