'use strict';

/**
 * UI module used for small common ui widgets used accross entire application.
 * Including:
 *   UI
 */

angular.module('system.services.ext', [
    'config.services'
])
    .service('Ext', [
        '$rootScope',
        'Config',
        function($rootScope, Config) {

            var icon = function (value) {
                if (value == '.pdf')
                    return 'circle circle-pdf';
                if (value == '.ppt')
                    return 'circle circle-ppt';
                if (value == '.doc' || value == '.docx')
                     return 'circle circle-word';
                if (value == '.xls' || value == '.xlsx')
                    return 'circle circle-excel';
                if (value == '.ppt' || value == '.pptx')
                    return 'circle circle-ppt';
                if (value == '.rar')
                    return 'circle circle-rar';
                if (value == '.zip')
                    return 'circle circle-zip';
                else
                    return 'circle circle-small blue';

            };

            return {
                icon: icon
            };
        }
    ]);


