define([
    'Global',
    'Text!../html/templates/default.html'
],
    function(Global, template){
        'use strict';

        var defaultView = Backbone.View.extend({
            attributes: {
                'class': "no-calendar-outer"
            },
            initialize: function(){
                var that = this;

                this.defaultTemplate = _.template(template);
                this.listenTo(Global.getUtilities().eventAggregator, "default-view", function(){
                    that.render();
                });

            },
            render: function(){
                var $container = getMainContent().empty();

                this.$el.empty().append(this.defaultTemplate);

                $container.append(this.$el);

                return this;
            }
        });

        defaultView.singleInstance = null;

        defaultView.instance = function () {
            defaultView.singleInstance = defaultView.singleInstance || new defaultView();
            return defaultView.singleInstance;
        };

        return defaultView;

    }

)