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

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.wabi.ui.theme.WabiTheme

@Composable
fun CostCounter(
    cost: Double,
    modifier: Modifier = Modifier
) {
    val fontSize = 15
    val lineHeight = 15

    Row (
        modifier = modifier
    ){
        Box (
            modifier = Modifier
                .weight(0.35f)
                .background(
                    color = WabiTheme.colors.mainColor,
                    shape = RoundedCornerShape(topStart = 15.dp, bottomStart = 15.dp)
                )
                .padding(10.dp, 2.dp,0.dp, 1.5.dp),
            contentAlignment = Alignment.Center
        ){
            Text(
                text = "Стомимость корзины",
                style = WabiTheme.fonts.forTextField,
                fontSize = fontSize.sp,
                lineHeight = lineHeight.sp
            )
        }
        Box (
            modifier = Modifier
                .weight(0.55f)
                .background(
                    color = WabiTheme.colors.mainColor,
                    shape = RoundedCornerShape(topEnd = 15.dp, bottomEnd = 15.dp)
                )
                .padding(10.dp, 5.dp,0.dp, 5.dp),
            contentAlignment = Alignment.Center
        ){
            Text(
                text = "~ $cost p.",
                style = WabiTheme.fonts.forTextField,
                fontSize = 20.sp,
                lineHeight = lineHeight.sp
            )
        }
    }
}