package kr.co.hanwha.hifive.adapter.contract;

import android.support.annotation.NonNull;

import java.util.ArrayList;

import kr.co.hanwha.hifive.base.BaseListContract;
import kr.co.hanwha.hifive.data.model.MainProjectRoot;
import kr.co.hanwha.hifive.data.model.ProjectTaskInfo;
import kr.co.hanwha.hifive.data.model.SpinnerData;
import kr.co.hanwha.hifive.enums.ProjectFilterType;

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

public interface MainProjectListContract extends BaseListContract {
    interface OnMainProjectListListener {
        /**
         * Project 변경
         *
         * @param project_id Project_id
         */
        void onProjectItemSelected(@NonNull int project_id);

        /**
         * TASK 클릭
         *
         * @param data TASK 데이터
         */
        void onItemClicked(@NonNull ProjectTaskInfo data);

        /**
         * 프로젝트 색상 변경
         */
        void onProjectColorClicked();

        /**
         * ISSUE 입력/수정
         */
        void onEditIssueClicked();

        /**
         * Select filter
         *
         * @param filterType
         */
        void onFilterClicked(@NonNull ProjectFilterType filterType);
    }

    interface View {
        void notifyDataAll();

        void notifyDataRangeChanged(int positionStart, int itemCount);
    }

    interface Model {
        void setProjectId(int projectId);

        void addItems(ArrayList<SpinnerData> listProjects);

        void addItems(MainProjectRoot data);
    }
}
