import { Component } from '@angular/core';
import { AppSwitcherService } from './app-switcher.service';
import * as i0 from "@angular/core";
import * as i1 from "./app-switcher.service";
import * as i2 from "@angular/common";
import * as i3 from "../common/loading.component";
import * as i4 from "../product-experience/product-experience.directive";
import * as i5 from "./app-icon.component";
import * as i6 from "../common/humanize-app-name.pipe";
import * as i7 from "./app-href.pipe";
import * as i8 from "./is-active-app.pipe";
export class AppSwitcherInlineComponent {
    constructor(switcherService) {
        this.switcherService = switcherService;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppSwitcherInlineComponent, deps: [{ token: i1.AppSwitcherService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AppSwitcherInlineComponent, selector: "c8y-app-switcher-inline", ngImport: i0, template: "<div\n  class=\"d-flex a-i-center j-c-center p-4\"\n  *ngIf=\"!(switcherService.finishedLoading$ | async)\"\n>\n  <c8y-loading></c8y-loading>\n</div>\n<ng-container *ngIf=\"switcherService.oneCloudApps$ | async as oneCloudApps\">\n  <div\n    class=\"app-switcher-sagcloud\"\n    *ngIf=\"oneCloudApps.length > 0\"\n  >\n    <a\n      class=\"appLink\"\n      title=\"{{ app.name | humanizeAppName | async }}\"\n      *ngFor=\"let app of oneCloudApps\"\n      [href]=\"app | appHref\"\n      c8yProductExperience\n      [actionName]=\"'appSwitched'\"\n      [actionData]=\"{ applicationName: app && app.name }\"\n    >\n      <c8y-app-icon\n        [app]=\"app\"\n        [name]=\"app.name\"\n        [contextPath]=\"app.contextPath\"\n      ></c8y-app-icon>\n      <span class=\"text-truncate-wrap\">{{ app | humanizeAppName | async }}</span>\n    </a>\n  </div>\n</ng-container>\n<div\n  class=\"app-switcher\"\n  *ngIf=\"switcherService.apps$ | async as apps\"\n>\n  <a\n    class=\"appLink\"\n    title=\"{{ app.name | humanizeAppName | async }}\"\n    [ngClass]=\"(app | isActiveApp | async) ? 'active' : ''\"\n    *ngFor=\"let app of apps\"\n    [href]=\"app | appHref : true\"\n    [rel]=\"app.type === 'EXTERNAL' ? 'noopener noreferrer' : ''\"\n    c8yProductExperience\n    [actionName]=\"'appSwitched'\"\n    [actionData]=\"{ applicationName: app && app.name }\"\n  >\n    <c8y-app-icon\n      [app]=\"app\"\n      [name]=\"app.name\"\n      [contextPath]=\"app.contextPath\"\n    ></c8y-app-icon>\n    <span class=\"text-truncate-wrap\">{{ app | humanizeAppName | async }}</span>\n  </a>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "directive", type: i4.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i5.AppIconComponent, selector: "c8y-app-icon", inputs: ["contextPath", "name", "app"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.HumanizeAppNamePipe, name: "humanizeAppName" }, { kind: "pipe", type: i7.AppHrefPipe, name: "appHref" }, { kind: "pipe", type: i8.IsActiveAppPipe, name: "isActiveApp" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppSwitcherInlineComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-app-switcher-inline', template: "<div\n  class=\"d-flex a-i-center j-c-center p-4\"\n  *ngIf=\"!(switcherService.finishedLoading$ | async)\"\n>\n  <c8y-loading></c8y-loading>\n</div>\n<ng-container *ngIf=\"switcherService.oneCloudApps$ | async as oneCloudApps\">\n  <div\n    class=\"app-switcher-sagcloud\"\n    *ngIf=\"oneCloudApps.length > 0\"\n  >\n    <a\n      class=\"appLink\"\n      title=\"{{ app.name | humanizeAppName | async }}\"\n      *ngFor=\"let app of oneCloudApps\"\n      [href]=\"app | appHref\"\n      c8yProductExperience\n      [actionName]=\"'appSwitched'\"\n      [actionData]=\"{ applicationName: app && app.name }\"\n    >\n      <c8y-app-icon\n        [app]=\"app\"\n        [name]=\"app.name\"\n        [contextPath]=\"app.contextPath\"\n      ></c8y-app-icon>\n      <span class=\"text-truncate-wrap\">{{ app | humanizeAppName | async }}</span>\n    </a>\n  </div>\n</ng-container>\n<div\n  class=\"app-switcher\"\n  *ngIf=\"switcherService.apps$ | async as apps\"\n>\n  <a\n    class=\"appLink\"\n    title=\"{{ app.name | humanizeAppName | async }}\"\n    [ngClass]=\"(app | isActiveApp | async) ? 'active' : ''\"\n    *ngFor=\"let app of apps\"\n    [href]=\"app | appHref : true\"\n    [rel]=\"app.type === 'EXTERNAL' ? 'noopener noreferrer' : ''\"\n    c8yProductExperience\n    [actionName]=\"'appSwitched'\"\n    [actionData]=\"{ applicationName: app && app.name }\"\n  >\n    <c8y-app-icon\n      [app]=\"app\"\n      [name]=\"app.name\"\n      [contextPath]=\"app.contextPath\"\n    ></c8y-app-icon>\n    <span class=\"text-truncate-wrap\">{{ app | humanizeAppName | async }}</span>\n  </a>\n</div>\n" }]
        }], ctorParameters: () => [{ type: i1.AppSwitcherService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLXN3aXRjaGVyLWlubGluZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb3JlL2FwcGxpY2F0aW9uL2FwcC1zd2l0Y2hlci1pbmxpbmUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vY29yZS9hcHBsaWNhdGlvbi9hcHAtc3dpdGNoZXItaW5saW5lLmNvbXB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