import { Component, ContentChild } from '@angular/core';
import { BsTreeviewComponent } from '../treeview/treeview.component';
import * as i0 from "@angular/core";
import * as i1 from "../treeview/treeview.component";
import * as i2 from "@mintplayer/ng-bootstrap/list-group";
import * as i3 from "@mintplayer/ng-bootstrap/icon";
import * as i4 from "@angular/common";
export class BsTreeviewItemComponent {
    constructor(parent) {
        this.parent = parent;
    }
    onClick(ev) {
        if (this.childTree) {
            this.childTree.isExpanded = !this.childTree.isExpanded;
        }
    }
}
BsTreeviewItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsTreeviewItemComponent, deps: [{ token: i1.BsTreeviewComponent }], target: i0.ɵɵFactoryTarget.Component });
BsTreeviewItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BsTreeviewItemComponent, selector: "bs-treeview-item", queries: [{ propertyName: "childTree", first: true, predicate: BsTreeviewComponent }], ngImport: i0, template: "<bs-list-group-item (click)=\"onClick($event)\" class=\"d-block cursor-pointer list-group-item-action\">\n    <span [style.padding-left.px]=\"parent.indentation$ | async\">\n        <bs-icon [icon]=\"'chevron-right'\" [class.open]=\"childTree?.isExpanded$ | async\" [class.invisible]=\"!childTree\" class=\"d-inline-block me-2\"></bs-icon>\n        <ng-content></ng-content>\n    </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n", styles: ["bs-list-group-item{margin-bottom:-1px}bs-icon{transition:transform .2s}bs-icon.open{transform:rotate(90deg)}\n"], dependencies: [{ kind: "component", type: i2.BsListGroupItemComponent, selector: "bs-list-group-item" }, { kind: "component", type: i3.BsIconComponent, selector: "bs-icon", inputs: ["icon"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsTreeviewItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-treeview-item', template: "<bs-list-group-item (click)=\"onClick($event)\" class=\"d-block cursor-pointer list-group-item-action\">\n    <span [style.padding-left.px]=\"parent.indentation$ | async\">\n        <bs-icon [icon]=\"'chevron-right'\" [class.open]=\"childTree?.isExpanded$ | async\" [class.invisible]=\"!childTree\" class=\"d-inline-block me-2\"></bs-icon>\n        <ng-content></ng-content>\n    </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n", styles: ["bs-list-group-item{margin-bottom:-1px}bs-icon{transition:transform .2s}bs-icon.open{transform:rotate(90deg)}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.BsTreeviewComponent }]; }, propDecorators: { childTree: [{
                type: ContentChild,
                args: [BsTreeviewComponent, { descendants: false }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZXZpZXctaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctYm9vdHN0cmFwL3RyZWV2aWV3L3NyYy90cmVldmlldy1pdGVtL3RyZWV2aWV3LWl0ZW0uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9taW50cGxheWVyLW5nLWJvb3RzdHJhcC90cmVldmlldy9zcmMvdHJlZXZpZXctaXRlbS90cmVldmlldy1pdGVtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFnQixNQUFNLGVBQWUsQ0FBQztBQUN0RSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQzs7Ozs7O0FBT3JFLE1BQU0sT0FBTyx1QkFBdUI7SUFFbEMsWUFBWSxNQUEyQjtRQUNyQyxJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztJQU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