package com.hikapro.backpack.presenter;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.hikapro.backpack.model.Model;
import com.hikapro.backpack.model.entities.Item;
import com.hikapro.backpack.model.entities.Set;
import com.hikapro.backpack.view.View;

/**
 * Created by tariel on 19/04/16.
 */
public interface Presenter {

    int ADD_TO_BACKSTACK    = 0b0001;
    int TRANSITION_X        = 0b0010;
    int TRANSITION_Y        = 0b0100;

    interface Base {
        Context getAppContext();
        Context getActivityContext();
    }

    interface SetList extends Base {
        void showItemList(Set set);
        void onDestroy(boolean isChangingConfiguration);
        android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
        void setView(com.hikapro.backpack.view.View.SetList view);
        void setModel(Model.Set model);
        Model.Set getModel();
        void notifyDataSetChanged();
        void startProgress();
        void stopProgress();

        //GLM_add_resources_SetList
        void onItemDismiss(int position);
        boolean onItemMove(int fromPosition, int toPosition);
        void onStartDrag(RecyclerView.ViewHolder viewHolder);
    }

    interface ItemList extends Base {

        void onDestroy(boolean isChangingConfiguration);
        android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
        void setView(com.hikapro.backpack.view.View.ItemList view);
        void setModel(Model.Item model);
        Model.Item getModel();
        void notifyDataSetChanged();
        void notifyItemPackStatusChanged();
        void setVisibility();
        Set getCurrentSet();
        void showMessage(String message);
        void onSaveInstanceState(Bundle outState);
        void showDetails(int position);
        void filter(String query);
        void unpack(int setId);
        void restore(int setId);
        void onResume();
        void showRateDialog();
    }

    interface ItemDetail extends Base {
        void setView(com.hikapro.backpack.view.View.ItemDetail view);
        void setModel(Model.Detail model);
        Model.Detail getModel();
        void notifyDataSetChanged();
        void notifyPictureChanged();
        void onDestroy(boolean isChangingConfiguration);
        android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
        void onSaveInstanceState(Bundle outState);
        Item getCurrentItem();
        int getSetId();
    }

    interface Share extends Base {
        void setView(View.Share view);
        void setModel(Model.Share model);
        void notifyDataSetChanged();
        Model.Share getModel();
        void onDestroy(boolean isChangingConfiguration);
        android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);

    }

    interface Add extends Base {
        void setView(View.Add view);
        void setModel(Model.Add model);
        Model.Add getModel();
        void onDestroy(boolean isChangingConfiguration);
        android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
        void notifyDataSetChanged(boolean found);
        void onAddItemClick(Item item);
    }



}
