// Path: sample/src/main/java/com/tresorit/zerokitsdk/ZerokitApplication.java
// public class ZerokitApplication extends Application {
// 
//     private ApplicationComponent component;
// 
//     public static ZerokitApplication get(Context context) {
//         return (ZerokitApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         component = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .adminApiModule(new AdminApiModule(BuildConfig.APP_BACKEND, BuildConfig.CLIENT_ID))
//                 .build();
//     }
// 
//     public ApplicationComponent component() {
//         return component;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/CreateTresorFinishedMessage.java
// public class CreateTresorFinishedMessage {
//     private final String tresorId;
// 
//     public CreateTresorFinishedMessage(String tresorId) {
//         this.tresorId = tresorId;
//     }
// 
//     public String getTresorId() {
//         return tresorId;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/module/EncryptModule.java
// @Module
// public class EncryptModule {
// 
//     private final FragmentManager fragmentManager;
// 
//     public EncryptModule(FragmentManager fragmentManager) {
//         this.fragmentManager = fragmentManager;
//     }
// 
//     @Provides
//     @ActivityScope
//     public EncryptViewModel provideEncryptViewModel(Context context) {
//         return new EncryptViewModel(context, fragmentManager);
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/viewmodel/EncryptViewModel.java
// public class EncryptViewModel extends BaseObservable {
// 
//     @SuppressWarnings("WeakerAccess")
//     public final EncryptPagerAdapter pagerAdapter;
//     @SuppressWarnings("WeakerAccess")
//     public final ViewPager.OnPageChangeListener pageChangeListener;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot1;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot2;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot3;
// 
// 
//     public EncryptViewModel(final Context context, FragmentManager fragmentManager) {
//         pagerAdapter = new EncryptPagerAdapter(context, fragmentManager);
//         pageChangeListener = new ViewPager.SimpleOnPageChangeListener() {
// 
//             @Override
//             public void onPageSelected(int position) {
//                 drawableDot1.set(context.getResources().getDrawable(position == 0 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//                 drawableDot2.set(context.getResources().getDrawable(position == 1 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//                 drawableDot3.set(context.getResources().getDrawable(position == 2 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//             }
// 
//         };
// 
//         drawableDot1 = new ObservableField<>(context.getResources().getDrawable(R.drawable.selecteditem_dot));
//         drawableDot2 = new ObservableField<>(context.getResources().getDrawable(R.drawable.nonselecteditem_dot));
//         drawableDot3 = new ObservableField<>(context.getResources().getDrawable(R.drawable.nonselecteditem_dot));
//     }
// 
// 
// 
// }


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.tresorit.zerokitsdk.ZerokitApplication;
import com.tresorit.zerokitsdk.component.DaggerEncryptComponent;
import com.tresorit.zerokitsdk.databinding.FragmentEncryptBinding;
import com.tresorit.zerokitsdk.message.CreateTresorFinishedMessage;
import com.tresorit.zerokitsdk.module.EncryptModule;
import com.tresorit.zerokitsdk.viewmodel.EncryptViewModel;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
    @Inject
    EventBus eventBus;

    @SuppressWarnings("WeakerAccess")
    FragmentEncryptBinding binding;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = FragmentEncryptBinding.inflate(inflater, container, false);
        DaggerEncryptComponent.builder().applicationComponent(ZerokitApplication.get(getActivity()).component()).encryptModule(new EncryptModule(getChildFragmentManager())).build().inject(this);
        binding.setViewmodel(viewModel);
        binding.pager.setPagingEnabled(false);
        return binding.getRoot();
    }

    @Override
    public void onStart() {
        super.onStart();
        eventBus.register(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        eventBus.unregister(this);
    }

    @Subscribe
    @SuppressWarnings("unused")
// Path: sample/src/main/java/com/tresorit/zerokitsdk/ZerokitApplication.java
// public class ZerokitApplication extends Application {
// 
//     private ApplicationComponent component;
// 
//     public static ZerokitApplication get(Context context) {
//         return (ZerokitApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         component = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .adminApiModule(new AdminApiModule(BuildConfig.APP_BACKEND, BuildConfig.CLIENT_ID))
//                 .build();
//     }
// 
//     public ApplicationComponent component() {
//         return component;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/CreateTresorFinishedMessage.java
// public class CreateTresorFinishedMessage {
//     private final String tresorId;
// 
//     public CreateTresorFinishedMessage(String tresorId) {
//         this.tresorId = tresorId;
//     }
// 
//     public String getTresorId() {
//         return tresorId;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/module/EncryptModule.java
// @Module
// public class EncryptModule {
// 
//     private final FragmentManager fragmentManager;
// 
//     public EncryptModule(FragmentManager fragmentManager) {
//         this.fragmentManager = fragmentManager;
//     }
// 
//     @Provides
//     @ActivityScope
//     public EncryptViewModel provideEncryptViewModel(Context context) {
//         return new EncryptViewModel(context, fragmentManager);
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/viewmodel/EncryptViewModel.java
// public class EncryptViewModel extends BaseObservable {
// 
//     @SuppressWarnings("WeakerAccess")
//     public final EncryptPagerAdapter pagerAdapter;
//     @SuppressWarnings("WeakerAccess")
//     public final ViewPager.OnPageChangeListener pageChangeListener;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot1;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot2;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableField<Drawable> drawableDot3;
// 
// 
//     public EncryptViewModel(final Context context, FragmentManager fragmentManager) {
//         pagerAdapter = new EncryptPagerAdapter(context, fragmentManager);
//         pageChangeListener = new ViewPager.SimpleOnPageChangeListener() {
// 
//             @Override
//             public void onPageSelected(int position) {
//                 drawableDot1.set(context.getResources().getDrawable(position == 0 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//                 drawableDot2.set(context.getResources().getDrawable(position == 1 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//                 drawableDot3.set(context.getResources().getDrawable(position == 2 ? R.drawable.selecteditem_dot : R.drawable.nonselecteditem_dot));
//             }
// 
//         };
// 
//         drawableDot1 = new ObservableField<>(context.getResources().getDrawable(R.drawable.selecteditem_dot));
//         drawableDot2 = new ObservableField<>(context.getResources().getDrawable(R.drawable.nonselecteditem_dot));
//         drawableDot3 = new ObservableField<>(context.getResources().getDrawable(R.drawable.nonselecteditem_dot));
//     }
// 
// 
// 
// }


// Path: sample/src/main/java/com/tresorit/zerokitsdk/fragment/EncryptFragment.java
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.tresorit.zerokitsdk.ZerokitApplication;
import com.tresorit.zerokitsdk.component.DaggerEncryptComponent;
import com.tresorit.zerokitsdk.databinding.FragmentEncryptBinding;
import com.tresorit.zerokitsdk.message.CreateTresorFinishedMessage;
import com.tresorit.zerokitsdk.module.EncryptModule;
import com.tresorit.zerokitsdk.viewmodel.EncryptViewModel;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;

    @Inject
    EventBus eventBus;

    @SuppressWarnings("WeakerAccess")
    FragmentEncryptBinding binding;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = FragmentEncryptBinding.inflate(inflater, container, false);
        DaggerEncryptComponent.builder().applicationComponent(ZerokitApplication.get(getActivity()).component()).encryptModule(new EncryptModule(getChildFragmentManager())).build().inject(this);
        binding.setViewmodel(viewModel);
        binding.pager.setPagingEnabled(false);
        return binding.getRoot();
    }

    @Override
    public void onStart() {
        super.onStart();
        eventBus.register(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        eventBus.unregister(this);
    }

    @Subscribe
    @SuppressWarnings("unused")
    public void onEvent(@SuppressWarnings("UnusedParameters") CreateTresorFinishedMessage message){