import { Component, Input, Inject, Optional, } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { NZ_ROOT_CONFIG, createNzRootInitializer } from './nz-root-config';
var NzRootComponent = (function () {
    function NzRootComponent(_document, 
        // Cannot use type annotation here due to https://github.com/angular/angular-cli/issues/2034
        // Should be revisited after AOT being made the only option
        options) {
        this._document = _document;
        this.options = options;
    }
    NzRootComponent.prototype.ngOnInit = function () {
        if (this.nzExtraFontName && this.nzExtraFontUrl && !this.options) {
            var options = { extraFontName: this.nzExtraFontName, extraFontUrl: this.nzExtraFontUrl };
            var initializer = createNzRootInitializer(this._document, options);
            initializer();
        }
    };
    return NzRootComponent;
}());
export { NzRootComponent };
NzRootComponent.decorators = [
    { type: Component, args: [{
                selector: '[nz-root],nz-root',
                template: "\n    <ng-content></ng-content>\n  ",
            },] },
];
/** @nocollapse */
NzRootComponent.ctorParameters = function () { return [
    { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] },] },
    { type: undefined, decorators: [{ type: Inject, args: [NZ_ROOT_CONFIG,] }, { type: Optional },] },
]; };
NzRootComponent.propDecorators = {
    'nzExtraFontName': [{ type: Input },],
    'nzExtraFontUrl': [{ type: Input },],
};
