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

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

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.CampaignData;
import kr.co.hanwha.hifive.data.model.MemberInfoData;
import kr.co.hanwha.hifive.data.model.ProjectCampaignData;
import kr.co.hanwha.hifive.data.model.TaskData;
import kr.co.hanwha.hifive.screen.task.AddTaskActivity;
import kr.co.hanwha.hifive.screen.task.AddTaskPresenter;

/**
 * Add Task : Interface
 *
 * @see AddTaskActivity
 * @see AddTaskPresenter
 * Created by sanghoonkwon on 2018. 1. 18..
 */

public interface AddTaskContract {
    interface View extends BaseView<Presenter> {
        /**
         * 기한 설정 표시
         */
        void setDuedate(String selectedDate);

        /**
         * 받는 사람 목록 표시
         *
         * @param list       멤버 목록
         * @param isEditable 수정 가능
         */
        void setReceiverList(@Nullable ArrayList<MemberInfoData> list, @NonNull boolean isEditable);

        /**
         * Campaign  표시
         *
         * @param data Campaign Info
         */
        void setCampaignInfo(@Nullable CampaignData data);

        /**
         * TASK 수정
         *
         * @param taskData TASK 정보
         */
        void setTaskData(@NonNull TaskData taskData);
    }

    interface Presenter extends BasePresenter {
        /**
         * 기본 데이터 설정
         */
        void initData();

        /**
         * 수정할 TASK 데이터 설정
         *
         * @param task_id    TASK ID
         * @param project_id PROJECT_ID
         */
        void initEditData(@NonNull int task_id, @NonNull int project_id);

        /**
         * 기한 설정 캘린더 팝업
         */
        void showCalendarDialog();

        /**
         * 요청 TASK 인지 확인
         *
         * @return 요청 TASK 확인
         */
        boolean isRequest();

        /**
         * TASK 등록
         *
         * @param task_name TASK 내용
         */
        void requestSendTask(@NonNull String task_name);

        /**
         * TASK 수정(Update)
         *
         * @param task_name TASK 내용
         */
        void updateTask(@NonNull String task_name, @NonNull boolean isReRequest);

        /**
         * TASK 수정 & 재 요청
         *
         * @param taskData TASK 데이터
         */
        void doReRequest(@NonNull TaskData taskData);
    }
}
