import { Component, EventEmitter, Input, Output } from '@angular/core';
export class RTreeNodeComponent {
    constructor() {
        this.expanded = false;
        this.hasEdit = false;
        this.onEditClick = new EventEmitter();
    }
    toggle() {
        this.expanded = !this.expanded;
    }
}
RTreeNodeComponent.decorators = [
    { type: Component, args: [{
                selector: 'r-tree-node',
                template: "<header>\r\n  <button (click)=\"toggle()\" mat-icon-button>\r\n    <!-- <mat-icon [class.expanded]=\"expanded\">keyboard_arrow_down</mat-icon> -->\r\n  </button>\r\n  <button *ngIf=\"hasEdit\" (click)=\"expanded = true; onEditClick.emit();\" r-icon-button>\r\n    <!-- <mat-icon>edit</mat-icon> -->\r\n  </button>\r\n  <span>{{title}}</span>\r\n</header>\r\n<ng-container *ngIf=\"expanded\">\r\n  <ul>\r\n    <ng-content></ng-content>\r\n  </ul>\r\n  <ng-content select=\"r-tree-node\"></ng-content>\r\n</ng-container>\r\n",
                styles: [":host{display:flex;flex-direction:column;padding-left:20px}:host button[mat-icon-button] mat-icon{transform:rotate(-90deg)}:host button[mat-icon-button] mat-icon.expanded{transform:rotate(0)}:host ul{list-style:none;margin-left:20px}"]
            },] }
];
RTreeNodeComponent.propDecorators = {
    title: [{ type: Input }],
    expanded: [{ type: Input }],
    hasEdit: [{ type: Input }],
    onEditClick: [{ type: Output }]
};
//# sourceMappingURL=r-tree-node.component.js.map