import React, { Component } from 'react';
import { IndexRoute, Route, IndexRedirect } from 'react-router';


import App from 'containers/App';

import Home from 'containers/Home';


import { MessagePanel } from 'lib/components'


const empty = (props) => <MessagePanel size="big" icon="" title="Not implemented" text="This feature has not been implemented yet"/>


const childRoutes = [
    /* HOME */
    {
        path: '/stats',
        component: Home
    },

    /* DEFAULT ROUTE */
    {
        path: '*',
        component: empty
    }
];

export function backRoute(route) {
    
}


export default (rootPath = "/", opts) => {
    const routes = [
        {
            path: rootPath,
            component: App,

            defaultRoute: empty,
            indexRoute: { onEnter: (nextState, replace) => replace('/stats') },

            childRoutes
        }
    ];

    return routes;
}