import * as i0 from '@angular/core';
import { Injectable, NgModule } from '@angular/core';
import { ViewContext, hookRoute, hookTab, hookActionBar, HookProviderTypes } from '@c8y/ngx-components';
import { DashboardActionBarFactory, AddDashboardFactory, ContextDashboardModule, NewDashboardGuard, ContextDashboardComponent, newDashboardTab } from '@c8y/ngx-components/context-dashboard';

class DeviceDashboardActionBarFactory extends DashboardActionBarFactory {
    constructor() {
        super(...arguments);
        this.targetContext = ViewContext.Device;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DeviceDashboardActionBarFactory, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DeviceDashboardActionBarFactory, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DeviceDashboardActionBarFactory, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }] });

class AddDeviceDashboardFactory extends AddDashboardFactory {
    constructor() {
        super(...arguments);
        this.targetContext = ViewContext.Device;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceDashboardFactory, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceDashboardFactory, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceDashboardFactory, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }] });

class AddDeviceContextDashboardModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceContextDashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceContextDashboardModule, imports: [ContextDashboardModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceContextDashboardModule, providers: [
            hookRoute([
                // new dashboard route should be defined last
                {
                    path: newDashboardTab.path,
                    component: ContextDashboardComponent,
                    canActivate: [NewDashboardGuard],
                    canDeactivate: [(component) => component.canDeactivate()],
                    context: ViewContext.Device,
                    rootContext: ViewContext.Dashboard
                }
            ]),
            hookTab(AddDeviceDashboardFactory, { providerType: HookProviderTypes.ExistingProvider }),
            hookActionBar(DeviceDashboardActionBarFactory)
        ], imports: [ContextDashboardModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddDeviceContextDashboardModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [ContextDashboardModule],
                    providers: [
                        hookRoute([
                            // new dashboard route should be defined last
                            {
                                path: newDashboardTab.path,
                                component: ContextDashboardComponent,
                                canActivate: [NewDashboardGuard],
                                canDeactivate: [(component) => component.canDeactivate()],
                                context: ViewContext.Device,
                                rootContext: ViewContext.Dashboard
                            }
                        ]),
                        hookTab(AddDeviceDashboardFactory, { providerType: HookProviderTypes.ExistingProvider }),
                        hookActionBar(DeviceDashboardActionBarFactory)
                    ]
                }]
        }] });

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

export { AddDeviceContextDashboardModule, AddDeviceDashboardFactory, DeviceDashboardActionBarFactory };
//# sourceMappingURL=c8y-ngx-components-context-dashboard-device-add.mjs.map
