using Hcs.Broker.Api;
using Hcs.Broker.Api.Request;
using Hcs.Service.Async.Nsi;

namespace Hcs.Broker.Mock.Api
{
    /// <inheritdoc cref="INsiApi"/>
    public class MockNsiApi : INsiApi
    {
        /// <inheritdoc cref="INsiApi"/>
        public async Task<IEnumerable<NsiItemType>> ExportDataProviderNsiItemAsync(exportDataProviderNsiItemRequestRegistryNumber registryNumber, CancellationToken token = default)
        {
            await Task.Delay(3000, token);

            return [];
        }

        /// <inheritdoc cref="INsiApi"/>
        public async Task<string> RequestExportDataProviderNsiItemAsync(exportDataProviderNsiItemRequestRegistryNumber registryNumber, CancellationToken token = default)
        {
            await Task.Delay(3000, token);

            return Guid.NewGuid().ToString();
        }

        /// <inheritdoc cref="INsiApi"/>
        public async Task<RequestSingleResult<NsiItemType>> GetExportDataProviderNsiItemResultAsync(string messageGuid)
        {
            await Task.Delay(3000);

            return new RequestSingleResult<NsiItemType>()
            {
                Ready = false
            };
        }
    }
}
