import { Component, Input } from '@angular/core';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { OperationsListService } from '@c8y/ngx-components/operations/operations-list';
import * as i0 from "@angular/core";
import * as i1 from "ngx-bootstrap/modal";
import * as i2 from "@c8y/ngx-components/operations/operations-list";
import * as i3 from "@c8y/ngx-components";
export class OperationDetailsModalComponent {
    constructor(modalRef, operationsListService) {
        this.modalRef = modalRef;
        this.operationsListService = operationsListService;
        this.collapsed = false;
        this.readOnly = false;
        this.isSmartRulesMicroserviceAvailable = false;
    }
    async ngOnInit() {
        this.isSmartRulesMicroserviceAvailable =
            await this.operationsListService.isSmartRulesMicroserviceAvailable();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OperationDetailsModalComponent, deps: [{ token: i1.BsModalRef }, { token: i2.OperationsListService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OperationDetailsModalComponent, selector: "c8y-operation-details-modal", inputs: { operation: "operation", collapsed: "collapsed", readOnly: "readOnly" }, ngImport: i0, template: "<div class=\"viewport-modal\">\n  <div class=\"modal-header separator\">\n    <h3 id=\"modal-title\">{{ 'Single operation details' | translate }}</h3>\n  </div>\n\n  <div\n    class=\"modal-inner-scroll\"\n    id=\"modal-body\"\n  >\n    <c8y-operations-list-item\n      [operation]=\"operation\"\n      [collapsed]=\"collapsed\"\n      [noExpandToggle]=\"true\"\n      [readOnly]=\"readOnly\"\n      [isSmartRulesMicroserviceAvailable]=\"isSmartRulesMicroserviceAvailable\"\n    ></c8y-operations-list-item>\n  </div>\n\n  <div class=\"modal-footer\">\n    <button\n      class=\"btn btn-default\"\n      title=\"{{ 'Close' | translate }}\"\n      type=\"button\"\n      (click)=\"modalRef.hide()\"\n    >\n      {{ 'Close' | translate }}\n    </button>\n  </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.OperationsListItemComponent, selector: "c8y-operations-list-item", inputs: ["operation", "collapsed", "readOnly", "noExpandToggle", "isSmartRulesMicroserviceAvailable"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OperationDetailsModalComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-operation-details-modal', template: "<div class=\"viewport-modal\">\n  <div class=\"modal-header separator\">\n    <h3 id=\"modal-title\">{{ 'Single operation details' | translate }}</h3>\n  </div>\n\n  <div\n    class=\"modal-inner-scroll\"\n    id=\"modal-body\"\n  >\n    <c8y-operations-list-item\n      [operation]=\"operation\"\n      [collapsed]=\"collapsed\"\n      [noExpandToggle]=\"true\"\n      [readOnly]=\"readOnly\"\n      [isSmartRulesMicroserviceAvailable]=\"isSmartRulesMicroserviceAvailable\"\n    ></c8y-operations-list-item>\n  </div>\n\n  <div class=\"modal-footer\">\n    <button\n      class=\"btn btn-default\"\n      title=\"{{ 'Close' | translate }}\"\n      type=\"button\"\n      (click)=\"modalRef.hide()\"\n    >\n      {{ 'Close' | translate }}\n    </button>\n  </div>\n</div>\n" }]
        }], ctorParameters: () => [{ type: i1.BsModalRef }, { type: i2.OperationsListService }], propDecorators: { operation: [{
                type: Input
            }], collapsed: [{
                type: Input
            }], readOnly: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlcmF0aW9uLWRldGFpbHMtbW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vb3BlcmF0aW9ucy9vcGVyYXRpb24tZGV0YWlscy9vcGVyYXRpb24tZGV0YWlscy1tb2RhbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9vcGVyYXRpb25zL29wZXJhdGlvbi1kZXRhaWxzL29wZXJhdGlvbi1kZXRhaWxzLW1vZGFsLmNvbXBvbm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