package com.example.pmulabs.screensMobile

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.requiredWidth
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.lazy.LazyColumn
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.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController

@Composable
fun CoopScreen(navController: NavController,modifier: Modifier = Modifier) {
    LazyColumn(
        modifier = modifier
            .background(Color.White),
        contentPadding = PaddingValues(top =70.dp, bottom = 105.dp, start = 10.dp),
        verticalArrangement = Arrangement.spacedBy(15.dp)
    ) {
        item {
            Box(
                modifier = Modifier
                    .requiredWidth(width = 393.dp)
                    .requiredHeight(height = 275.dp)
            ) {
                Box(
                    modifier = Modifier
                        .align(alignment = Alignment.TopStart)
                        .offset(x = 0.dp,
                            y = 21.810302734375.dp)
                        .requiredWidth(width = 393.dp)
                        .requiredHeight(height = 253.dp)
                ) {
                    Box(
                        modifier = Modifier
                            .requiredWidth(width = 393.dp)
                            .requiredHeight(height = 253.dp)
                            .clip(shape = RoundedCornerShape(5.dp))
                            .background(color = Color.White)
                            .border(border = BorderStroke(3.dp, Color(0xffdbdbf1)),
                                shape = RoundedCornerShape(5.dp)))
                    Text(
                        text = "    Мы предлагаем рекламные размещения под любой бюджет и аудиторию. \n\n    На ресурсе самые лучшие посетители. У нас нет \"школьников\", \"мимо проходящих\", ботов, \"просто интересующихся\". Нас читают те, кто глубоко погружен в технику.\n\n    У нас много трафика и нормальные цены за нормальную отдачу,а также рекламные возможности на любой бюджет. ",
                        color = Color(0xff423a99),
                        style = TextStyle(
                            fontSize = 15.sp,
                            fontWeight = FontWeight.Bold),
                        modifier = Modifier
                            .align(alignment = Alignment.TopStart)
                            .offset(x = 14.dp,
                                y = 34.189697265625.dp)
                            .requiredWidth(width = 368.dp)
                            .wrapContentHeight(align = Alignment.CenterVertically))
                }
                Box(
                    modifier = Modifier
                        .requiredWidth(width = 393.dp)
                        .requiredHeight(height = 44.dp)
                ) {
                    Box(
                        modifier = Modifier
                            .requiredWidth(width = 393.dp)
                            .requiredHeight(height = 44.dp)
                            .clip(shape = RoundedCornerShape(15.dp))
                            .background(color = Color(0xff423a99)))
                    Text(
                        text = "О рекламе",
                        color = Color.White,
                        style = TextStyle(
                            fontSize = 17.sp,
                            fontWeight = FontWeight.Bold),
                        modifier = Modifier
                            .align(alignment = Alignment.TopStart)
                            .offset(x = 24.dp,
                                y = 0.dp)
                            .requiredWidth(width = 210.dp)
                            .requiredHeight(height = 44.dp)
                            .wrapContentHeight(align = Alignment.CenterVertically))
                }
            }
        }
        item {
            Box(
                modifier = Modifier
                    .offset(x = 0.dp,
                        y = 11.dp)
                    .requiredWidth(width = 404.dp)
                    .requiredHeight(height = 420.dp)
            ) {
                Box(
                    modifier = Modifier
                        .align(alignment = Alignment.TopStart)
                        .offset(x = 0.dp,
                            y = 21.dp)
                        .requiredWidth(width = 404.dp)
                        .requiredHeight(height = 420.dp)
                ) {
                    Box(
                        modifier = Modifier
                            .requiredWidth(width = 393.dp)
                            .requiredHeight(height = 420.dp)
                            .clip(shape = RoundedCornerShape(5.dp))
                            .background(color = Color.White)
                            .border(border = BorderStroke(3.dp, Color(0xffdbdbf1)),
                                shape = RoundedCornerShape(5.dp)))
                    Text(
                        text = buildAnnotatedString {
                            withStyle(style = SpanStyle(
                                color = Color(0xff423a99),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("КОММЕРЧЕСКИЙ ДИРЕКТОР:\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff847fbe),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("Александр Воробьёв\nvorobiev@ixbt.com\n+7 (499) 519-00-95\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff423a99),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("ДИРЕКТОР ПО РЕКЛАМЕ:\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff847fbe),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("Владимир Сливко\nvslivko@ixbt.com\n+7 (916) 134-14-72\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff423a99),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("ПРОДАКТ-МЕНЕДЖЕР:")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff423a99),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append(" \n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff847fbe),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("Дарья Галиева\ndgalieva@ixbt.games\n+7 (499) 519-00-95\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff423a99),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("ГЛАВНЫЙ РЕДАКТОР:\n")}
                            withStyle(style = SpanStyle(
                                color = Color(0xff847fbe),
                                fontSize = 15.sp,
                                fontWeight = FontWeight.Bold)) {append("Виталий Казунов\nlock@ixbt.com\n+7 (499) 519-00-95")}},
                        modifier = Modifier
                            .align(alignment = Alignment.TopStart)
                            .offset(x = 11.dp,
                                y = 10.dp)
                            .requiredWidth(width = 393.dp)
                            .requiredHeight(height = 420.dp)
                            .wrapContentHeight(align = Alignment.CenterVertically))
                }
                Box(
                    modifier = Modifier
                        .requiredWidth(width = 393.dp)
                        .requiredHeight(height = 42.dp)
                ) {
                    Box(
                        modifier = Modifier
                            .requiredWidth(width = 393.dp)
                            .requiredHeight(height = 42.dp)
                            .clip(shape = RoundedCornerShape(15.dp))
                            .background(color = Color(0xff423a99)))
                    Text(
                        text = "Контакты",
                        color = Color.White,
                        style = TextStyle(
                            fontSize = 17.sp,
                            fontWeight = FontWeight.Bold),
                        modifier = Modifier
                            .align(alignment = Alignment.TopStart)
                            .offset(x = 24.dp,
                                y = 0.dp)
                            .requiredWidth(width = 210.dp)
                            .requiredHeight(height = 42.dp)
                            .wrapContentHeight(align = Alignment.CenterVertically))
                }
            }
        }
    }
}


