package kr.co.hanwha.hifive.data.source.contract;

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

import java.util.ArrayList;

import kr.co.hanwha.hifive.base.BaseDataSource;
import kr.co.hanwha.hifive.data.model.BaseData;
import kr.co.hanwha.hifive.data.model.CampaignData;
import kr.co.hanwha.hifive.data.model.MainHomeAssignedRoot;
import kr.co.hanwha.hifive.data.model.MainHomeRequestRoot;
import kr.co.hanwha.hifive.data.model.MemberInfoData;
import kr.co.hanwha.hifive.data.model.MessageAddData;
import kr.co.hanwha.hifive.data.model.MessageListRoot;
import kr.co.hanwha.hifive.data.model.SearchTagData;
import kr.co.hanwha.hifive.data.model.TaskData;
import kr.co.hanwha.hifive.data.model.TaskDetailRoot;
import kr.co.hanwha.hifive.enums.TaskEvaluationType;
import kr.co.hanwha.hifive.network.hanwha.HanwhaNetworkCallback;

/**
 * TASK 관련 데이터 저장소 인터페이스
 *
 * @see kr.co.hanwha.hifive.data.source.TaskDataRepository
 * Created by sanghoonkwon on 2018. 1. 11..
 */

public interface TaskDataSource extends BaseDataSource {

    /**
     * 내 TASK -> 오늘 할일 등록
     *
     * @param context  Context
     * @param taskData Task 데이터
     * @param isToday  TRUE : 오늘할 업무로 추가 / FALSE : 오늘할 업무에서 삭제
     * @param callback 콜백
     */
    void requestSetTaskToday(@NonNull Context context, @NonNull TaskData taskData,
                             @NonNull boolean isToday,
                             @Nullable HanwhaNetworkCallback callback);

    /**
     * TASK 생성
     *
     * @param context        Context
     * @param task_name      TASK 내용
     * @param due_to         기한 설정
     * @param listMemberInfo 받는사람 정보
     * @param campaignData   Campaign Info
     * @param callback       콜백
     */
    void requestSendTask(@NonNull Context context,
                         @NonNull String task_name,
                         @NonNull String due_to,
                         @NonNull ArrayList<MemberInfoData> listMemberInfo,
                         @Nullable CampaignData campaignData,
                         @Nullable HanwhaNetworkCallback callback);

    /**
     * TASK 조회(상세조회)
     *
     * @param context    Context
     * @param task_id    TASK ID
     * @param project_id PROJECT ID
     * @param callback   콜백
     */
    void requestGetTaskDetail(@NonNull Context context,
                              @NonNull int task_id,
                              @NonNull int project_id,
                              @Nullable HanwhaNetworkCallback<TaskDetailRoot> callback);

    /**
     * TASK 수정
     *
     * @param context      Context
     * @param taskData     TASK 데이터
     * @param campaignData Campaign Info
     * @param callback     콜백
     */
    void requestUpdateTask(@NonNull Context context,
                           @NonNull TaskData taskData,
                           @Nullable CampaignData campaignData,
                           @Nullable HanwhaNetworkCallback callback);

    /**
     * TASK 삭제
     *
     * @param context  Context
     * @param taskData TASK 데이터
     * @param callback 콜백
     */
    void requestDeleteTask(@NonNull Context context, @NonNull TaskData taskData,
                           @Nullable HanwhaNetworkCallback callback);

}
