// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/component/DetailScreenComponent.java
// @DaggerScope(DetailScreenComponent.class)
// @Component(dependencies = ActivityComponent.class, modules = DetailScreenModule.class)
// public interface DetailScreenComponent extends AppComponent {
//     void inject(DetailsView detailsView);
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/module/EditDialogModule.java
// @Module
// public class EditDialogModule {
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/flow/keys/EditContactKey.java
// public final class EditContactKey extends ContactKey implements TreeKey {
// 
//     public EditContactKey(Contact contact) {
//         super(contact);
//     }
// 
//     @NonNull
//     @Override
//     public Object getParentKey() {
//         return new ContactsUIKey();
//     }
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/flow/serviceFactory/InjectionComponent.java
// public interface InjectionComponent<T> {
//     Object createComponent(T parent);
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/model/Contact.java
// @Parcel
// public class Contact {
// 
//     //Don't use private fields, due to reflection penalties using @Parcel
//     String id;
//     String name;
//     List<String> telephone;
// 
//     public Contact() {
//     }
// 
//     @ParcelConstructor
//     public Contact(String id, String name, List<String> telephone) {
//         this.id = id;
//         this.name = name;
//         this.telephone = telephone;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public List<String> getTelephone() {
//         return telephone;
//     }
// 
//     public void setTelephone(List<String> telephone) {
//         this.telephone = telephone;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Contact contact = (Contact) o;
// 
//         return id.equals(contact.id);
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         return id.hashCode();
//     }
// 
//     @Override
//     public String toString() {
//         return "Contact{" +
//                 "id='" + id + '\'' +
//                 ", name='" + name + '\'' +
//                 '}';
//     }
// }


import android.support.annotation.NonNull;
import android.util.Log;
import flow.TreeKey;
import leonardo2204.com.br.flowtests.Layout;
import leonardo2204.com.br.flowtests.R;
import leonardo2204.com.br.flowtests.di.component.DaggerEditDialogComponent;
import leonardo2204.com.br.flowtests.di.component.DetailScreenComponent;
import leonardo2204.com.br.flowtests.di.module.EditDialogModule;
import leonardo2204.com.br.flowtests.flow.keys.EditContactKey;
import leonardo2204.com.br.flowtests.flow.serviceFactory.InjectionComponent;
import leonardo2204.com.br.flowtests.model.Contact;
package leonardo2204.com.br.flowtests.screen;



/**
 * Created by Leonardo on 08/03/2016.
 */
//@Dialog
@Layout(R.layout.edit_dialog_screen)
public class EditDialogScreen implements InjectionComponent<DetailScreenComponent>, TreeKey {

    final Contact contact;

    public EditDialogScreen(Contact contact) {
        this.contact = contact;
    }

    @Override
    public Object createComponent(DetailScreenComponent parent) {
        Log.d("injection", "injecting details");
        return DaggerEditDialogComponent.builder()
                .detailScreenComponent(parent)
// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/component/DetailScreenComponent.java
// @DaggerScope(DetailScreenComponent.class)
// @Component(dependencies = ActivityComponent.class, modules = DetailScreenModule.class)
// public interface DetailScreenComponent extends AppComponent {
//     void inject(DetailsView detailsView);
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/module/EditDialogModule.java
// @Module
// public class EditDialogModule {
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/flow/keys/EditContactKey.java
// public final class EditContactKey extends ContactKey implements TreeKey {
// 
//     public EditContactKey(Contact contact) {
//         super(contact);
//     }
// 
//     @NonNull
//     @Override
//     public Object getParentKey() {
//         return new ContactsUIKey();
//     }
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/flow/serviceFactory/InjectionComponent.java
// public interface InjectionComponent<T> {
//     Object createComponent(T parent);
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/model/Contact.java
// @Parcel
// public class Contact {
// 
//     //Don't use private fields, due to reflection penalties using @Parcel
//     String id;
//     String name;
//     List<String> telephone;
// 
//     public Contact() {
//     }
// 
//     @ParcelConstructor
//     public Contact(String id, String name, List<String> telephone) {
//         this.id = id;
//         this.name = name;
//         this.telephone = telephone;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public List<String> getTelephone() {
//         return telephone;
//     }
// 
//     public void setTelephone(List<String> telephone) {
//         this.telephone = telephone;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Contact contact = (Contact) o;
// 
//         return id.equals(contact.id);
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         return id.hashCode();
//     }
// 
//     @Override
//     public String toString() {
//         return "Contact{" +
//                 "id='" + id + '\'' +
//                 ", name='" + name + '\'' +
//                 '}';
//     }
// }


// Path: app/src/main/java/leonardo2204/com/br/flowtests/screen/EditDialogScreen.java
import android.support.annotation.NonNull;
import android.util.Log;
import flow.TreeKey;
import leonardo2204.com.br.flowtests.Layout;
import leonardo2204.com.br.flowtests.R;
import leonardo2204.com.br.flowtests.di.component.DaggerEditDialogComponent;
import leonardo2204.com.br.flowtests.di.component.DetailScreenComponent;
import leonardo2204.com.br.flowtests.di.module.EditDialogModule;
import leonardo2204.com.br.flowtests.flow.keys.EditContactKey;
import leonardo2204.com.br.flowtests.flow.serviceFactory.InjectionComponent;
import leonardo2204.com.br.flowtests.model.Contact;

package leonardo2204.com.br.flowtests.screen;



/**
 * Created by Leonardo on 08/03/2016.
 */
//@Dialog
@Layout(R.layout.edit_dialog_screen)
public class EditDialogScreen implements InjectionComponent<DetailScreenComponent>, TreeKey {

    final Contact contact;

    public EditDialogScreen(Contact contact) {
        this.contact = contact;
    }

    @Override
    public Object createComponent(DetailScreenComponent parent) {
        Log.d("injection", "injecting details");
        return DaggerEditDialogComponent.builder()
                .detailScreenComponent(parent)
                .editDialogModule(new EditDialogModule())