using System;
using System.Diagnostics;
using System.Threading.Tasks;
using System.ComponentModel;
using Microsoft.AspNetCore.Components;

using CommonHelpers.WASM;
using AFXUI;
using BookRegistry.Client.Shared;

namespace BookRegistry.Client {

//**************************************************************************************************
partial class AComponent {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static MessageBox MB => MainLayout.MessageBox;
//==================================================================================================

public static Task ESC_ShowMessage_A(string message) =>
   MB.ESC_ShowMessage_A( message );
public static Task ESC_ShowMessage_A(string? title,string message) =>
   MB.ESC_ShowMessage_A( title, message );

//--------------------------------------------------------------------------------------------------

public static Task ESC_ShowExclamation_A(string message) =>
   MB.ESC_ShowExclamation_A( message );
public static Task ESC_ShowExclamation_A(string? title,string message) =>
   MB.ESC_ShowExclamation_A( title, message );

//--------------------------------------------------------------------------------------------------

public static Task ESC_ShowCompletion_A(string message) =>
   MB.ESC_ShowCompletion_A( message );
public static Task ESC_ShowCompletion_A(string? title,string message) =>
   MB.ESC_ShowCompletion_A( title, message );

//--------------------------------------------------------------------------------------------------

public static Task ESC_ShowSuccess_A(string message) =>
   MB.ESC_ShowSuccess_A( message );
public static Task ESC_ShowSuccess_A(string? title,string message) =>
   MB.ESC_ShowSuccess_A( title, message );

//==================================================================================================

public static Task ESC_ShowError_A(string message) =>
   MB.ESC_ShowError_A( message );
public static Task ESC_ShowError_A(string? title,string message) =>
   MB.ESC_ShowError_A( title, message );

public static Task ESC_ShowError_A(Exception e) =>
   MB.ESC_ShowError_A( e );
public static Task ESC_ShowError_A(string? title,Exception e) =>
   MB.ESC_ShowError_A( title, e );

//--------------------------------------------------------------------------------------------------

public static Task ESC_ShowCommunicationError_A(string message) =>
   MB.ESC_ShowCommunicationError_A( message );
public static Task ESC_ShowCommunicationError_A(Exception error) =>
   MB.ESC_ShowCommunicationError_A( error );

//--------------------------------------------------------------------------------------------------

public static Task ESC_ShowServerError_A(string message) =>
   MB.ESC_ShowServerError_A( message );

public static Task ESC_ShowResponseError_A(GeneralApiResponse response) =>
   MB.ESC_ShowResponseError_A( response );

public static Task ESC_ShowRequestError_A(SimpleSIR simpleResult) =>
   MB.ESC_ShowRequestError_A( simpleResult );

public static Task ESC_ShowRequestError_Unexpected_A() =>
   MB.ESC_ShowRequestError_Unexpected_A();
public static Task ESC_ShowRequestError_Unexpected_A(string? additionalMessage) =>
   MB.ESC_ShowRequestError_Unexpected_A( additionalMessage );

//==================================================================================================

public static Task<bool> ESC_ConfirmationDialog_A( string text,
                                                   bool confirmationFocusing = true ) =>
   MB.ESC_ConfirmationDialog_A( text, confirmationFocusing );
public static Task<bool> ESC_ConfirmationDialog_A( string? title, string text,
                                                   bool confirmationFocusing = true ) =>
   MB.ESC_ConfirmationDialog_A( title, text, confirmationFocusing );

public static Task<bool> ESC_ConfirmationDialog_A( MessageBoxImage imageType,
                                                   string? title, string text,
                                                   bool confirmationFocusing = true,
                                                   string? confirmButtonCaption = null,
                                                   string? cancelButtonCaption = null ) =>
   MB.ESC_ConfirmationDialog_A( imageType, title, text, confirmationFocusing,
                                confirmButtonCaption, cancelButtonCaption );
public static Task<bool> ESC_ConfirmationDialog_A( string? imagePath, string? title, string text,
                                                   bool confirmationFocusing = true,
                                                   string? confirmButtonCaption = null,
                                                   string? cancelButtonCaption = null ) =>
   MB.ESC_ConfirmationDialog_A( imagePath, title, text, confirmationFocusing,
                                confirmButtonCaption, cancelButtonCaption );

//--------------------------------------------------------------------------------------------------

public static Task<bool> ESC_ImportantConfirmationDialog_A( string text ) =>
   MB.ESC_ImportantConfirmationDialog_A( text );
public static Task<bool> ESC_ImportantConfirmationDialog_A( string? title, string text ) =>
   MB.ESC_ImportantConfirmationDialog_A( title, text );
public static Task<bool> ESC_ImportantConfirmationDialog_A( string? title, string text,
                                                            string? confirmButtonCaption = null,
                                                            string? cancelButtonCaption = null ) =>
   MB.ESC_ImportantConfirmationDialog_A( title, text, confirmButtonCaption, cancelButtonCaption );

public static Task<bool> ESC_ImportantConfirmationDialog_A( bool confirmationFocusing,
                                                            string text ) =>
   MB.ESC_ImportantConfirmationDialog_A( confirmationFocusing, text );
public static Task<bool> ESC_ImportantConfirmationDialog_A( bool confirmationFocusing,
                                                            string? title, string text ) =>
   MB.ESC_ImportantConfirmationDialog_A( confirmationFocusing, title, text );
public static Task<bool> ESC_ImportantConfirmationDialog_A( bool confirmationFocusing,
                                                            string? title, string text,
                                                            string? confirmButtonCaption = null,
                                                            string? cancelButtonCaption = null ) =>
   MB.ESC_ImportantConfirmationDialog_A( confirmationFocusing, title, text,
                                         confirmButtonCaption, cancelButtonCaption );

//==================================================================================================

public static Task<bool> ESC_QuestionDialog_A( string text ) =>
   MB.ESC_QuestionDialog_A( text );
public static Task<bool> ESC_QuestionDialog_A( string? title, string text ) =>
   MB.ESC_QuestionDialog_A( title, text );

public static Task<bool> ESC_QuestionDialog_A( MessageBoxImage imageType,
                                               string? title, string text,
                                               string? yesButtonCaption = null,
                                               string? noButtonCaption = null ) =>
   MB.ESC_QuestionDialog_A( imageType, title, text, yesButtonCaption, noButtonCaption );
public static Task<bool> ESC_QuestionDialog_A( string? imagePath, string? title, string text,
                                               string? yesButtonCaption = null,
                                               string? noButtonCaption = null ) =>
   MB.ESC_QuestionDialog_A( imagePath, title, text, yesButtonCaption, noButtonCaption );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // AComponent
//**************************************************************************************************

} // BookRegistry.Client
