'use strict';

var angular = require('angular');
require('./modules');

angular
  .module('infoDisplay')
  .run(run);

/** @ngInject */
function run(AppConfig, ModelService, $rootScope, appInitFlowService) {
  AppConfig.addModule({
    moduleName: 'infoDisplay',
    state: 'info-infoGroup',
    text: '信息发布',
    moduleClass: 'icon ion-clipboard',
    order: 1500
  });

  $rootScope.$on('actionSuccess', function($event, actionName) {
    if (actionName === appInitFlowService.AUTHENTICATE) {
      ModelService.refreshStorageModel();
    }
  });
}
