// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/RootStore.java
// @Store(TodoListReducer.class)
// public interface RootStore extends BaseStore {
//     TodoList todoList();
//     Flowable<TodoList> observeTodoList();
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/AddTodoAction.java
// public class AddTodoAction implements Action {
//     public static final String TAG = AddTodoAction.class.getSimpleName();
// 
//     private final String text;
// 
//     public AddTodoAction(String text) {
//         this.text = text;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ClearCompletedTodoAction.java
// public class ClearCompletedTodoAction implements Action {
//     public static final String TAG = ClearCompletedTodoAction.class.getSimpleName();
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ClearNewTodoTextAction.java
// public class ClearNewTodoTextAction implements Action {
//     public static final String TAG = ClearNewTodoTextAction.class.getSimpleName();
// 
//     public ClearNewTodoTextAction() {
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/DeleteTodoAction.java
// public class DeleteTodoAction implements Action {
//     public static final String TAG = DeleteTodoAction.class.getSimpleName();
// 
//     private final long id;
// 
//     public DeleteTodoAction(long id) {
//         this.id = id;
//     }
// 
//     public long getId() {
//         return id;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ToggleCompletedTodoAction.java
// public class ToggleCompletedTodoAction implements Action {
//     public static final String TAG = ToggleCompletedTodoAction.class.getSimpleName();
// 
//     private final int id;
// 
//     public ToggleCompletedTodoAction(int id) {
//         this.id = id;
//     }
// 
//     public int getId() {
//         return id;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


import info.izumin.android.droidux.example.todoswithdagger.R;
import info.izumin.android.droidux.example.todoswithdagger.RootStore;
import info.izumin.android.droidux.example.todoswithdagger.action.AddTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ClearCompletedTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ClearNewTodoTextAction;
import info.izumin.android.droidux.example.todoswithdagger.action.DeleteTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ToggleCompletedTodoAction;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.subjects.PublishSubject;
package info.izumin.android.droidux.example.todoswithdagger.module.main;


/**
 * Created by izumin on 11/5/15.
 */
public class MainPresenter {
    public static final String TAG = MainPresenter.class.getSimpleName();

    private final MainView view;
    private final RootStore store;

    private final PublishSubject<String> clickAddTodoSubject = PublishSubject.create();
    private final PublishSubject<Long> clickItemSubject = PublishSubject.create();
    private final PublishSubject<Long> longClickItemSubject = PublishSubject.create();

    private CompositeDisposable compositeDisposable;

// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/RootStore.java
// @Store(TodoListReducer.class)
// public interface RootStore extends BaseStore {
//     TodoList todoList();
//     Flowable<TodoList> observeTodoList();
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/AddTodoAction.java
// public class AddTodoAction implements Action {
//     public static final String TAG = AddTodoAction.class.getSimpleName();
// 
//     private final String text;
// 
//     public AddTodoAction(String text) {
//         this.text = text;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ClearCompletedTodoAction.java
// public class ClearCompletedTodoAction implements Action {
//     public static final String TAG = ClearCompletedTodoAction.class.getSimpleName();
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ClearNewTodoTextAction.java
// public class ClearNewTodoTextAction implements Action {
//     public static final String TAG = ClearNewTodoTextAction.class.getSimpleName();
// 
//     public ClearNewTodoTextAction() {
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/DeleteTodoAction.java
// public class DeleteTodoAction implements Action {
//     public static final String TAG = DeleteTodoAction.class.getSimpleName();
// 
//     private final long id;
// 
//     public DeleteTodoAction(long id) {
//         this.id = id;
//     }
// 
//     public long getId() {
//         return id;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }
// 
// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/action/ToggleCompletedTodoAction.java
// public class ToggleCompletedTodoAction implements Action {
//     public static final String TAG = ToggleCompletedTodoAction.class.getSimpleName();
// 
//     private final int id;
// 
//     public ToggleCompletedTodoAction(int id) {
//         this.id = id;
//     }
// 
//     public int getId() {
//         return id;
//     }
// 
//     @Override
//     public String toString() {
//         return new Gson().toJson(this);
//     }
// }


// Path: examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/module/main/MainPresenter.java
import info.izumin.android.droidux.example.todoswithdagger.R;
import info.izumin.android.droidux.example.todoswithdagger.RootStore;
import info.izumin.android.droidux.example.todoswithdagger.action.AddTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ClearCompletedTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ClearNewTodoTextAction;
import info.izumin.android.droidux.example.todoswithdagger.action.DeleteTodoAction;
import info.izumin.android.droidux.example.todoswithdagger.action.ToggleCompletedTodoAction;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.subjects.PublishSubject;

package info.izumin.android.droidux.example.todoswithdagger.module.main;


/**
 * Created by izumin on 11/5/15.
 */
public class MainPresenter {
    public static final String TAG = MainPresenter.class.getSimpleName();

    private final MainView view;
    private final RootStore store;

    private final PublishSubject<String> clickAddTodoSubject = PublishSubject.create();
    private final PublishSubject<Long> clickItemSubject = PublishSubject.create();
    private final PublishSubject<Long> longClickItemSubject = PublishSubject.create();

    private CompositeDisposable compositeDisposable;

    public MainPresenter(MainView view, RootStore store) {