using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Components;

using CommonHelpers.WASM;
using BookRegistry.Client.DB;

namespace BookRegistry.Client {

//**************************************************************************************************
partial class HomeService {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public async Task<ServiceInvocationResult<SelectBooks_Response>>
   ESC_SelectBooks_A( SelectBooks_Input args )
{
   SetOperationTextAuto();
   return await ESC_Invoke_A<SelectBooks_Response>( args );
}

public async Task<ServiceInvocationResult<GetBookSelectionCollections_Response>>
   ESC_GetBookSelectionCollections_A()
{
   SetOperationTextAuto();
   return await ESC_Invoke_A<GetBookSelectionCollections_Response>( new ApiArgumentsBase() );
}

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

public async Task<ServiceInvocationResult<AddBook_Response>>
   ESC_AddBook_A( AddBook_Input args )
{
   SetOperationTextAuto();
   return await ESC_Invoke_A<AddBook_Response>( args );
}

public async Task<ServiceInvocationResult<UpdateBook_Response>>
   ESC_UpdateBook_A( UpdateBook_Input args )
{
   SetOperationTextAuto();
   return await ESC_Invoke_A<UpdateBook_Response>( args );
}

public async Task<ServiceInvocationResult<RemoveBook_Response>>
   ESC_RemoveBook_A( Guid bookId )
{
   SetOperationTextAuto();
   return await ESC_Invoke_A<RemoveBook_Response>( new RemoveBook_Args{ ID = bookId } );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HomeService
//**************************************************************************************************

} // BookRegistry.Client
