import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { RoleViewComponent } from './role-view/role-view.component';
import { RoleAddComponent } from './role-add/role-add.component';
import { InputTextModule } from 'primeng/inputtext';
import { TableModule } from 'primeng/table';
import { ToolbarModule } from 'primeng/toolbar';
import { MatMenuModule } from '@angular/material/menu';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { TreeModule } from 'primeng/tree';
import { TreeTableModule } from 'primeng/treetable';
import { ButtonModule } from 'primeng/button';
import { TreeSelectModule } from 'primeng/treeselect';
import { CheckboxModule } from 'primeng/checkbox';
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NodeService } from 'src/app/core/services/nodeservice';
import { NgSelectModule } from '@ng-select/ng-select';
import { ToastModule } from 'primeng/toast';
import { MessageService } from 'primeng/api';
import { MatButtonModule } from '@angular/material/button';


const routes: Routes = [
  {
    path: 'Search',
    component: RoleViewComponent,
  },
  {
    path: 'Add',
    component: RoleAddComponent,
  },
  {
    path: 'Edit/:RuleId',
    component: RoleAddComponent,
  },
]


@NgModule({
  declarations: [
    RoleViewComponent,
    RoleAddComponent
  ],
  imports: [
    TableModule,
    CommonModule,
    MatMenuModule,
    ToolbarModule,
    ToastModule,
    InputTextModule,
    MatCheckboxModule,
    TreeModule,
    TreeSelectModule,
    TreeTableModule,
    ButtonModule,
    CheckboxModule,
    TriStateCheckboxModule,
    FormsModule,
    NgSelectModule,
    MatButtonModule,
    ReactiveFormsModule,
    RouterModule.forChild(routes),
  ],
  providers: [NodeService,MessageService]
})
export class RoleManagementModule { }
