// Path: ferro-mvp/src/main/java/com/agna/ferro/mvp/component/provider/ActivityProvider.java
// public class ActivityProvider {
//     private PersistentScreenScope screenScope;
// 
//     public ActivityProvider(PersistentScreenScope screenScope) {
//         this.screenScope = screenScope;
//     }
// 
//     /**
//      * @return actual Activity
//      */
//     public Activity get() {
//         return screenScope.getParentActivity();
//     }
// }
// 
// Path: sample/src/main/java/com/agna/ferro/sample/ui/screen/book/BookActivity.java
// public class BookActivity extends BaseActivity {
//     private static final String EXTRA_BOOK_ID = "EXTRA_BOOK_ID";
// 
//     public static void start(Activity activity, String bookId) {
//         Intent i = new Intent(activity, BookActivity.class);
//         i.putExtra(EXTRA_BOOK_ID, bookId);
//         activity.startActivity(i);
//     }
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_book);
//         FragmentManager fm = getSupportFragmentManager();
//         if (fm.findFragmentByTag(BookFragmentView.class.getSimpleName()) == null) {
//             Fragment fragment = BookFragmentView.create(getIntent().getStringExtra(EXTRA_BOOK_ID));
//             FragmentTransaction fragmentTransaction = fm.beginTransaction();
//             fragmentTransaction.add(R.id.container, fragment, BookFragmentView.class.getSimpleName());
//             fragmentTransaction.commit();
//         }
//     }
// }


import com.agna.ferro.mvp.component.provider.ActivityProvider;
import com.agna.ferro.mvp.component.scope.PerScreen;
import com.agna.ferro.sample.ui.screen.book.BookActivity;
import javax.inject.Inject;
package com.agna.ferro.sample.ui.common.navigation;



/**
 * Encapsulate navigation between screens
 *
 * Example of class, which used {@link ActivityProvider}
 * Object of this class retained in {@link com.agna.ferro.core.PersistentScreenScope} because
 * it part of ScreenComponent
 */
@PerScreen
public class Navigator {

// Path: ferro-mvp/src/main/java/com/agna/ferro/mvp/component/provider/ActivityProvider.java
// public class ActivityProvider {
//     private PersistentScreenScope screenScope;
// 
//     public ActivityProvider(PersistentScreenScope screenScope) {
//         this.screenScope = screenScope;
//     }
// 
//     /**
//      * @return actual Activity
//      */
//     public Activity get() {
//         return screenScope.getParentActivity();
//     }
// }
// 
// Path: sample/src/main/java/com/agna/ferro/sample/ui/screen/book/BookActivity.java
// public class BookActivity extends BaseActivity {
//     private static final String EXTRA_BOOK_ID = "EXTRA_BOOK_ID";
// 
//     public static void start(Activity activity, String bookId) {
//         Intent i = new Intent(activity, BookActivity.class);
//         i.putExtra(EXTRA_BOOK_ID, bookId);
//         activity.startActivity(i);
//     }
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_book);
//         FragmentManager fm = getSupportFragmentManager();
//         if (fm.findFragmentByTag(BookFragmentView.class.getSimpleName()) == null) {
//             Fragment fragment = BookFragmentView.create(getIntent().getStringExtra(EXTRA_BOOK_ID));
//             FragmentTransaction fragmentTransaction = fm.beginTransaction();
//             fragmentTransaction.add(R.id.container, fragment, BookFragmentView.class.getSimpleName());
//             fragmentTransaction.commit();
//         }
//     }
// }


// Path: sample/src/main/java/com/agna/ferro/sample/ui/common/navigation/Navigator.java
import com.agna.ferro.mvp.component.provider.ActivityProvider;
import com.agna.ferro.mvp.component.scope.PerScreen;
import com.agna.ferro.sample.ui.screen.book.BookActivity;
import javax.inject.Inject;

package com.agna.ferro.sample.ui.common.navigation;



/**
 * Encapsulate navigation between screens
 *
 * Example of class, which used {@link ActivityProvider}
 * Object of this class retained in {@link com.agna.ferro.core.PersistentScreenScope} because
 * it part of ScreenComponent
 */
@PerScreen
public class Navigator {

    private final ActivityProvider activityProvider;