package kr.co.hanwha.hifive.admin.admin.adapter.viewholder;

import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.ViewGroup;
import android.widget.TextView;

import kr.co.hanwha.hifive.R;
import kr.co.hanwha.hifive.admin.network.model.AdminMemberDetailHrInfo;
import kr.co.hanwha.hifive.base.BaseViewHolder;

/**
 * Created by sanghoonkwon on 2018. 3. 12..
 */

public class AdminMemberDetailInfoViewHolder extends BaseViewHolder {
    private TextView mTextViewTitle;
    private TextView mTextViewStatus;

    public AdminMemberDetailInfoViewHolder(@NonNull ViewGroup viewGroup) {
        super(viewGroup, R.layout.item_admin_member_detail_info);

        mTextViewTitle = (TextView) itemView.findViewById(R.id.title_textView);
        mTextViewStatus = (TextView) itemView.findViewById(R.id.status_textView);
    }

    @Override
    public void onBind(Object object, int index) {
        super.onBind(object, index);

        if (object != null && object instanceof AdminMemberDetailHrInfo) {
            final AdminMemberDetailHrInfo data = (AdminMemberDetailHrInfo) object;

            mTextViewTitle.setText(data.getProject_name());

            mTextViewStatus.setText(data.getProject_code() + "(" + data.getProject_status_code() + ")");
        }
    }
/*
    "project_name": "도와줘요개발팀2",
    "project_status_code": 0,
    "project_code": "정상",
*/
}