package com.zswc.creativity.adapter;

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.zswc.creativity.R;
import com.zswc.creativity.databinding.ItemAreaselectBinding;
import com.zswc.creativity.model.AreaBean;
import com.zswc.creativity.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);

    }
}
