(function () {
  'use strict';

  angular
    .module('images')
    .run(menuConfig);

  menuConfig.$inject = ['menuService'];

  function menuConfig(menuService) {
    // Set top bar menu items
    menuService.addMenuItem('topbar', {
      title: 'Submissions',
      state: 'submissions',
      type: 'dropdown',
      roles: ['*']
    });

    // Add the dropdown list item
    menuService.addSubMenuItem('topbar', 'submissions', {
      title: 'Submit an Image',
      state: 'images.list'
    });

    // Add the dropdown create item
    menuService.addSubMenuItem('topbar', 'submissions', {
      title: 'Submit an Attribute',
      state: 'attributes.list'
    });
  }
}());
