"use strict";

/*
 * TODO
 *  keep scroll position when resize
 *
 *  fix focus outline around links in TOC in FF
 *      dotted border
 */
App.module("MainMenuModule", function(MainMenuModule, App, Backbone, Marionette, $, _, Logger) {

    // Prevent auto start
    MainMenuModule.startWithParent = false;

    // Define options
    var defaultModuleOptions = {
    };
    var moduleOptions;

    // Initialization checker
    var assertModuleIsInitialized = function() {
        if (!$bar) {
            throw "MainMenuModule has not been initialized";
        }
    };

    /**
     * Module initializer
     *
     */
    MainMenuModule.addInitializer(function(options){

        moduleOptions = _.extend(defaultModuleOptions, options);

        MainMenuModule.logger = Logger.get("MainMenuModule");
        MainMenuModule.logger.setLevel(Logger.DEBUG);

        this.barView = new App.MainMenuModule.MainMenuBarView();
    });

    MainMenuModule.flashItem = function(item, times, callback) {
        this.barView.flashItem(item, times, callback);
    }

}, Logger);
