

/*
 ONOS GUI -- Masthead Module
 */
(function () {
    'use strict';

    // injected services
    var $log;

    // configuration
    var mastHeight = 36,
        padMobile = 16;

    angular.module('onosMast', ['onosNav'])
        .controller('MastCtrl', ['$log', 'NavService', function (_$log_, ns) {
            var self = this;

            $log = _$log_;

            // initialize mast controller here...
            self.radio = null;

            // delegate to NavService
            self.toggleNav = function () {
                ns.toggleNav();
            };

            $log.log('MastCtrl has been created');
        }])

        // also define a service to allow lookup of mast height.
        .factory('MastService', ['FnService', function (fs) {
            return {
                mastHeight: function () {
                    return fs.isMobile() ? mastHeight + padMobile : mastHeight;
                }
            }
        }]);

}());
