using Microsoft.AspNetCore.Mvc;
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Dtos.Room;
using QtCNETAPI.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QtCNETAPI.Enums;
using QtCNETAPI.Schema;

namespace QtCNETAPI.Services.ApiService
{
    public interface IApiService
    {
        public string? SessionToken { get; set; }
        public string? ApiUri { get; }
        public User? CurrentUser { get; }

        public event EventHandler? OnCurrentUserUpdate;

        public Task<ServiceResponse<string>> PingServerAsync();
        public Task<ServiceResponse<List<UserInformationDto>>> GetOnlineUsersAsync();
        public Task<ServiceResponse<List<UserInformationDto>>> GetAllUsersAsync();
        public Task<ServiceResponse<User>> DeleteUserById(string id);
        public Task<ServiceResponse<string>> LoginAsync(UserLoginDto userLoginDto);
        public Task<bool> LogoutAsync();
        public Task<ServiceResponse<bool>> ResendVerificationEmail(string email);
        public Task<ServiceResponse<bool>> SendPasswordResetEmail(string email);
        public Task<ServiceResponse<bool>> ResetPassword(UserPasswordResetDto request);
        public Task<ServiceResponse<User>> RefreshLogin(string refreshToken);
        public Task<ServiceResponse<string>> RefreshSessionIfInvalid();
        public Task<User> SetCurrentUser();
        public Task<ServiceResponse<User>> RegisterAsync(UserDto userDto);
        public Task<ServiceResponse<UserInformationDto>> GetUserInformationAsync(string id);
        public Task<ServiceResponse<UserInformationDto>> UpdateUserInformationAsync(UserUpdateInformationDto request);
        public Task<ServiceResponse<string>> UpdateUserProfilePic(string filePath);
        public Task<ServiceResponse<byte[]>> GetUserProfilePic(string userId);
        public Task<ServiceResponse<Room>> CreateRoomAsync(RoomDto request);
        public Task<ServiceResponse<Room>> DeleteRoomAsync(string roomId);
        public Task<ServiceResponse<List<Room>>> GetAllRoomsAsync();
        public Task<ServiceResponse<List<Contact>>> GetCurrentUserContacts();
        public Task<ServiceResponse<Contact>> AddContactToCurrentUser(string userId);
        public Task<ServiceResponse<bool>> AcceptContactRequest(string userId);
        public Task<ServiceResponse<Contact>> RemoveContactFromCurrentUser(string userId);
        public Task<ServiceResponse<int>> AddCurrencyToCurrentUser(int amount, bool isSpinClaim);
        public Task<ServiceResponse<int>> GetCurrentStockPrice();
        public Task<ServiceResponse<UserStockActionResultDto>> BuyStock(int amount);
        public Task<ServiceResponse<UserStockActionResultDto>> SellStock(int amount);
        public Task<ServiceResponse<int>> GetRandomNumber();
        public Task<ServiceResponse<NumberGuessResult>> GuessRandomNumber(int original, int guess);
        public Task<ServiceResponse<List<StoreItem>>> GetStoreItems();
        public Task<ServiceResponse<StoreItem>> GetStoreItem(int id);
        public Task<ServiceResponse<bool>> BuyStoreItem(int id);
        public Task<ServiceResponse<List<OwnedStoreItem>>> GetOwnedStoreItems();
        public Task<ServiceResponse<OwnedStoreItem>> GetOwnedStoreItem(int id);
    }
}
