import { Component, Input } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import * as i0 from "@angular/core";
import * as i1 from "@c8y/ngx-components";
import * as i2 from "@angular/common";
import * as i3 from "../../../../application-plugins/plugin-list.component";
export class PackageVersionsPluginsComponent {
    constructor() {
        this.exportedPlugins$ = new BehaviorSubject([]);
    }
    async ngOnChanges() {
        this.exportedPlugins$.next(this.getExportedPlugins());
    }
    getExportedPlugins() {
        return this.selectedVersionManifest?.exports || [];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PackageVersionsPluginsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: PackageVersionsPluginsComponent, selector: "c8y-contents-plugins", inputs: { selectedVersionManifest: "selectedVersionManifest" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"legend form-block\">\n  {{ 'Plugins' | translate }}\n</p>\n<!-- empty state -->\n<c8y-ui-empty-state\n  *ngIf=\"(exportedPlugins$ | async).length === 0\"\n  [icon]=\"'plugin'\"\n  [horizontal]=\"true\"\n  [title]=\"'No plugins to display.' | translate\"\n  [subtitle]=\"'This package doesn\\'t contain plugins.' | translate\"\n></c8y-ui-empty-state>\n\n<c8y-plugin-list [plugins$]=\"exportedPlugins$\" [selectable]=\"false\"></c8y-plugin-list>\n", dependencies: [{ kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PluginListComponent, selector: "c8y-plugin-list", inputs: ["plugins$", "emptyListText", "selectable", "hideSource", "installable", "package"], outputs: ["selectedItems"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PackageVersionsPluginsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-contents-plugins', template: "<p class=\"legend form-block\">\n  {{ 'Plugins' | translate }}\n</p>\n<!-- empty state -->\n<c8y-ui-empty-state\n  *ngIf=\"(exportedPlugins$ | async).length === 0\"\n  [icon]=\"'plugin'\"\n  [horizontal]=\"true\"\n  [title]=\"'No plugins to display.' | translate\"\n  [subtitle]=\"'This package doesn\\'t contain plugins.' | translate\"\n></c8y-ui-empty-state>\n\n<c8y-plugin-list [plugins$]=\"exportedPlugins$\" [selectable]=\"false\"></c8y-plugin-list>\n" }]
        }], propDecorators: { selectedVersionManifest: [{
                type: Input,
                args: ['selectedVersionManifest']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudHMtcGx1Z2lucy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9lY29zeXN0ZW0vcGFja2FnZXMvcGFja2FnZS12ZXJzaW9ucy9wYWNrYWdlLWNvbnRlbnRzL2NvbnRlbnRzLXBsdWdpbnMvY29udGVudHMtcGx1Z2lucy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9lY29zeXN0ZW0vcGFja2FnZXMvcGFja2FnZS12ZXJzaW9ucy9wYWNrYWdlLWNvbnRlbnRzL2NvbnRlbnRzLXBsdWdpbnMvY29udGVudHMtcGx1Z2lucy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUVqRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7OztBQU92QyxNQUFNLE9BQU8sK0JBQStCO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