// Generated by CoffeeScript 1.12.7
var ExampleTrayApp,
  bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  hasProp = {}.hasOwnProperty;

ExampleTrayApp = (function(superClass) {
  extend(ExampleTrayApp, superClass);

  function ExampleTrayApp() {
    this.getDisplay = bind(this.getDisplay, this);
    this.is_allowed = bind(this.is_allowed, this);
    return ExampleTrayApp.__super__.constructor.apply(this, arguments);
  }

  ExampleTrayApp.prototype.is_allowed = function() {
    return true;
  };

  ExampleTrayApp.prototype.getDisplay = function() {
    var button;
    ExampleTrayApp.__super__.getDisplay.call(this);
    button = new LocaButton({
      loca_key: "example.tray.app.button",
      onClick: (function(_this) {
        return function() {
          return CUI.alert({
            text: $$("example.tray.app.thank_you.md"),
            markdown: true
          });
        };
      })(this)
    });
    return CUI.dom.append(this.display, button);
  };

  return ExampleTrayApp;

})(TrayApp);

ez5.session_ready(function() {
  return ez5.tray.registerApp(new ExampleTrayApp());
});
