// React Core
import React from 'react';
import ReactDOM from 'react-dom';
// React Router
import { Router, Route, Link, IndexRoute, browserHistory } from 'react-router';
// React Redux
import { Provider, connect } from 'react-redux';
// Redux Devtools

import configureStore from "./store";

// controller view
import App from "./components/app";

const store = configureStore();

// const pathParser(path){
//   var elements = path.split('/');
//   var confLevel= util.config;
//   var config={};
//   var ii;
//   for (ii=0; ii<elements.length; ii++){
//     if (typeof confLevel==='Object'){
//       var elemType = Object.keys(confLevel)[0];
//       config[elemType] = elements[ii];
//       confLevel = confLevel[elemType];
//     }else{
//       config['item'] = elements[ii];
//       if (ii!=elements.length-1){
//         console.log("can't parse elements "+ii+"+ from "+path);
//       }
//       return config;
//     }
//   }
//   while(typeof confLevel=== 'Object'){
//     var elemType = Object.keys(confLevel)[0];
//     config[elemType] = Object.keys(confLevel[elements])[0];
//     confLevel = confLevel[elemType];
//   }
//   return config;
// }

class Root extends React.Component {
  render() {
    // config = pathParser();
    // if (!config.valid){
    //   404
    // }else if ('item' in config){
    //   itempage
    // }else{
    //
    // }
    return (
      <div>
        <Provider store={store}>
          <App/>
        </Provider>
      </div>
    );
  }
}
// <Router history={browserHistory}>
//   <Route path="/*" component={App}/>
//
// </Router>
// <Route path="/:l1" component={App}/>
// <Route path="/:l1/:l2" component={App}/>
// <Route path="/:l1/:l2/:l3" component={App}/>
// <Route path="/:l1/s/:item" component={App}/>
// <Route path="/:l1/:l2/s/:item" component={App}/>
// <Route path="/:l1/:l2/:l3/s/:item" component={App}/>

// for material ui
import injectTapEventPlugin from "react-tap-event-plugin";

//Needed for onTouchTap
//Can go away when react 1.0 release
//Check this repo:
//https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();

ReactDOM.render(<Root/>, document.getElementById("root"));

@@ -379,1498 +379,179 @@
 );%0A%0A
-// const pathParser(path)%7B%0A//   var elements = path.split('/');%0A//   var confLevel= util.config;%0A//   var config=%7B%7D;%0A//   var ii;%0A//   for (ii=0; ii%3Celements.length; ii++)%7B%0A//     if (typeof confLevel==='Object')%7B%0A//       var elemType = Object.keys(confLevel)%5B0%5D;%0A//       config%5BelemType%5D = elements%5Bii%5D;%0A//       confLevel = confLevel%5BelemType%5D;%0A//     %7Delse%7B%0A//       config%5B'item'%5D = elements%5Bii%5D;%0A//       if (ii!=elements.length-1)%7B%0A//         console.log(%22can't parse elements %22+ii+%22+ from %22+path);%0A//       %7D%0A//       return config;%0A//     %7D%0A//   %7D%0A//   while(typeof confLevel=== 'Object')%7B%0A//     var elemType = Object.keys(confLevel)%5B0%5D;%0A//     config%5BelemType%5D = Object.keys(confLevel%5Belements%5D)%5B0%5D;%0A//     confLevel = confLevel%5BelemType%5D;%0A//   %7D%0A//   return config;%0A// %7D%0A%0Aclass Root extends React.Component %7B%0A  render() %7B%0A    // config = pathParser();%0A    // if (!config.valid)%7B%0A    //   404%0A    // %7Delse if ('item' in config)%7B%0A    //   itempage%0A    // %7Delse%7B%0A    //%0A    // %7D%0A    return (%0A      %3Cdiv%3E%0A        %3CProvider store=%7Bstore%7D%3E%0A          %3CApp/%3E%0A        %3C/Provider%3E%0A      %3C/div%3E%0A    );%0A  %7D%0A%7D%0A// %3CRouter history=%7BbrowserHistory%7D%3E%0A//   %3CRoute path=%22/*%22 component=%7BApp%7D/%3E%0A//%0A// %3C/Router%3E%0A// %3CRoute path=%22/:l1%22 component=%7BApp%7D/%3E%0A// %3CRoute path=%22/:l1/:l2%22 component=%7BApp%7D/%3E%0A// %3CRoute path=%22/:l1/:l2/:l3%22 component=%7BApp%7D/%3E%0A// %3CRoute path=%22/:l1/s/:item%22 component=%7BApp%7D/%3E%0A// %3CRoute path=%22/:l1/:l2/s/:item%22 component=%7BApp%7D/%3E%0A// %3CRoute path=%22/:l1/:l2/:l3/s/:item%22 component=%7BApp%7D/%3E
+%0Aclass Root extends React.Component %7B%0A  render() %7B%0A    return (%0A      %3Cdiv%3E%0A        %3CProvider store=%7Bstore%7D%3E%0A          %3CApp/%3E%0A        %3C/Provider%3E%0A      %3C/div%3E%0A    );%0A  %7D%0A%7D
 %0A%0A//

clean up dead code in index