package solutions.tretter.githugandroid

/**
 * Port of the upstream ruby-githug `number_of_files_committed` level.
 *
 * Setup documents the repository shape the learner explores. Evaluation is kept
 * state-based whenever the exercise changes repository objects; answer-only
 * levels intentionally validate the answer entered at the prompt.
 */
internal fun numberOfFilesCommittedLevel(): Level = level(
    id = "number_of_files_committed",
    title = "Number Of Files Committed",
    description = "There are some files in this repository; how many of them are staged for a commit?",
    hints = listOf("You are looking for a command to identify the status of the repository (resembles a Linux command)."),
    commandSuggestions = listOf("git status"),
    setup = { RepoState(initialized = true, files = listOf(GitFile("rubyfile1.rb", staged = true), GitFile("rubyfile4.rb", staged = true, tracked = true), GitFile("rubyfile5.rb", tracked = true), GitFile("rubyfile6.rb"), GitFile("rubyfile7.rb")), branches = mapOf("master" to 1)) },
    validator = commandAnswer("2"),
    testCases = listOf(
        levelTestCase("answer staged count", "2"),
    ),
)
