import { Command, Option } from 'commander';
import Config              from '../config/Config';


class GlobalHelper {
    public runCommandDefinition(command: Command) {
        command
        .option('-p, --path <value>', 'assignment path', Config.folders.defaultLocalExercise)
        .option('-v, --verbose', 'verbose mode - display principal container output in live')
        .addOption(new Option('-w, --super-verbose', 'verbose mode - display all docker compose logs (build included) in live').conflicts('verbose'))
        .addOption(new Option('--verbose-ssj2').hideHelp().implies({ superVerbose: true }));

        return command;
    }

    public completionCommandDefinition(command: Command) {
        command
        .option('-f, --file <filename>')
        .option('-y, --force', 'don\'t ask for file overwrite confirmation');

        return command;
    }
}


export default new GlobalHelper();