package kr.co.hanwha.hifive.screen.main.project;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import kr.co.hanwha.hifive.base.BasePresenter;
import kr.co.hanwha.hifive.base.BaseView;
import kr.co.hanwha.hifive.data.model.ProjectInfo;
import kr.co.hanwha.hifive.enums.ProjectEvaluationType;
import kr.co.hanwha.hifive.screen.main.home.MainHomeContract;

/**
 * Created by sanghoonkwon on 2018. 2. 20..
 */

public interface MainProjectContract {
    interface View extends BaseView<MainHomeContract.Presenter> {
        void setRefreshing(boolean refreshing);

        void setProjectId(int projectId);

        /**
         * 소속된 유닛이 없을 경우
         *
         * @param empty Boolean
         */
        void setEmptyView(boolean empty);

        /**
         * 자연스러운 화면 전환을 위해 흰 배경 처리
         * @param visible Boolean
         */
        void setBackgroundView(boolean visible);
    }

    interface Presenter extends BasePresenter {
        /**
         * Initialize Project info
         */
        void initProjectList();

        /**
         * Initialize Data
         *
         * @param needLoading ProgressBar
         */
        void initTaskData(@NonNull boolean needLoading);

        /**
         * Set Project & refresh lsit
         *
         * @param projectId ID
         */
        void setProjectId(int projectId);

        /**
         * Get Project Id
         *
         * @return Integer
         */
        int getProjectId();

        /**
         * 필터 : 진행중 / 전체
         * @param isAll Boolean
         */
        void setIsAll(boolean isAll);

        /**
         * Change issue(web view)
         */
        void showEditIssueDialog();

        /**
         * Change project color dialog
         */
        void showProjectColorDialog();

        /**
         * Update project color
         *
         * @param type evaluation color
         */
        void updateProjectColor(ProjectEvaluationType type);
    }
}
