import { Component } from '@angular/core';
import { AppStateService } from '../../common';
import { filter } from 'rxjs/operators';
import * as i0 from "@angular/core";
import * as i1 from "../../common";
import * as i2 from "../../application/app-icon.component";
import * as i3 from "@angular/common";
import * as i4 from "../../common/humanize-app-name.pipe";
export class NavigatorTopComponent {
    constructor(ui) {
        this.ui = ui;
        this.app$ = this.ui.currentApplication.pipe(filter(app => !!app));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavigatorTopComponent, deps: [{ token: i1.AppStateService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: NavigatorTopComponent, selector: "header[c8y-navigator-top]", host: { classAttribute: "title navigator-slot-top" }, ngImport: i0, template: "<c8y-app-icon\n  [name]=\"(app$ | async).name\"\n  [contextPath]=\"(app$ | async).contextPath || (ui.state$ | async).app.contextPath\"\n  [app]=\"(app$ | async) || (ui.state$ | async).app\"\n></c8y-app-icon>\n<span>{{ app$ | async | humanizeAppName | async }}</span>\n", dependencies: [{ kind: "component", type: i2.AppIconComponent, selector: "c8y-app-icon", inputs: ["contextPath", "name", "app"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.HumanizeAppNamePipe, name: "humanizeAppName" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavigatorTopComponent, decorators: [{
            type: Component,
            args: [{ selector: 'header[c8y-navigator-top]', host: {
                        class: 'title navigator-slot-top'
                    }, template: "<c8y-app-icon\n  [name]=\"(app$ | async).name\"\n  [contextPath]=\"(app$ | async).contextPath || (ui.state$ | async).app.contextPath\"\n  [app]=\"(app$ | async) || (ui.state$ | async).app\"\n></c8y-app-icon>\n<span>{{ app$ | async | humanizeAppName | async }}</span>\n" }]
        }], ctorParameters: () => [{ type: i1.AppStateService }] });
//# sourceMappingURL=data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