// Generated by CoffeeScript 1.8.0

/* (C) 2014 Narazaka : Licensed under The MIT License - http://narazaka.net/license/MIT?2014 */

(function() {
  var NanikaEventDefinition, choiceex_headers;

  NanikaEventDefinition = this.NanikaEventDefinition;

  if (NanikaEventDefinition == null) {
    NanikaEventDefinition = {};
  }

  choiceex_headers = function(nanika, args) {
    var headers, index, value, _i, _len, _ref;
    headers = {
      Reference0: args.label,
      Reference1: args.id
    };
    if (args.args != null) {
      _ref = args.args;
      for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
        value = _ref[index];
        headers["Reference" + (index + 2)] = value;
      }
    }
    return headers;
  };

  NanikaEventDefinition.choiceselect = {
    request: {
      id: 'OnChoiceSelect',
      headers: {
        id: 0
      }
    }
  };

  NanikaEventDefinition.choiceselectex = {
    request: {
      id: 'OnChoiceSelectEx',
      headers: choiceex_headers
    }
  };

  NanikaEventDefinition.choicehover = {
    request: {
      id: 'OnChoiceHover',
      headers: choiceex_headers
    }
  };

  NanikaEventDefinition.choiceenter = {
    request: {
      method: 'NOTIFY',
      submethod: null,
      id: 'OnChoiceEnter',
      headers: choiceex_headers
    }
  };

  NanikaEventDefinition.choicetimeout = {
    request: {
      id: 'OnChoiceTimeout',
      headers: {
        script: 0
      }
    }
  };

  NanikaEventDefinition.anchorselect = {
    request: {
      id: 'OnAnchorSelect',
      headers: {
        id: 0
      }
    }
  };

  NanikaEventDefinition.anchorselectex = {
    request: {
      id: 'OnAnchorSelectEx',
      headers: choiceex_headers
    }
  };

  this.NanikaEventDefinition = NanikaEventDefinition;

}).call(this);
