package com.base.appzxhy.ui.concatAdapter

import android.content.Context
import android.view.ViewGroup
import com.base.appzxhy.R
import com.base.appzxhy.databinding.ItemShortplayWatchBinding
import com.base.appzxhy.ui.adapter.CommonViewHolder
import com.base.appzxhy.utils.XmlEx.inflate
import com.bytedance.sdk.shortplay.api.ShortPlay
import com.chad.library.adapter4.BaseQuickAdapter

class ShortPlayWatchAdapter(
    val list: List<ShortPlay>
) : BaseQuickAdapter<Any, CommonViewHolder>() {

    override fun getItemCount(items: List<Any>): Int {
        return 1
    }

    override fun onBindViewHolder(holder: CommonViewHolder, position: Int, item: Any?) {
        val binding = ItemShortplayWatchBinding.bind(holder.itemView)

        if (binding.rv.adapter == null) {
//            val adapter =
        }
    }

    override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): CommonViewHolder {
        return CommonViewHolder(R.layout.item_shortplay_watch.inflate(parent))
    }

    inner class WatchShortAdapter : BaseQuickAdapter<ShortPlay, CommonViewHolder>() {
        override fun onBindViewHolder(holder: CommonViewHolder, position: Int, item: ShortPlay?) {

        }

        override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): CommonViewHolder {
            return CommonViewHolder(R.layout.item_shortplay_style_2.inflate(parent))
        }

    }
}