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

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

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

class AddAssetContextDashboardModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AddAssetContextDashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AddAssetContextDashboardModule, imports: [ContextDashboardModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AddAssetContextDashboardModule, providers: [
            hookRoute([
                // new dashboard route should be defined last
                {
                    path: newDashboardTab.path,
                    component: ContextDashboardComponent,
                    canActivate: [NewDashboardGuard],
                    canDeactivate: [(component) => component.canDeactivate()],
                    context: ViewContext.Group,
                    rootContext: ViewContext.Dashboard
                }
            ]),
            hookTab(AddAssetDashboardFactory, { providerType: HookProviderTypes.ExistingProvider }),
            hookActionBar(AssetDashboardActionBarFactory)
        ], imports: [ContextDashboardModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AddAssetContextDashboardModule, 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.Group,
                                rootContext: ViewContext.Dashboard
                            }
                        ]),
                        hookTab(AddAssetDashboardFactory, { providerType: HookProviderTypes.ExistingProvider }),
                        hookActionBar(AssetDashboardActionBarFactory)
                    ]
                }]
        }] });

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

export { AddAssetContextDashboardModule };
//# sourceMappingURL=c8y-ngx-components-context-dashboard-asset-add.mjs.map
