using System.Text.Json.Nodes;

namespace Eis.Application.Candidate;

public sealed record CandidateEndpointResult(int StatusCode, JsonObject Body);

public sealed record CandidateDocumentResult(
    int StatusCode,
    string? Content,
    string? FileName,
    JsonObject? Error);

public interface ICandidateService
{
    Task<CandidateEndpointResult> GetDashboardAsync(string sessionToken, CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetNoticesAsync(string sessionToken, CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetProfileAsync(string sessionToken, CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetExamsAsync(string sessionToken, CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetRegistrationsAsync(string sessionToken, CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetResultsAsync(
        string sessionToken,
        string verificationBaseUrl,
        CancellationToken cancellationToken);

    Task<CandidateEndpointResult> GetAdmissionsAsync(
        string sessionToken,
        string verificationBaseUrl,
        CancellationToken cancellationToken);

    Task<CandidateEndpointResult> UpdateProfileAsync(
        string sessionToken,
        JsonObject body,
        CancellationToken cancellationToken);

    Task<CandidateEndpointResult> CreateRegistrationAsync(
        string sessionToken,
        JsonObject body,
        CancellationToken cancellationToken);

    Task<CandidateEndpointResult> CreateScoreAppealAsync(
        string sessionToken,
        string resultId,
        JsonObject body,
        CancellationToken cancellationToken);

    Task<CandidateDocumentResult> GetAdmitCardAsync(
        string sessionToken,
        string registrationId,
        CancellationToken cancellationToken);

    Task<CandidateEndpointResult> UpdateAdmissionPreferencesAsync(
        string sessionToken,
        string examId,
        JsonObject body,
        CancellationToken cancellationToken);
}
