package com.quansu.heifengwuliu.adapter;

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.quansu.heifengwuliu.R;
import com.quansu.heifengwuliu.databinding.ItemAreaselectBinding;
import com.quansu.heifengwuliu.model.AreaBean;
import com.quansu.heifengwuliu.vmodel.AreaSelectVModel;
import com.ysnows.base.base.BAdapter;

import org.jetbrains.annotations.NotNull;

public class AreaSelectAdapter extends BAdapter<AreaBean, BaseDataBindingHolder<ItemAreaselectBinding>> {

    private AreaSelectVModel vm;

    public AreaSelectAdapter(AreaSelectVModel vm) {
        super(R.layout.item_areaselect, null);
        this.vm = vm;
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemAreaselectBinding> helper, AreaBean todo) {
        ItemAreaselectBinding binding = helper.getDataBinding();
        binding.setItem(todo);
        binding.setVm(vm);

    }
}
