// Path: app/src/main/java/com/konifar/annict/util/PageNavigator.java
// @ActivityScope
// public class PageNavigator {
// 
//     AppCompatActivity activity;
// 
//     @Inject
//     public PageNavigator(AppCompatActivity activity) {
//         this.activity = activity;
//     }
// 
//     public void finish() {
//         activity.finish();
//     }
// 
//     public void startCustomTab(@NonNull String url) {
//         CustomTabsIntent intent = new CustomTabsIntent.Builder().setShowTitle(true)
//             .setToolbarColor(ContextCompat.getColor(activity, R.color.theme500))
//             .build();
// 
//         intent.launchUrl(activity, Uri.parse(url));
//     }
// 
//     public void replaceMainFragment(@IdRes int layoutResId) {
//         replaceFragment(MainFragment.newInstance(), layoutResId);
//     }
// 
//     private void replaceFragment(@NonNull Fragment fragment, @IdRes int layoutResId) {
//         final FragmentTransaction ft = activity.getSupportFragmentManager().beginTransaction();
//         ft.replace(layoutResId, fragment, fragment.getClass().getSimpleName());
//         ft.commit();
//     }
// 
//     public void replaceMainFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(MainFragment.newInstance(authCode), layoutResId);
//     }
// 
//     public void replaceMyProgramsFragment(@IdRes int layoutResId) {
//         replaceFragment(MyProgramsFragment.newInstance(), layoutResId);
//     }
// 
//     public void replaceMyProgramsFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(MyProgramsFragment.newInstance(authCode), layoutResId);
//     }
// 
//     public void startLoginActivity() {
//         activity.startActivity(LoginActivity.createIntent(activity));
//     }
// 
//     public void startEpisodeDetailActivity(@Nullable Program program) {
//         activity.startActivity(EpisodeDetailActivity.createIntent(activity, program));
//     }
// 
//     public void startWorkDetailActivity(@Nullable Work work) {
//         activity.startActivity(WorkDetailActivity.createIntent(activity, work));
//     }
// 
//     public void showRecordCreateDialog(Program program) {
//         RecordCreateDialogFragment dialog = RecordCreateDialogFragment.newInstance(program);
//         dialog.show(activity.getSupportFragmentManager(), RecordCreateDialogFragment.TAG);
//     }
// 
//     public void startSettingsActivity() {
//         activity.startActivity(SettingsActivity.createIntent(activity));
//     }
// 
//     public void showStatusSelectDialog(Status status, StatusSelectDialog.Callback cb) {
//         StatusSelectDialog.show(activity, status, cb);
//     }
// 
//     public void startSearchActivity() {
//         SearchActivity.start(activity);
//     }
// 
//     public void replaceSearchFragment(@IdRes int layoutResId) {
//         replaceFragment(SearchFragment.newInstance(), layoutResId);
//     }
// 
//     public void replaceSearchFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(SearchFragment.newInstance(authCode), layoutResId);
//     }
// }


import com.konifar.annict.util.PageNavigator;
import android.databinding.BaseObservable;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import javax.inject.Inject;
package com.konifar.annict.viewmodel;




public class SearchViewModel extends BaseObservable implements ViewModel {

    private final PageNavigator navigator;

    @Inject
// Path: app/src/main/java/com/konifar/annict/util/PageNavigator.java
// @ActivityScope
// public class PageNavigator {
// 
//     AppCompatActivity activity;
// 
//     @Inject
//     public PageNavigator(AppCompatActivity activity) {
//         this.activity = activity;
//     }
// 
//     public void finish() {
//         activity.finish();
//     }
// 
//     public void startCustomTab(@NonNull String url) {
//         CustomTabsIntent intent = new CustomTabsIntent.Builder().setShowTitle(true)
//             .setToolbarColor(ContextCompat.getColor(activity, R.color.theme500))
//             .build();
// 
//         intent.launchUrl(activity, Uri.parse(url));
//     }
// 
//     public void replaceMainFragment(@IdRes int layoutResId) {
//         replaceFragment(MainFragment.newInstance(), layoutResId);
//     }
// 
//     private void replaceFragment(@NonNull Fragment fragment, @IdRes int layoutResId) {
//         final FragmentTransaction ft = activity.getSupportFragmentManager().beginTransaction();
//         ft.replace(layoutResId, fragment, fragment.getClass().getSimpleName());
//         ft.commit();
//     }
// 
//     public void replaceMainFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(MainFragment.newInstance(authCode), layoutResId);
//     }
// 
//     public void replaceMyProgramsFragment(@IdRes int layoutResId) {
//         replaceFragment(MyProgramsFragment.newInstance(), layoutResId);
//     }
// 
//     public void replaceMyProgramsFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(MyProgramsFragment.newInstance(authCode), layoutResId);
//     }
// 
//     public void startLoginActivity() {
//         activity.startActivity(LoginActivity.createIntent(activity));
//     }
// 
//     public void startEpisodeDetailActivity(@Nullable Program program) {
//         activity.startActivity(EpisodeDetailActivity.createIntent(activity, program));
//     }
// 
//     public void startWorkDetailActivity(@Nullable Work work) {
//         activity.startActivity(WorkDetailActivity.createIntent(activity, work));
//     }
// 
//     public void showRecordCreateDialog(Program program) {
//         RecordCreateDialogFragment dialog = RecordCreateDialogFragment.newInstance(program);
//         dialog.show(activity.getSupportFragmentManager(), RecordCreateDialogFragment.TAG);
//     }
// 
//     public void startSettingsActivity() {
//         activity.startActivity(SettingsActivity.createIntent(activity));
//     }
// 
//     public void showStatusSelectDialog(Status status, StatusSelectDialog.Callback cb) {
//         StatusSelectDialog.show(activity, status, cb);
//     }
// 
//     public void startSearchActivity() {
//         SearchActivity.start(activity);
//     }
// 
//     public void replaceSearchFragment(@IdRes int layoutResId) {
//         replaceFragment(SearchFragment.newInstance(), layoutResId);
//     }
// 
//     public void replaceSearchFragment(@NonNull String authCode, @IdRes int layoutResId) {
//         replaceFragment(SearchFragment.newInstance(authCode), layoutResId);
//     }
// }


// Path: app/src/main/java/com/konifar/annict/viewmodel/SearchViewModel.java
import com.konifar.annict.util.PageNavigator;
import android.databinding.BaseObservable;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import javax.inject.Inject;

package com.konifar.annict.viewmodel;




public class SearchViewModel extends BaseObservable implements ViewModel {

    private final PageNavigator navigator;

    @Inject
    public SearchViewModel(PageNavigator navigator) {