text: const inquirer = require("inquirer");
  const { runApp } = require("./employee_tracker");
  
  // Adds a new department
  function addDepartment() {
  
  
      inquirer.prompt([
          {
              name: "firstName",
              type: "input",
              message: "Enter employee's first name:",
              validate: confirmStringInput
          },
          {
              name: "lastName",
              type: "input",
              message: "Enter employee's last name:",
              validate: confirmStringInput
          },
          {
              name: "role",
              type: "list",
              message: "Choose employee role:",
              choices: positions.map(obj => obj.title)
          },
          {
              name: "manager",
              type: "list",
              message: "Choose the employee's manager:",
              choices: managers.map(obj => obj.Manager)
          }
      ]).then(answers => {
          let positionDetails = positions.find(obj => obj.title === answers.role);
          let manager = managers.find(obj => obj.Manager === answers.manager);
          db.query("INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES (?)", [[answers.firstName.trim(), answers.lastName.trim(), positionDetails.id, manager.id]]);
          console.log("\x1b[32m", `${answers.firstName} was added to the employee database!`);
          runApp();
      });
  }
  exports.addDepartment = addDepartment;
  