package com.example.myapplication.components.templates

import ButtonNice
import TextNice
import android.graphics.Bitmap
import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.compose.rememberNavController
import com.example.myapplication.R
import myColor4

@Composable
fun ProductPage(name: String, info: String, price: Double, img: Bitmap, onClickAction: () -> Unit){
    LazyColumn (modifier = Modifier.fillMaxSize().padding(10.dp)) {

        item{
            TextNice(name)
        }

        item {

            Image(
                bitmap = img.asImageBitmap(),
                contentDescription = null,
                modifier = Modifier.size(150.dp)
            )
        }

        item{TextNice("Характеристики: ")}
        item{Text(info)}
        item{ButtonNice("Добавить в корзину", myColor4, onClickAction )}
    }
}