using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InsiderAttackdetector.PM4Py
{
    /// <summary>
    /// Class responsible for running the PM4Py script.
    /// </summary>
    public class PMCommander
    {
        public static void RunProcessMining(string logPath)
        {
            string pathToPMResult = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName, logPath.Replace(".csv", ""));
            
            string strCmdText = $"/C python {Config.PM4PY_SCRIPT_PATH} {logPath} {pathToPMResult} {Config.CASE_ID} {Config.ACTIVITY} {Config.TIMESTAMP}";

            Process.Start("CMD.exe", strCmdText);
        }
    }
}
