// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/ui/Observable1Activity.java
// @EActivity
// public class Observable1Activity extends AppCompatActivity {
// 
//     @InstanceState
//     protected Observable1ViewModel.State state;
// 
//     @Inject
//     protected Observable1ViewModel observable1ViewModel;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         Napkin.<AppComponent>provideAppComponent(this)
//                 .with(new NapkinActivityModule(this))
//                 .inject(this);
//         observable1ViewModel.restoreState(state);
//         ActivityObservable1Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_observable1);
//         binding.setViewModel(observable1ViewModel);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         state = observable1ViewModel.saveState();
//     }
// 
//     @Override
//     protected void onStart() {
//         super.onStart();
//         observable1ViewModel.restoreObservables();
//     }
// 
//     @Override
//     protected void onStop() {
//         super.onStop();
//         observable1ViewModel.unsubscribe();
//     }
// }
// 
// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/ui/Observable2Activity.java
// @EActivity
// public class Observable2Activity extends AppCompatActivity {
// 
//     @InstanceState
//     protected Observable2ViewModel.State state;
// 
//     @Inject
//     protected Observable2ViewModel observable2ViewModel;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         Napkin.<AppComponent>provideAppComponent(this)
//                 .with(new NapkinActivityModule(this))
//                 .inject(this);
//         observable2ViewModel.restoreState(state);
//         ActivityObservable2Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_observable2);
//         binding.setViewModel(observable2ViewModel);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         state = observable2ViewModel.saveState();
//     }
// 
//     @Override
//     protected void onStart() {
//         super.onStart();
//         observable2ViewModel.restoreObservables();
//     }
// 
//     @Override
//     protected void onStop() {
//         super.onStop();
//         observable2ViewModel.dispose();
//     }
// }


import com.github.aleksandermielczarek.napkin.module.NapkinActivityModule;
import com.github.aleksandermielczarek.napkin.scope.ActivityScope;
import com.github.aleksandermielczarek.observablecacheexample.ui.Observable1Activity;
import com.github.aleksandermielczarek.observablecacheexample.ui.Observable2Activity;
import dagger.Subcomponent;
package com.github.aleksandermielczarek.observablecacheexample.component;




/**
 * Created by Aleksander Mielczarek on 12.11.2016.
 */
@ActivityScope
@Subcomponent(modules = NapkinActivityModule.class)
public interface ActivityComponent {

    void inject(Observable1Activity observable1Activity);

// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/ui/Observable1Activity.java
// @EActivity
// public class Observable1Activity extends AppCompatActivity {
// 
//     @InstanceState
//     protected Observable1ViewModel.State state;
// 
//     @Inject
//     protected Observable1ViewModel observable1ViewModel;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         Napkin.<AppComponent>provideAppComponent(this)
//                 .with(new NapkinActivityModule(this))
//                 .inject(this);
//         observable1ViewModel.restoreState(state);
//         ActivityObservable1Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_observable1);
//         binding.setViewModel(observable1ViewModel);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         state = observable1ViewModel.saveState();
//     }
// 
//     @Override
//     protected void onStart() {
//         super.onStart();
//         observable1ViewModel.restoreObservables();
//     }
// 
//     @Override
//     protected void onStop() {
//         super.onStop();
//         observable1ViewModel.unsubscribe();
//     }
// }
// 
// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/ui/Observable2Activity.java
// @EActivity
// public class Observable2Activity extends AppCompatActivity {
// 
//     @InstanceState
//     protected Observable2ViewModel.State state;
// 
//     @Inject
//     protected Observable2ViewModel observable2ViewModel;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         Napkin.<AppComponent>provideAppComponent(this)
//                 .with(new NapkinActivityModule(this))
//                 .inject(this);
//         observable2ViewModel.restoreState(state);
//         ActivityObservable2Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_observable2);
//         binding.setViewModel(observable2ViewModel);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         state = observable2ViewModel.saveState();
//     }
// 
//     @Override
//     protected void onStart() {
//         super.onStart();
//         observable2ViewModel.restoreObservables();
//     }
// 
//     @Override
//     protected void onStop() {
//         super.onStop();
//         observable2ViewModel.dispose();
//     }
// }


// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/component/ActivityComponent.java
import com.github.aleksandermielczarek.napkin.module.NapkinActivityModule;
import com.github.aleksandermielczarek.napkin.scope.ActivityScope;
import com.github.aleksandermielczarek.observablecacheexample.ui.Observable1Activity;
import com.github.aleksandermielczarek.observablecacheexample.ui.Observable2Activity;
import dagger.Subcomponent;

package com.github.aleksandermielczarek.observablecacheexample.component;




/**
 * Created by Aleksander Mielczarek on 12.11.2016.
 */
@ActivityScope
@Subcomponent(modules = NapkinActivityModule.class)
public interface ActivityComponent {

    void inject(Observable1Activity observable1Activity);

    void inject(Observable2Activity observable2Activity);