/*
 * Copyright 2020-2025 VMware, Inc. All rights reserved. VMware Confidential
 */

import { NgModule } from "@angular/core";
import { Route, RouterModule } from "@angular/router";
import { RESOURCES_ROUTE } from "../../../app/plugin-container/plugin-container.module";
import { ExtensibilityModule } from "../../../common/extensibility/extensibility.module";
import { RESOURCE_EXTENSION_ID_PATH } from "../../tenant-routing-paths";
import { ExtensionTabContentDirective, ResourcesComponent } from "./resources.component";
import { ExtensionContainerGuard } from "../../../common/extensibility/extension-container/extension-container-guard";

export const ResourcesRoutesConfiguration: Route = {
    path: RESOURCES_ROUTE,
    children: [
        {
            path: RESOURCE_EXTENSION_ID_PATH,
            component: ResourcesComponent,
            canDeactivate: [ExtensionContainerGuard],
        },
    ],
};

@NgModule({
    declarations: [ResourcesComponent, ExtensionTabContentDirective],
    exports: [ResourcesComponent, ExtensionTabContentDirective],
    imports: [RouterModule, ExtensibilityModule],
})
export class ResourceModule {
}
