// 配电网管理
import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')
const routes: Route.recordRaw[] = [
  {
    path: '/ele',
    component: Layout,
    redirect: '/networks',
    name: 'ELe',
    meta: {
      title: '电网管理',
      icon: 'ep:key',
      auth: '/electricity',
    },
    children: [
      {
        path: '/networks',
        component: Layout,
        redirect: '/networks/networkslist',
        name: 'Networks',
        meta: {
          title: '配电网',
          icon: 'ep:key',
          auth: '/electricity/network',
        },
        children: [
          {
            path: 'networkslist',
            name: 'Networkslist',
            component: () => import('@/views/data/electricity/network.vue'),
            meta: {
              title: '配电网',
              auth: '/electricity/network',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/networks',
            },
          },
        ],
      },
      {
        path: '/photovoltaic',
        component: Layout,
        redirect: '/photovoltaic/photovoltaiclist',
        name: 'photovoltaic',
        meta: {
          title: '分布式光伏',
          icon: 'ep:key',
          auth: '/electricity/photovoltaic',
        },
        children: [
          {
            path: 'photovoltaiclist',
            name: 'photovoltaiclist',
            component: () => import('@/views/data/electricity/page.vue'),
            meta: {
              title: '分布式光伏',
              auth: '/electricity/photovoltaic',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/photovoltaic',
            },
          },
        ],
      },
      {
        path: '/transformer',
        component: Layout,
        redirect: '/transformer/transformerlist',
        name: 'transformer',
        meta: {
          title: '变压器管理',
          icon: 'ep:key',
          auth: '/electricity/transformer',
        },
        children: [
          {
            path: 'transformerlist',
            name: 'transformerlist',
            component: () => import('@/views/electricity/transformer/index.vue'),
            meta: {
              title: '变压器管理',
              auth: '/electricity/transformer',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/transformer',
            },
          },
        ],
      },
      {
        path: '/switch ',
        component: Layout,
        redirect: '/switch/switchlist',
        name: 'switch',
        meta: {
          title: '配电开关站',
          icon: 'ep:key',
          auth: '/electricity/switch',
        },
        children: [
          {
            path: 'switchlist',
            name: 'switchlist',
            component: () => import('@/views/electricity/switch/index.vue'),
            meta: {
              title: '配电开关站',
              auth: '/electricity/switch',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/switch',
            },
          },
        ],
      },
      {
        path: '/distribution',
        component: Layout,
        redirect: '/distribution/distributionlist',
        name: 'distribution',
        meta: {
          title: '配电室管理',
          icon: 'ep:key',
          auth: '/electricity/distribution',
        },
        children: [
          {
            path: 'distributionlist',
            name: 'distributionlist',
            component: () => import('@/views/electricity/distribution/index.vue'),
            meta: {
              title: '配电室管理',
              auth: '/electricity/distribution',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/distribution',
            },
          },
        ],
      },
      {
        path: '/capacitance',
        component: Layout,
        redirect: '/capacitance/capacitancelist',
        name: 'capacitance',
        meta: {
          title: '电容器管理',
          icon: 'ep:key',
          auth: '/electricity/capacitance',
        },
        children: [
          {
            path: 'capacitancelist',
            name: 'capacitancelist',
            component: () => import('@/views/electricity/capacitance/index.vue'),
            meta: {
              title: '电容器管理',
              auth: '/electricity/capacitance',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/capacitance',
            },
          },
        ],
      },
      {
        path: '/reactance',
        component: Layout,
        redirect: '/reactance/reactancelist',
        name: 'reactance',
        meta: {
          title: '电抗器管理',
          icon: 'ep:key',
          auth: '/electricity/reactance',
        },
        children: [
          {
            path: 'reactancelist',
            name: 'reactancelist',
            component: () => import('@/views/electricity/reactance/index.vue'),
            meta: {
              title: '电抗器管理',
              auth: '/electricity/reactance',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/reactance',
            },
          },
        ],
      },
    ],
  },
]

export default routes
