(function(context,$) {

  "use strict";

  context.JK = context.JK || {};
  context.JK.LeaveSessionWarningDialog = function(app, acceptCallback) {

    var logger = context.JK.logger;
    var dialogId = 'leave-session-warning';
    var $scopeSelector = "[layout-id='leave-session-warning']";

    function events() {
      $('#btn-accept-leave-session', $scopeSelector).click(function(evt) {
        if (acceptCallback) {
          acceptCallback();
        }
        app.layout.closeDialog(dialogId);
      });
    }

    function initialize() {
      events();
    }

    this.initialize = initialize;
  };
})(window,jQuery);
