/* exported Theme */
/*global $, WrapperController, CommonController, Picture, JQueryLibrary, Bootstrap, ControlsDictionary, BootstrapTypography */

function Theme() {
    'use strict';
    this.favicon = new Picture();
    this.additionalCss = '';
    this.additionalHead = '';
    this.direction = 'ltr';
    this.jQuery = new JQueryLibrary();
    this.bootstrap = new Bootstrap();
    this.templates = new ControlsDictionary();
    this.controls = new ControlsDictionary();
    this.prototypes = new ControlsDictionary();

    WrapperController.make(this, Theme);
    this.css('TypographyTextLinkPassive', 'color', '@bd-link-color');
    this.css('TypographyTextLinkHovered', 'color', '@bd-link-color-hover');
    this.css('TypographyTextLinkHovered', 'text-decoration', 'underline');
}

Theme.prototype.beforeBuild = function () {
    'use strict';
    this.templates._denyBuild = true;
    this.controls._denyBuild = true;
    this.prototypes._denyBuild = true;
};

Theme.prototype.afterBuild = function (result) {
    'use strict';
    result.remove('/result/page.html');
    return result;
};

$(document).on('controlDefined', function () {
    'use strict';
    CommonController.setCommon(Theme, BootstrapTypography);
});