import { Component, TemplateRef, ContentChildren, QueryList, HostBinding } from '@angular/core';
var GridComponent = (function () {
    function GridComponent() {
        this.gridItems = new Array();
        this.gridType = 'grid';
        this.gridCols = 3;
        this.templates = new Array();
    }
    GridComponent.prototype.ngAfterContentInit = function () {
        if (!!this.contentTpls) {
            this.templates = this.templates.concat(this.contentTpls._results);
        }
        if (!!this.iContentTpls) {
            this.templates = this.templates.concat(this.iContentTpls._results);
        }
    };
    GridComponent.decorators = [
        { type: Component, args: [{
                    selector: 'grid',
                    inputs: [
                        'gridItems: grid-items',
                        'gridType: grid-type',
                        'gridCols: grid-columns',
                        'iContentTpls: grid-templates'
                    ],
                    template: "\n    <ng-template ngFor let-contentTpl [ngForOf]=\"templates\">\n        <div class=\"grid-item\" *ngFor=\"let item of gridItems\">\n            <ng-template ngFor [ngForOf]=\"[item]\" [ngForTemplate]=\"contentTpl\"></ng-template>\n        </div>\n    </ng-template>\n  ",
                    styles: ["\n    :host{display:block;columns:3 24em}:host .grid-item{display:inline-block;flex:1 1 auto;width:100%}:host.column{display:flex;flex-direction:column}:host.column-reverse{display:flex;flex-direction:column-reverse}:host.row{display:flex;flex-direction:row}:host.row .grid-item{width:initial}\n  "]
                },] },
    ];
    GridComponent.propDecorators = {
        contentTpls: [{ type: ContentChildren, args: [TemplateRef,] }],
        gridType: [{ type: HostBinding, args: ['class',] }],
        gridCols: [{ type: HostBinding, args: ['style.columnCount',] }]
    };
    return GridComponent;
}());
export { GridComponent };
//# sourceMappingURL=grid.component.js.map