/**
* @module lifterPrompts
*/
var validation = require('../validation/validation.js');

/**
* Object containing questions for CLI (each within their own object)
* @object
* @memberof module:lifterPrompts
* @param {object} obj Object of objects each containing a question asked within command line interface, possible selectionoptions (if any), validation methods and conditional next questions
*/
var promptList = {
  username: {
    promptText: 'Please ensure you are in the parent directory of your application before continuing with Lifter Config\n' +
      'What is your Docker Hub username?\nIf you don\'t have a Docker Hub account, ' +
      'get one at https://hub.docker.com/account/signup/',
    promptClass: 'username',
    validation: validation.hasValue,
    nextClass: function() {return 'containerName';}
  },

/*
  password: {
    promptText: 'What is your dockerHub password?',
    promptClass: 'password',
    validation: validation.authenticateUser,
    nextClass: 'containerName'
  },
*/

  containerName: {
    promptText: 'Name your Docker container',
    promptClass: 'containerName',
    validation: validation.hasValue,
    nextClass: function() {return 'repoName';}
  },

  repoName: {
    promptText: 'Name your repo',
    promptClass: 'repoName',
    validation: validation.isValidRepoName,
    nextClass: function() {return 'launchCommand';}
  },

  launchCommand: {
    promptText: 'Enter the command you want to launch when you start up your container.',
    promptClass: 'launchCommand',
    validation: validation.hasValue,
    nextClass: function() {return 'portPrivate';}
  },

  // launchPath: {
  //   promptText: 'What is the filepath that corresponds to your command? \nType \'.\' if you want to execute your command this directory.',
  //   promptClass: 'launchPath',
  //   validation: validation.hasValue,
  //   nextClass: function() {return 'portPrivate';}
  // },

  portPrivate: {
    promptText: 'What port does your application use? (Example: 49160)',
    promptClass: 'portPrivate',
    validation: validation.inPortRange,
    nextClass: function() {return 'portPublic';}
  },

  portPublic: {
    promptText: 'What port can access your Docker container? (Example: 80)',
    promptClass: 'portPublic',
    validation: validation.inPortRange,
    nextClass: function() {return 'db';}
  },

  // Future Linux OS options may include 'Ubuntu', 'Fedora', 'Red Hat', 'Linux'
/*
  linuxOS: {
    promptText: 'Pick an OS',
    promptOptions: ['centos:6'],
    yamlSyntax: {'centos:6': 'centos:centos6'},
    promptClass: 'linuxOS',
    validation: validation.inOptions,
    nextClass: function() {return 'envVar';}
  },
*/

/*
  envVar: {
    promptText: 'Enter any environmental variables your app needs to run.',
    promptClass: 'envVar',
    validation: validation.noValidation,
    nextClass: function() {return 'db';}
  },
*/

  db: {
    promptText: 'Pick a database',
    promptOptions: ['mongoDB', 'mySQL', 'redis', 'No Database'],
    yamlSyntax: {'mongoDB': 'mongoDB', 'mySQL': 'mySQL', 'redis': 'redis', 'No Database': 'None'},
    promptClass: 'db',
    validation: validation.inOptions,
    nextClass: function() {return null;}
  },

  // Temporarily disabling scaffolding (feature has not been developed yet)
  // scaffolding: {
  //   promptText: 'Do you want scaffolding?',
  //   promptOptions: ['Yes!', 'Nope.'],
  //   promptClass: 'scaffolding',
  //   validation: validation.inOptions,
  //   nextClass: function(answer) {
  //     console.log('In nextClass key of scaffolding');
  //     if(answer === 'Yes!') {
  //       return 'appServer';
  //     } else {
  //       return null;
  //     }
  //   }
  // },

  // appServer: {
  //   promptText: 'Pick a back end',
  //   promptOptions: ['Node with Express', 'Node without Express', 'Apache'],
  //   promptClass: 'appServer',
  //   validation: validation.inOptions,
  //   nextClass: function() {return 'mvc';}
  // },
  //
  //
  // mvc: {
  //   promptText: 'Pick an MVC',
  //   promptOptions: ['Angular', 'Backbone', 'No MVC'],
  //   promptClass: 'mvc',
  //   validation: validation.inOptions,
  //   nextClass: function() {return null;}
  // },

};

module.exports = {
  promptList : promptList
}

@@ -1586,30 +1586,29 @@
 eturn 'portP
-rivate
+ublic
 ';%7D%0A  %7D,%0A%0A  
@@ -1909,22 +1909,21 @@
 %0A  portP
-rivate
+ublic
 : %7B%0A    
@@ -1949,33 +1949,40 @@
 ort 
-does your application use
+can access your Docker container
 ? (E
@@ -1993,12 +1993,9 @@
 le: 
-4916
+8
 0)',
@@ -2018,22 +2018,21 @@
 : 'portP
-rivate
+ublic
 ',%0A    v
@@ -2098,37 +2098,38 @@
 ) %7Breturn 'portP
-ublic
+rivate
 ';%7D%0A  %7D,%0A%0A  port
@@ -2121,37 +2121,38 @@
 ;%7D%0A  %7D,%0A%0A  portP
-ublic
+rivate
 : %7B%0A    promptTe
@@ -2170,40 +2170,33 @@
 ort 
-can acc
+do
 es
-s
  your 
-Docker container
+application use
 ? (E
@@ -2195,33 +2195,36 @@
  use? (Example: 
-8
+4916
 0)',%0A    promptC
@@ -2227,37 +2227,38 @@
 mptClass: 'portP
-ublic
+rivate
 ',%0A    validatio
@@ -2327,24 +2327,26 @@
 db';%7D%0A  %7D,%0A%0A
+%0A%0A
   // Future 
@@ -2908,24 +2908,137 @@
  database',%0A
+    promptOptions: %5B'mongoDB', 'No Database'%5D,%0A    yamlSyntax: %7B'mongoDB': 'mongoDB', 'No Database': 'None'%7D,%0A/*%0A
     promptOp
@@ -3185,24 +3185,27 @@
 ': 'None'%7D,%0A
+*/%0A
     promptCl

Change prompts for order and db options