using RealCV.Application.Models;

namespace RealCV.Application.Interfaces;

/// <summary>
/// Service for verifying professional qualifications (FCA, SRA, etc.)
/// </summary>
public interface IProfessionalVerifierService
{
    /// <summary>
    /// Verify if a person is registered with the FCA
    /// </summary>
    Task<ProfessionalVerificationResult> VerifyFcaRegistrationAsync(
        string name,
        string? firmName = null,
        string? referenceNumber = null);

    /// <summary>
    /// Verify if a person is a registered solicitor with the SRA
    /// </summary>
    Task<ProfessionalVerificationResult> VerifySolicitorAsync(
        string name,
        string? sraNumber = null,
        string? firmName = null);

    /// <summary>
    /// Search FCA register for individuals
    /// </summary>
    Task<List<FcaIndividualSearchResult>> SearchFcaIndividualsAsync(string name);

    /// <summary>
    /// Search SRA register for solicitors
    /// </summary>
    Task<List<SraSolicitorSearchResult>> SearchSolicitorsAsync(string name);
}

public sealed record FcaIndividualSearchResult
{
    public required string Name { get; init; }
    public required string IndividualReferenceNumber { get; init; }
    public string? Status { get; init; }
    public List<string>? CurrentFirms { get; init; }
}

public sealed record SraSolicitorSearchResult
{
    public required string Name { get; init; }
    public required string SraNumber { get; init; }
    public string? Status { get; init; }
    public string? CurrentOrganisation { get; init; }
    public string? AdmissionDate { get; init; }
}
