// Generated by CoffeeScript 1.7.1
var LayerCreator, layerCreator;

LayerCreator = (function() {
  function LayerCreator() {
    var input, layers;
    input = prompt("Enter layer names separated by underscores: ", "Eg: My layer 1, My layer 2, My other layer");
    if (input) {
      layers = input.split(/, ?\n?\r?/);
      this.createLayers(layers);
    }
  }

  LayerCreator.prototype.createLayers = function(layers) {
    var layer, newLayer, _i, _len, _ref, _results;
    _ref = layers.reverse();
    _results = [];
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      layer = _ref[_i];
      newLayer = app.activeDocument.layers.add();
      _results.push(newLayer.name = layer);
    }
    return _results;
  };

  return LayerCreator;

})();

layerCreator = new LayerCreator();
