using IS_Lab2_XMLJson;

if (args.Length != 3)
{
    Console.WriteLine("Usage: <mode> <input file> <output file>");
    Console.WriteLine("Modes: json-to-xml | xml-to-json");
    return;
}

var mode = args[0];
var inputFile = args[1];
var outputFile = args[2];

switch (mode.ToLower())
{
    case "json-to-xml":
        XmlJsonConverter.JsonToXml(inputFile, outputFile);
        break;
    case "xml-to-json":
        XmlJsonConverter.XmlToJson(inputFile, outputFile);
        break;
    default:
        Console.WriteLine("Invalid mode. Use 'json-to-xml' or 'xml-to-json'.");
        return;
}

Console.WriteLine("Conversion complete.");