import * as i0 from '@angular/core';
import { Component, NgModule } from '@angular/core';
import * as i1 from '@angular/router';
import { RouterModule } from '@angular/router';
import { get } from 'lodash-es';
import * as i3 from '@c8y/ngx-components/operations/bulk-operation-stepper';
import { BaseStepperComponent, BulkOperationStepperModule } from '@c8y/ngx-components/operations/bulk-operation-stepper';
import * as i2 from '@c8y/ngx-components/operations/bulk-operations-service';
import { CoreModule } from '@c8y/ngx-components';

class BulkOperationFromSingleComponent extends BaseStepperComponent {
    constructor(activatedRoute, bulkOperationService) {
        super();
        this.activatedRoute = activatedRoute;
        this.bulkOperationService = bulkOperationService;
    }
    async retrieveOperationPrototype() {
        const prototype = (await this.bulkOperationService.getOperation(this.activatedRoute.snapshot.params.operationId)).data;
        return {
            description: get(prototype, 'description'),
            prototype
        };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.BulkOperationsService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: BulkOperationFromSingleComponent, selector: "bulk-operation-from-single", usesInheritance: true, ngImport: i0, template: "<c8y-bulk-operation-stepper type=\"from-single\"> </c8y-bulk-operation-stepper>\n", dependencies: [{ kind: "component", type: i3.BulkOperationStepper, selector: "c8y-bulk-operation-stepper", inputs: ["type"], outputs: ["selectionChange"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bulk-operation-from-single', template: "<c8y-bulk-operation-stepper type=\"from-single\"> </c8y-bulk-operation-stepper>\n" }]
        }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2.BulkOperationsService }] });

const bulkOperationCreateSingleRoutes = [
    {
        path: 'devicecontrol/single/create-bulk/:operationId',
        component: BulkOperationFromSingleComponent
    }
];
class BulkOperationFromSingleModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleModule, declarations: [BulkOperationFromSingleComponent], imports: [CoreModule,
            BulkOperationStepperModule, i1.RouterModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleModule, imports: [CoreModule,
            BulkOperationStepperModule,
            RouterModule.forChild(bulkOperationCreateSingleRoutes)] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: BulkOperationFromSingleModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [BulkOperationFromSingleComponent],
                    imports: [
                        CoreModule,
                        BulkOperationStepperModule,
                        RouterModule.forChild(bulkOperationCreateSingleRoutes)
                    ]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { BulkOperationFromSingleComponent, BulkOperationFromSingleModule, bulkOperationCreateSingleRoutes };
//# sourceMappingURL=c8y-ngx-components-operations-bulk-operation-from-single.mjs.map
