import { Component } from '@angular/core';
import { map } from 'rxjs/operators';
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 "../../header/header.service";
import * as i3 from "@angular/common";
import * as i4 from "../../common/component-outlet.directive";
import * as i5 from "../../product-experience/product-experience.directive";
import * as i6 from "../../i18n/c8y-translate.pipe";
export class LegalNoticesOutletComponent {
    constructor(docsService, headerService) {
        this.docsService = docsService;
        this.headerService = headerService;
        this.PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE_CORE_SHARED;
        this.legalNotices$ = this.docsService.items$.pipe(map(items => items.find(item => item.type === 'doc' && item.label === legalNoticesItem.label)));
        this.drawerOpen$ = this.headerService.rightDrawerOpen$;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LegalNoticesOutletComponent, deps: [{ token: i1.DocsService }, { token: i2.HeaderService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: LegalNoticesOutletComponent, selector: "c8y-legal-notices-outlet", ngImport: i0, template: "<div class=\"separator-top p-t-8 m-t-auto\" *ngIf=\"legalNotices$ | async as legalNotices\">\n  <ng-container *ngIf=\"legalNotices.component\">\n    <ng-container *c8yComponentOutlet=\"legalNotices.component; environmentInjector: legalNotices.injector\"></ng-container>\n  </ng-container>\n  <a\n    *ngIf=\"!legalNotices.component\"\n    title=\"{{ legalNotices.label | translate }}\"\n    type=\"button\"\n    class=\"c8y-right-drawer__link\"\n    target=\"_blank\"\n    rel=\"noopener noreferrer\"\n    [href]=\"legalNotices.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: legalNotices.label\n    }\"\n    [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n  >\n    <span title=\"{{ legalNotices.label | translate }}\" class=\"text-truncate text-12\">\n      {{ legalNotices.label | translate }}\n    </span>\n  </a>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector"] }, { kind: "directive", type: i5.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "pipe", type: i6.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LegalNoticesOutletComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-legal-notices-outlet', template: "<div class=\"separator-top p-t-8 m-t-auto\" *ngIf=\"legalNotices$ | async as legalNotices\">\n  <ng-container *ngIf=\"legalNotices.component\">\n    <ng-container *c8yComponentOutlet=\"legalNotices.component; environmentInjector: legalNotices.injector\"></ng-container>\n  </ng-container>\n  <a\n    *ngIf=\"!legalNotices.component\"\n    title=\"{{ legalNotices.label | translate }}\"\n    type=\"button\"\n    class=\"c8y-right-drawer__link\"\n    target=\"_blank\"\n    rel=\"noopener noreferrer\"\n    [href]=\"legalNotices.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: legalNotices.label\n    }\"\n    [tabindex]=\"(drawerOpen$ | async) ? '0' : '-1'\"\n  >\n    <span title=\"{{ legalNotices.label | translate }}\" class=\"text-truncate text-12\">\n      {{ legalNotices.label | translate }}\n    </span>\n  </a>\n</div>\n" }]
        }], ctorParameters: () => [{ type: i1.DocsService }, { type: i2.HeaderService }] });
//# sourceMappingURL=data:application/json;base64, 