using Azure.Core;
using CloudBuilder.Core.DependencyInjection.Request;
using CloudBuilder.Core.Policy;
using CloudBuilder.Core.Service;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

namespace CloudBuilder.Core.Request
{
    public interface IServiceRequest : IRequest
    {
        void SetToken(string token);

        void SetCulture(string culture);

        void SetToken();

        Task<R> GetAsync<R>(string api);

        Task<R> GetWithQueryAsync<R>(string api, Dictionary<string, string> queryParams);

        Task<R> GetWithHeadersAsync<R>(string api, Dictionary<string, string> headers);

        Task<R> GetWithHeadersAndQueryAsync<R>(string api, Dictionary<string, string> headers, Dictionary<string, string> queryParams);

        Task<R> PostAsJsonAsync<T, R>(string api, T data);
        Task<R> PostAsJsonAsync<T, R>(string api, Dictionary<string, string> headers, T data);
        Task<R> PostAsJsonAsync<R>(string api, Dictionary<string, string> headers);
        Task<R> PostAsJsonAsync<R>(string api);

        Task PostAsync(string api);

        void DownloadFile(string api, string filePath, Action<long> progressCallback, Action<string> completedCallback);

        Task<R> PostAsync<R>(string api, MultipartFormDataContent data);

        void AddHeaders(string name, string? value);
        void SetContext(IContext loginContext);
        HttpClient GetHttpClient();
    }
}
