package com.example.wabi.view.screeens.onboard.items

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
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.example.wabi.ui.theme.WabiTheme

@Composable
fun OnboardStateIndicator(
    pageSize: Int, currentPage: Int
) {
    Row(
        horizontalArrangement = Arrangement.SpaceBetween
    ) {
        repeat(pageSize) {
            Spacer(modifier = Modifier.width(1.5.dp))
            Box(
                modifier = Modifier
                    .height(10.dp)
                    .width(width = if (it == currentPage) 35.dp else 10.dp)
                    .clip(
                        RoundedCornerShape(
                            10.dp
                        )
                    )
                    .background(color = WabiTheme.colors.onBoardLight)
            )
            Spacer(modifier = Modifier.width(1.5.dp))
        }
    }
}