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 { BaseStepperComponent, BulkOperationStepper } from '@c8y/ngx-components/operations/bulk-operation-stepper';
import * as i2 from '@c8y/ngx-components/operations/bulk-operations-service';

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: "20.3.25", 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: "20.3.25", type: BulkOperationFromSingleComponent, isStandalone: true, 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: BulkOperationStepper, selector: "c8y-bulk-operation-stepper", inputs: ["type"], outputs: ["selectionChange"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: BulkOperationFromSingleComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bulk-operation-from-single', imports: [BulkOperationStepper], 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: "20.3.25", ngImport: i0, type: BulkOperationFromSingleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: BulkOperationFromSingleModule, imports: [i1.RouterModule, BulkOperationFromSingleComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: BulkOperationFromSingleModule, imports: [RouterModule.forChild(bulkOperationCreateSingleRoutes),
            BulkOperationFromSingleComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: BulkOperationFromSingleModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        RouterModule.forChild(bulkOperationCreateSingleRoutes),
                        BulkOperationFromSingleComponent
                    ]
                }]
        }] });

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

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