'use strict';

var BusinessEvent = (function () {

  function _event(name) {
    this.detail = {
      name: name
    };
    this.event = new CustomEvent(name, {
      detail: this.detail
    });
  }

  _event.prototype = {

    trigger: function (data) {
      this.detail.data = data;
      document.dispatchEvent(this.event);
    }
  };

  return _event;
}());
