import { observable } from "mobx";
import { connect } from "react-redux";

export default function(context) {
  const ThemeView = require("./ThemeView").default(context);

  let stores;

  function Stores() {
    const sideBarStore = observable({
      open: true,
      toogle(){
        this.open = !this.open
      }
    });
    return {
      sideBar: sideBarStore
    };
  }
  function Containers() {
    return {
      theme() {
        const mapStateToProps = () => ({});
        return connect(mapStateToProps)(ThemeView);
      }
    };
  }

  function Routes(containers) {
    return {
      childRoutes: [
        {
          path: "view",
          component: containers().theme()
        }
      ]
    };
  }

  const containers = () => Containers(context);
  return {
    stores: () => stores,
    createStores: dispatch => {
      stores = Stores(dispatch, context);
    },
    containers,
    routes: (/*store*/) => Routes(containers)
  };
}

@@ -31,47 +31,8 @@
 bx%22;
-%0Aimport %7B connect %7D from %22react-redux%22;
 %0A%0Aex
@@ -401,84 +401,15 @@
     
-const mapStateToProps = () =%3E (%7B%7D);%0A        return connect(mapStateToProps)(
+return 
 Them
@@ -413,17 +413,16 @@
 hemeView
-)
 ;%0A      

remove reduc connect from themeModule