// Path: droidux/src/main/java/info/izumin/android/droidux/Action.java
// public interface Action {
// }
// 
// Path: droidux/src/main/java/info/izumin/android/droidux/Middleware.java
// public abstract class Middleware<S extends BaseStore> {
//     public static final String TAG = Middleware.class.getSimpleName();
// 
//     private S store;
//     private Dispatcher dispatcher;
// 
//     public void onAttach(S store, Dispatcher dispatcher) {
//         this.store = store;
//         this.dispatcher = dispatcher;
//     }
// 
//     protected S getStore() {
//         return store;
//     }
// 
//     protected Dispatcher getDispatcher() {
//         return dispatcher;
//     }
// 
//     public abstract Flowable<Action> beforeDispatch(Action action);
//     public abstract Flowable<Action> afterDispatch(Action action);
// }
// 
// Path: examples/todomvc/src/main/java/info/izumin/android/droidux/example/todomvc/RootStore.java
// @Store(TodoListReducer.class)
// public interface RootStore extends BaseStore {
//     TodoList todoList();
//     Flowable<TodoList> observeTodoList();
//     Flowable<TodoList> observeTodoList(BackpressureStrategy strategy);
// }


import android.util.Log;
import info.izumin.android.droidux.Action;
import info.izumin.android.droidux.Middleware;
import info.izumin.android.droidux.example.todomvc.RootStore;
import io.reactivex.Flowable;
package info.izumin.android.droidux.example.todomvc.middleware;



/**
 * Created by izumin on 11/4/15.
 */
public class Logger extends Middleware<RootStore> {
    public static final String TAG = Logger.class.getSimpleName();

    @Override
    public Flowable<Action> beforeDispatch(Action action) {
// Path: droidux/src/main/java/info/izumin/android/droidux/Action.java
// public interface Action {
// }
// 
// Path: droidux/src/main/java/info/izumin/android/droidux/Middleware.java
// public abstract class Middleware<S extends BaseStore> {
//     public static final String TAG = Middleware.class.getSimpleName();
// 
//     private S store;
//     private Dispatcher dispatcher;
// 
//     public void onAttach(S store, Dispatcher dispatcher) {
//         this.store = store;
//         this.dispatcher = dispatcher;
//     }
// 
//     protected S getStore() {
//         return store;
//     }
// 
//     protected Dispatcher getDispatcher() {
//         return dispatcher;
//     }
// 
//     public abstract Flowable<Action> beforeDispatch(Action action);
//     public abstract Flowable<Action> afterDispatch(Action action);
// }
// 
// Path: examples/todomvc/src/main/java/info/izumin/android/droidux/example/todomvc/RootStore.java
// @Store(TodoListReducer.class)
// public interface RootStore extends BaseStore {
//     TodoList todoList();
//     Flowable<TodoList> observeTodoList();
//     Flowable<TodoList> observeTodoList(BackpressureStrategy strategy);
// }


// Path: examples/todomvc/src/main/java/info/izumin/android/droidux/example/todomvc/middleware/Logger.java
import android.util.Log;
import info.izumin.android.droidux.Action;
import info.izumin.android.droidux.Middleware;
import info.izumin.android.droidux.example.todomvc.RootStore;
import io.reactivex.Flowable;

package info.izumin.android.droidux.example.todomvc.middleware;



/**
 * Created by izumin on 11/4/15.
 */
public class Logger extends Middleware<RootStore> {
    public static final String TAG = Logger.class.getSimpleName();

    @Override
    public Flowable<Action> beforeDispatch(Action action) {
        Log.d("[prev todo]", getStore().todoList().toString());