using Adaptation.Shared;
using Adaptation.Shared.Duplicator;
using Adaptation.Shared.Methods;
using Microsoft.TeamFoundation.WorkItemTracking.WebApi;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Net.Http;
using System.Text.Json;

namespace Adaptation.FileHandlers.json;

public class ProcessData : IProcessData
{

    private readonly List<object> _Details;

    List<object> Shared.Properties.IProcessData.Details => _Details;

    public ProcessData(IFileRead fileRead,
                       Logistics logistics,
                       List<FileInfo> fileInfoCollection,
                       HttpClient httpClient,
                       string basePage,
                       string api,
                       string query,
                       WorkItemTrackingHttpClient workItemTrackingHttpClient,
                       string project,
                       ReadOnlyDictionary<string, string> assignedToNameToEncodedPAT,
                       ReadOnlyDictionary<string, string> assignedToNameToUser,
                       ReadOnlyDictionary<string, string> requestorNameToUser,
                       string json,
                       bool forceUpdatedBy,
                       bool forceDeleteUpdatedBy)
    {
        fileInfoCollection.Clear();
        _Details = new List<object>();
        Parse();
    }

    string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) =>
        throw new Exception(string.Concat("See ", nameof(Parse)));

    Tuple<string, Test[], JsonElement[], List<FileInfo>> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection) =>
        new(logistics.Logistics1[0], Array.Empty<Test>(), Array.Empty<JsonElement>(), fileInfoCollection);

    internal static List<Description> GetDescriptions(JsonElement[] jsonElements) =>
        throw new NotImplementedException();

    private void Parse() =>
        throw new NotImplementedException();

}