package com.wisewoods.eduandroid.ui.adapter;


import com.chad.library.adapter.base.BaseNodeAdapter;
import com.chad.library.adapter.base.entity.node.BaseNode;
import com.wisewoods.base.bean.TreePeopleBean;
import com.wisewoods.eduandroid.ui.adapter.provider.FirstProvider;
import com.wisewoods.eduandroid.ui.adapter.provider.ThirdProvider;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class PeopleAdapter extends BaseNodeAdapter {
    public PeopleAdapter() {
        super();
        addNodeProvider(new FirstProvider());
        addNodeProvider(new ThirdProvider());
    }


    @Override
    protected int getItemType(@NotNull List<? extends BaseNode> data, int position) {
        TreePeopleBean.DataBean node = (TreePeopleBean.DataBean) data.get(position);
        if (node.userId > 0) {
            return 1;
        } else {
            return 0;
        }
    }

    public static final int EXPAND_COLLAPSE_PAYLOAD = 110;
}
