package com.hongyegroup.cpt_parttime.mvvm

import com.guadou.lib_baselib.base.vm.BaseViewModel
import com.hongyegroup.cpt_parttime.adapter.PopupPositionAdapter
import com.hongyegroup.cpt_parttime.bean.PopupTitleSubTitleBean

class PopupFiltersViewModel : BaseViewModel() {

    val mFilterDatas = mutableListOf<PopupTitleSubTitleBean>()

    val mAdapter by lazy { PopupPositionAdapter(mFilterDatas) }

    /**
     * 获取职位类型数据
     */
    fun getPositionDataes() {

        //1
        val list1 = listOf(
            PopupTitleSubTitleBean.SubBean("不限").apply { isSelected = true },
            PopupTitleSubTitleBean.SubBean("16"),
            PopupTitleSubTitleBean.SubBean("17"),
            PopupTitleSubTitleBean.SubBean("18-20"),
            PopupTitleSubTitleBean.SubBean("21-30"),
            PopupTitleSubTitleBean.SubBean("31-40"),
            PopupTitleSubTitleBean.SubBean("41-50"),
        )
        val positionBean1 = PopupTitleSubTitleBean("0", "年龄要求", list1)
        mFilterDatas.add(positionBean1)

        //2
        val list2 = listOf(
            PopupTitleSubTitleBean.SubBean("不限").apply { isSelected = true },
            PopupTitleSubTitleBean.SubBean("男生可做"),
            PopupTitleSubTitleBean.SubBean("女生可做"),
        )
        val positionBean2 = PopupTitleSubTitleBean("0", "性别要求", list2)
        mFilterDatas.add(positionBean2)

        //3
        val list3 = listOf(
            PopupTitleSubTitleBean.SubBean("不限").apply { isSelected = true },
            PopupTitleSubTitleBean.SubBean("中文"),
            PopupTitleSubTitleBean.SubBean("英文"),
        )
        val positionBean3 = PopupTitleSubTitleBean("0", "语言", list3)
        mFilterDatas.add(positionBean3)

        //4
        val list4 = listOf(
            PopupTitleSubTitleBean.SubBean("不限").apply { isSelected = true },
            PopupTitleSubTitleBean.SubBean("日结"),
            PopupTitleSubTitleBean.SubBean("月结"),

            )
        val positionBean4 = PopupTitleSubTitleBean("0", "结算方式", list4)
        mFilterDatas.add(positionBean4)

    }

}