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

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import com.example.wabi.model.appModels.screens.OnBoardItem
import com.example.wabi.ui.theme.WabiTheme

//модель отображения onboard
@Composable
fun OnBoardState(onboardItem: OnBoardItem) {
    Column(
        horizontalAlignment = Alignment.CenterHorizontally,
    ) {
        Column(
            modifier = Modifier
                .background(color = WabiTheme.colors.onBoardLight)
                .fillMaxWidth()
                .height(400.dp),
            verticalArrangement = Arrangement.Center,
            horizontalAlignment = Alignment.CenterHorizontally
        ) {
            Image(
                imageVector = ImageVector.vectorResource(onboardItem.image),
                contentDescription = "onboardItem",
                modifier = Modifier.fillMaxHeight()
            )
            Spacer(modifier = Modifier.height(50.dp))
        }
        Spacer(modifier = Modifier.height(30.dp))
        Text(
            text = onboardItem.title,
            style = WabiTheme.fonts.headerFont,
            color = WabiTheme.colors.accentColorOne,
        )
        Spacer(modifier = Modifier.height(10.dp))
        Text(
            text = onboardItem.mainText,
            style = WabiTheme.fonts.mainFont,
            color = WabiTheme.colors.onBoardLight,
            modifier = Modifier.padding(50.dp, 0.dp),
            minLines = 3,
            maxLines = 3
        )
    }
}