package com.zaojiao.app.feat.home.index

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
import com.zaojiao.component.common.LJGBanner

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun HomeIndexSwiper() {
    LJGBanner(
        data = listOf(
            "https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF",
            "https://t7.baidu.com/it/u=4198287529,2774471735&fm=193&f=GIF",
            "https://t7.baidu.com/it/u=1956604245,3662848045&fm=193&f=GIF",
            "https://t7.baidu.com/it/u=2529476510,3041785782&fm=193&f=GIF",
        ),
        onImagePath = { _, item ->
            item
        },
        modifier = Modifier
            .padding(horizontal = 16.dp, vertical = 10.dp)
            .aspectRatio(343f / 150f)
            .clip(RoundedCornerShape(20.dp))
            .fillMaxWidth()
    )
}