import {Routes} from "@angular/router";
import { LoginGuard } from "./shared/common/loginGuard";
import {AppComponent} from "./app.component";
import {JhiLoginModalComponent} from "./shared";
import {JhiMainComponent} from "./layouts";
import {BasicComponent} from "./overAll/basic/basic.component";
import {BasicDetailComponent} from "./overAll/basic/basic-detail/basic-detail.component";
import {AuditComponent} from "./system/audit/audit.component";
import {ExamineComponent} from "./system/examine/examine.component";
import {GroupComponent} from "./system/group/group.component";
import {PowerComponent} from "./system/power/power.component";
import {AlarmListComponent} from './alarm/alarm-list/alarm-list.component';
import {AlarmLogComponent} from './alarm/alarm-log/alarm-log.component';
import {AlarmManageComponent} from './alarm/alarm-manage/alarm-manage.component';
import {AlarmSetComponent} from './alarm/alarm-set/alarm-set.component';
import {NowAlarmComponent} from './alarm/now-alarm/now-alarm.component';
import {SendSetComponent} from './alarm/send-set/send-set.component';
import {NeTopologyComponent} from './netTopology/ne-topology/ne-topology.component';
import {FlowTrendComponent} from './netTopology/flow-trend/flow-trend.component';
import {NetworkCheckComponent} from './overAll/network-check/network-check.component';
import {NetworkDetailComponent} from './overAll/network-check/network-detail/network-detail.component';
import {TopologyImgComponent} from './netTopology/topology-img/topology-img.component';
import {WorkHandleComponent} from './work/work-handle/work-handle.component';
import {InspectPlanComponent} from './work/inspect-plan/inspect-plan.component';
import {AssetPartComponent} from './work/asset-part/asset-part.component';
import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets.component';
import {AssetsDetailComponent} from './work/asset-part/assets-detail/assets-detail.component';

export const route: Routes = [
    {path: '', component: JhiMainComponent,canActivate:[LoginGuard]},
    {
        path: 'app', component: AppComponent,
        children: [
            {path: 'login', component: JhiLoginModalComponent},
            {
                path: 'main', component: JhiMainComponent,canActivate:[LoginGuard],
                children: [
                    {path: 'basic', component: BasicComponent},
                    {path: 'basic-detail', component: BasicDetailComponent},
                    {path: 'networkCheck', component: NetworkCheckComponent},
                    {path: 'network-detail', component: NetworkDetailComponent},
                    {path: 'audit', component: AuditComponent},
                    {path: 'examine', component: ExamineComponent},
                    {path: 'group', component: GroupComponent},
                    {path: 'power', component: PowerComponent},
                    {path: 'alarmList', component: AlarmListComponent},
                    {path: 'alarmLog', component: AlarmLogComponent},
                    {path: 'alarmManage', component: AlarmManageComponent},
                    {path: 'alarmSet', component: AlarmSetComponent},
                    {path: 'nowAlarm', component: NowAlarmComponent},
                    {path: 'sendSet', component: SendSetComponent},
                    {path: 'neTopology', component: NeTopologyComponent},
                    {path: 'flowTrend', component: FlowTrendComponent},
                    {path: 'topoImg', component: TopologyImgComponent},
                    {path: 'workHandle', component: WorkHandleComponent},
                    {path: 'inspectPlan', component: InspectPlanComponent},
                    {path: 'assetPart', component: AssetPartComponent},
                    {path: 'assetChild', component: ChildAssetsComponent},
                    {path: 'assetDetail', component: AssetsDetailComponent},
                ]
            },
        ]
    },
    {path: '*', component: AppComponent,canActivate:[LoginGuard]},
];
