package com.cheng.blzb.bean

import com.cheng.blzb.R
import com.cheng.blzb.manager.UserConfigManager
import java.io.Serializable

data class MenuEntity(
    val id: String,
    val resId: Int,
    val title: String
): Serializable {
    companion object {
        fun getHomeMenu(): List<MenuEntity> {
            val list = mutableListOf<MenuEntity>()
            list.add(MenuEntity("dljz", R.mipmap.ic_home_icon1, "代理记账"))
            list.add(MenuEntity("qyzc", R.mipmap.ic_home_icon2, "企业注册"))
            list.add(MenuEntity("bszz", R.mipmap.ic_home_icon3, "标书制作"))
            list.add(MenuEntity("zzdb", R.mipmap.ic_home_icon4, "资质代办"))
            UserConfigManager.getBidTypes().forEach {
                when(it.name) {
                    "招标公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon5, it.name))
                    "采购公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon6, it.name))
                    "招标计划" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon7, it.name))
                    "合同公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon8, it.name))
                    "中标公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon9, it.name))
                    "竞争性磋商" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon10, it.name))
                    "更正公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon11, it.name))
                    "终止公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon12, it.name))
                }
            }
            return list
        }
    }
}
