import { Component } from '@angular/core';
import { map } from 'rxjs/operators';
import { AppStateService } from '../../common/ui-state.service';
import { HeaderService } from '../../header/header.service';
import { PRODUCT_EXPERIENCE_CORE_SHARED } from '../../shared/core.model';
import { legalNoticesItem } from '../defaults.items';
import { DocsService } from '../docs.service';
import * as i0 from "@angular/core";
import * as i1 from "../docs.service";
import * as i2 from "../../common/ui-state.service";
import * as i3 from "../../header/header.service";
import * as i4 from "../../common/icon.directive";
import * as i5 from "@angular/common";
import * as i6 from "../../common/component-outlet.directive";
import * as i7 from "ngx-bootstrap/collapse";
import * as i8 from "../../product-experience/product-experience.directive";
import * as i9 from "../../i18n/c8y-translate.pipe";
export class HelpAndSupportOutletComponent {
    constructor(docsService, appState, headerService) {
        this.docsService = docsService;
        this.appState = appState;
        this.headerService = headerService;
        this.PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE_CORE_SHARED;
        this.documentationOpen = false;
        this.helpAndSupport$ = this.docsService.items$.pipe(map(items => items.filter(item => item.type === 'doc' && item.label !== legalNoticesItem.label)));
        this.appState$ = this.appState.state$;
        this.drawerOpen$ = this.headerService.rightDrawerOpen$;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: HelpAndSupportOutletComponent, deps: [{ token: i1.DocsService }, { token: i2.AppStateService }, { token: i3.HeaderService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: HelpAndSupportOutletComponent, selector: "c8y-help-and-support-outlet", ngImport: i0, template: "<ng-container *ngIf=\"helpAndSupport$ | async as helpAndSupport\">\n  <div\n    class=\"separator-top p-t-8 p-b-8\"\n    *ngIf=\"(appState$ | async).showRightDrawer && helpAndSupport.length\"\n  >\n    <button\n      class=\"c8y-right-drawer__link sticky-top\"\n      [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n      [attr.aria-expanded]=\"documentationOpen\"\n      [attr.aria-controls]=\"'collapseDocs'\"\n      type=\"button\"\n      (click)=\"documentationOpen = !documentationOpen\"\n    >\n      <i c8yIcon=\"book-shelf\"></i>\n      <span class=\"text-bold\">{{ 'Documentation' | translate }}</span>\n      <i\n        class=\"m-l-auto\"\n        c8yIcon=\"angle-down\"\n        [ngClass]=\"{ 'icon-rotate-180': documentationOpen }\"\n      ></i>\n    </button>\n    <div\n      class=\"collapse\"\n      id=\"collapseDocs\"\n      [collapse]=\"!documentationOpen\"\n      [isAnimated]=\"true\"\n      #documentationCol=\"bs-collapse\"\n    >\n      <ng-container *ngFor=\"let link of helpAndSupport\">\n        <ng-container *ngIf=\"link.component\">\n          <ng-container *c8yComponentOutlet=\"link.component; environmentInjector: link.injector\"></ng-container>\n        </ng-container>\n        <a\n          class=\"c8y-right-drawer__link\"\n          title=\"{{ link.label | translate }}\"\n          [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n          type=\"button\"\n          target=\"_blank\"\n          *ngIf=\"!link.component\"\n          rel=\"noopener noreferrer\"\n          [href]=\"link.url\"\n          c8yProductExperience\n          [actionName]=\"PRODUCT_EXPERIENCE.QUICK_LINKS.EVENTS.QUICK_LINK_RIGHT_DRAWER\"\n          [actionData]=\"{\n            component: PRODUCT_EXPERIENCE.QUICK_LINKS.COMPONENTS.RIGHT_DRAWER_COMPONENT,\n            action: link.label\n          }\"\n        >\n          <span\n            class=\"text-truncate text-12\"\n            title=\"{{ link.label | translate }}\"\n          >\n            {{ link.label | translate }}\n          </span>\n        </a>\n      </ng-container>\n    </div>\n  </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i4.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector"] }, { kind: "directive", type: i7.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "directive", type: i8.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "pipe", type: i9.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: HelpAndSupportOutletComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-help-and-support-outlet', template: "<ng-container *ngIf=\"helpAndSupport$ | async as helpAndSupport\">\n  <div\n    class=\"separator-top p-t-8 p-b-8\"\n    *ngIf=\"(appState$ | async).showRightDrawer && helpAndSupport.length\"\n  >\n    <button\n      class=\"c8y-right-drawer__link sticky-top\"\n      [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n      [attr.aria-expanded]=\"documentationOpen\"\n      [attr.aria-controls]=\"'collapseDocs'\"\n      type=\"button\"\n      (click)=\"documentationOpen = !documentationOpen\"\n    >\n      <i c8yIcon=\"book-shelf\"></i>\n      <span class=\"text-bold\">{{ 'Documentation' | translate }}</span>\n      <i\n        class=\"m-l-auto\"\n        c8yIcon=\"angle-down\"\n        [ngClass]=\"{ 'icon-rotate-180': documentationOpen }\"\n      ></i>\n    </button>\n    <div\n      class=\"collapse\"\n      id=\"collapseDocs\"\n      [collapse]=\"!documentationOpen\"\n      [isAnimated]=\"true\"\n      #documentationCol=\"bs-collapse\"\n    >\n      <ng-container *ngFor=\"let link of helpAndSupport\">\n        <ng-container *ngIf=\"link.component\">\n          <ng-container *c8yComponentOutlet=\"link.component; environmentInjector: link.injector\"></ng-container>\n        </ng-container>\n        <a\n          class=\"c8y-right-drawer__link\"\n          title=\"{{ link.label | translate }}\"\n          [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n          type=\"button\"\n          target=\"_blank\"\n          *ngIf=\"!link.component\"\n          rel=\"noopener noreferrer\"\n          [href]=\"link.url\"\n          c8yProductExperience\n          [actionName]=\"PRODUCT_EXPERIENCE.QUICK_LINKS.EVENTS.QUICK_LINK_RIGHT_DRAWER\"\n          [actionData]=\"{\n            component: PRODUCT_EXPERIENCE.QUICK_LINKS.COMPONENTS.RIGHT_DRAWER_COMPONENT,\n            action: link.label\n          }\"\n        >\n          <span\n            class=\"text-truncate text-12\"\n            title=\"{{ link.label | translate }}\"\n          >\n            {{ link.label | translate }}\n          </span>\n        </a>\n      </ng-container>\n    </div>\n  </div>\n</ng-container>\n" }]
        }], ctorParameters: () => [{ type: i1.DocsService }, { type: i2.AppStateService }, { type: i3.HeaderService }] });
//# sourceMappingURL=data:application/json;base64, 