import React from 'react'
import { Redirect } from 'react-router-dom'

import dashboardRoutes from './views/dashboard/DashboardRoutes'
import EmployeeRouter from './views/Company/Employee/EmployeeRouter'
import DepartmentRoutes from './views/Company/Department/DepartmentRouter'
import GroupRoleRouter from './views/Company/GroupRole/GroupRoleRoutes'
import RoleRouter from './views/Company/Role/RoleRouters'
import ManageJobRoutes from './views/Company/ManageJob/ManageJobRoutes'
import MyAccountRouters from './views/MyAccount/MyAccountRoute'
import FuntionRouters from './views/Company/Function/FuntionRoutes'
import SystemRouters from './views/System/SystemRouters'
import ProductRoutes from './views/product/ProductRouters'
import TransactionRouters from './views/Transaction/TransactionRouters'
import FeeRouters from './views/Fee/FeeRouters'
import MerchantRoutes from './views/Merchant/MerchantRoutes'
import GasStationRoutes from './views/GasStation/GasStationRoutes'
import ListRequestRoutes from './views/ListRequest/routes'
import SignUp from './views/SignUp/routes'
import InvoiceSupplier from './views/InvoiceSupplier/routes'
import Package from './views/package/routers'
import NccRouter from './views/Ncc/router'
import LandingpageRouter from './views/landingpage/router'
import PaymentSupplier from './views/PaymentSupplier/routes'
import ReconciliationRouters from './views/Reconciliation/router'

const redirectRoute = [
    {
        path: '/',
        exact: true,
        component: () => <Redirect to="/dashboard/default" />,
    },
]

const errorRoute = [
    {
        component: () => <Redirect to="/session/404" />,
    },
]

const routes = [
    ...ReconciliationRouters,
    ...PaymentSupplier,
    ...LandingpageRouter,
    ...NccRouter,
    // ...Package,
    ...InvoiceSupplier,
    ...SignUp,
    ...ListRequestRoutes,
    ...GasStationRoutes,
    ...MerchantRoutes,
    ...FeeRouters,
    ...TransactionRouters,
    ...ProductRoutes,
    ...SystemRouters,
    ...FuntionRouters,
    ...MyAccountRouters,
    ...GroupRoleRouter,
    ...RoleRouter,
    ...DepartmentRoutes,
    ...dashboardRoutes,
    ...EmployeeRouter,
    ...ManageJobRoutes,
    ...redirectRoute,
    ...errorRoute,
]

export default routes
