package kr.co.hanwha.hifive.screen.task.contract;

import android.support.annotation.NonNull;

import java.util.ArrayList;

import kr.co.hanwha.hifive.base.BasePresenter;
import kr.co.hanwha.hifive.base.BaseView;
import kr.co.hanwha.hifive.data.model.MessageListData;
import kr.co.hanwha.hifive.data.model.TaskDetailData;
import kr.co.hanwha.hifive.data.model.TaskHistoryData;
import kr.co.hanwha.hifive.enums.TaskEvaluationType;
import kr.co.hanwha.hifive.view.HFCommentEditView;

/**
 * Created by sanghoonkwon on 2018. 1. 22..
 */

public interface TaskDetailContract {
    interface View extends BaseView<Presenter> {
        void setLayout(@NonNull TaskDetailData data);

        void setRefreshing(boolean refreshing);

        void scrollToTop();

        void scrollToBottom();

        void clearEditComment();
    }

    interface Presenter extends BasePresenter {
        /**
         * 알림 읽음 표시
         * @param task_id TASK_ID
         * @param project_id PROJECT_ID
         */
        void checkNotificationOpen(@NonNull int task_id, @NonNull int project_id);
        /**
         * Task 상세 조회
         */
        void initData(@NonNull int task_id, @NonNull int project_id, final boolean needLoading);

        /**
         * TASK HISTORY
         */
        void initHistoryData(ArrayList<TaskHistoryData> list);

        /**
         * 댓글 목록 조회
         *
         * @param needScrollBottom 스크롤
         */
        void initMessageData(boolean needScrollBottom, final boolean needLoading);

        /**
         * 다음 댓글 더 보기
         */
        void moreMessageData();

        /**
         * Task 정보 새로고침
         */
        void refreshData();

        /**
         * Task 편집
         */
        void doEditTask();

        /**
         * Task 삭제
         */
        void doDeleteTask();

        /**
         * 평가 팝업 노출
         */
        void showEvaluationDialog();

        /**
         * 평가하기
         */
        void doEvaluation(@NonNull TaskEvaluationType taskEvaluationType);

        /**
         * TASK 수락
         */
        void doTaskAccept();

        /**
         * TASK 반려
         */
        void doTaskReject();

        /**
         * 평가 수락 선택
         */
        void doEvalAcceptClicked();

        /**
         * 평가 반려 선택
         */
        void doEvalRejectClicked();

        /**
         * 요청 삭제
         */
        void doDeleteRequestClicked();

        /**
         * 수정후 재 요청
         */
        void doReRequestClicked();

        /**
         * 댓글 등록
         *
         * @param contents 댓글 내용
         */
        void doAddComment(@NonNull HFCommentEditView commentEditView, @NonNull String contents);

        /**
         * 댓글 삭제
         * @param id 댓글 아이디
         */
        void doDeleteComment(int id);
    }
}
