import Vue from 'vue'
import Router from 'vue-router'
import Index from '../../databoard/index.vue'
import ArBar from "../../databoard/components/chart/ar-bar.vue";
import ArCompanyBar from "../../databoard/components/chart/ar-company-bar.vue";
import ArMonthlyBar from "../../databoard/components/chart/ar-monthly-bar.vue";
import WinnersList from "../../databoard/components/card/winners-list.vue";
import TurnoverDetail from "../../databoard/databoard/turnover-detail.vue";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'index',
      component: Index
    },
    {
      path: '/ar_bar',
      component: ArBar,
      children: [
        {
          path: '/ar_bar',
          redirect: '/ar_bar/company'
        },
        {
          path: '/ar_bar/company',
          name: 'arCompanyBar',
          component: ArCompanyBar
        },
        {
          path: '/ar_bar/monthly',
          name: 'arMonthlyBar',
          component: ArMonthlyBar
        }
      ]
    },
    {
      path: '/ar_company_bar',
      name: 'arCompanyBar',
      component: ArCompanyBar
    },
    {
      path: '/ar_monthly_bar',
      name: 'arMonthlyBar',
      component: ArMonthlyBar
    },
    {
      path: '/winner_list',
      name: 'winnerList',
      component: WinnersList
    },
    {
      path: '/turnover-detail',
      name: 'turnoverDetail',
      component: TurnoverDetail
    }
  ]
})
