package kr.co.hanwha.hifive.screen.main.setting.myhome.contract;

import android.support.annotation.NonNull;

import java.util.List;

import kr.co.hanwha.hifive.base.BasePresenter;
import kr.co.hanwha.hifive.base.BaseView;
import kr.co.hanwha.hifive.data.model.CampaignData;
import kr.co.hanwha.hifive.data.model.ProfileData;
import kr.co.hanwha.hifive.data.model.ProjectInfoData;
import kr.co.hanwha.hifive.data.model.TaskData;

/**
 * Created by aaron on 2018. 8. 28.
 */
public interface MyHomeContract {

    interface OnSettingMyHomeTodoListListener {
        /**
         * TASK 클릭
         *
         * @param data TO-DO 데이터
         */
        void onItemClicked(@NonNull TaskData data);
    }

    interface OnSettingMyHomeOkrListListener {
        /**
         * KR plus 클릭
         *
         * @param campaignData KR 데이터
         */
        void onPlusClicked(@NonNull CampaignData campaignData);

        /**
         * OKR이 없을 때 보여주는 뷰
         */
        void showEmptyView(boolean isShow);
    }

    interface View extends BaseView<Presenter> {
        void refreshData();

        /**
         * OKR 새로고침 완료
         */
        void stopRefreshOkr();

        /**
         * To-Do 새로고침 완료
         */
        void stopRefreshTodo();

        /**
         * Request 새로고침 완료
         */
        void stopRefreshRequest();

        /**
         * Profile 새로고침 완료
         */
        void stopRefreshProfile();

        void setTabIndex(int index);

        void setProfile(@NonNull ProfileData profileData);

        void setProfileUnit(List<ProjectInfoData> projects);
    }

    interface Presenter extends BasePresenter {
        /**
         * Refresh Data
         */
        void refreshData();

        /**
         * Initialize Data
         */
        void initData();

        /**
         * Initialize data
         * OKR
         *
         * @param needLoading 프로그래스 바 노출
         */
        void initDataOkr(int selectMemberId, @NonNull boolean needLoading);

        /**
         * Initialize data
         * To-Do
         *
         * @param needLoading 프로그래스 바 노출
         */
        void initDataTodo(int selectMemberId, @NonNull boolean needLoading);

        /**
         * Initialize data
         * Request
         *
         * @param needLoading 프로그래스 바 노출
         */
        void initDataRequest(int selectMemberId, @NonNull boolean needLoading);

        /**
         * Initialize data
         * Profile
         *
         * @param needLoading 프로그래스 바 노출
         */
        void initDataProfile(int selectMemberId, @NonNull boolean needLoading);

    }
}
