// Generated by CoffeeScript 1.11.1
(function() {
  var minimistOptions, pairs2obj;

  pairs2obj = function(pairs) {
    var i, key, len, o, ref, value;
    o = {};
    for (i = 0, len = pairs.length; i < len; i++) {
      ref = pairs[i], key = ref[0], value = ref[1];
      o[key] = value;
    }
    return o;
  };

  minimistOptions = function(readme) {
    var option;
    return {
      boolean: (function() {
        var i, len, ref, results;
        ref = readme.options;
        results = [];
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          if (option.argument == null) {
            results.push(option.short);
          }
        }
        return results;
      })(),
      string: (function() {
        var i, len, ref, results;
        ref = readme.options;
        results = [];
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          if (option.argument != null) {
            results.push(option.short);
          }
        }
        return results;
      })(),
      alias: pairs2obj((function() {
        var i, len, ref, results;
        ref = readme.options;
        results = [];
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          if (option.long != null) {
            results.push([option.short, option.long]);
          }
        }
        return results;
      })()),
      stopEarly: false
    };
  };

  module.exports = function(readme) {
    return {
      options: function() {
        return minimistOptions(readme);
      },
      help: function() {
        return require("./help")(readme);
      },
      manpage: function() {
        return require("./manpage")(readme);
      }
    };
  };

}).call(this);
