// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/manager/CountdownManager.java
// public class CountdownManager {
// 
//     @Inject
//     public CountdownManager() {
//     }
// 
//     public Observable<Integer> countdownFrom(@IntRange(from = 1) int fromValue) {
//         if (fromValue < 1) {
//             throw new IllegalArgumentException("fromValue must be at least 1");
//         }
// 
//         return Observable.interval(1, 1, TimeUnit.SECONDS)
//                 .map(value -> fromValue - value.intValue())
//                 .takeUntil(value -> value <= 0);
//     }
// }


import com.github.simonpercic.mvp.example.aircycle.ui.base.scope.PerActivity;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.manager.CountdownManager;
import dagger.Module;
import dagger.Provides;
package com.github.simonpercic.mvp.example.aircycle.ui.countdown;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
@Module
public class CountdownModule {

    private final CountdownMvp.View view;

    public CountdownModule(CountdownMvp.View view) {
        this.view = view;
    }

    @Provides @PerActivity CountdownMvp.View provideView() {
        return view;
    }

    @Provides @PerActivity CountdownMvp.Presenter providePresenter(CountdownMvp.View view,
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/manager/CountdownManager.java
// public class CountdownManager {
// 
//     @Inject
//     public CountdownManager() {
//     }
// 
//     public Observable<Integer> countdownFrom(@IntRange(from = 1) int fromValue) {
//         if (fromValue < 1) {
//             throw new IllegalArgumentException("fromValue must be at least 1");
//         }
// 
//         return Observable.interval(1, 1, TimeUnit.SECONDS)
//                 .map(value -> fromValue - value.intValue())
//                 .takeUntil(value -> value <= 0);
//     }
// }


// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/CountdownModule.java
import com.github.simonpercic.mvp.example.aircycle.ui.base.scope.PerActivity;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.manager.CountdownManager;
import dagger.Module;
import dagger.Provides;

package com.github.simonpercic.mvp.example.aircycle.ui.countdown;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
@Module
public class CountdownModule {

    private final CountdownMvp.View view;

    public CountdownModule(CountdownMvp.View view) {
        this.view = view;
    }

    @Provides @PerActivity CountdownMvp.View provideView() {
        return view;
    }

    @Provides @PerActivity CountdownMvp.Presenter providePresenter(CountdownMvp.View view,
            CountdownManager countdownManager) {