package io

import com.xenomachina.argparser.ArgParser
import com.xenomachina.argparser.default

class GhentPrologArgParser(parser: ArgParser) {
    val script by parser.adding("-s", "--script", help = "Script to run")
    val repl by parser.flagging("-r", "--repl", help = "Start the REPL")

    val verbosity by parser.mapping(
        "--vvv" to Logger.Level.DEBUG,
        "--debug" to Logger.Level.DEBUG,
        "--vv" to Logger.Level.INFO,
        "--verbose" to Logger.Level.INFO,
        "--info" to Logger.Level.INFO,
        "-v" to Logger.Level.WARN,
        "--warn" to Logger.Level.WARN,
        "--error" to Logger.Level.ERROR,
        help = "Set the verbosity level (default: WARN)",
    ).default(Logger.defaultLevel)
}