package com.example.mystictale.Screen

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonColors
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.paint
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import com.example.mystictale.R
import com.example.mystictale.navigation.Screens
import com.example.mystictale.resources.components.Loading
import com.example.mystictale.ui.theme.DarkPurple
import com.example.mystictale.ui.theme.OpenSans
import com.example.mystictale.ui.theme.Wolgadeutsche

@Composable
fun Start(navController: NavController) {
    Box(
        Modifier
            .fillMaxSize()
            .paint(
                painterResource(id = R.drawable.background_start),
                contentScale = ContentScale.FillBounds
            ),
        contentAlignment = Alignment.Center
    ) {

        Column(
            Modifier
                .fillMaxHeight(0.5f)
                .fillMaxWidth(),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center
        ) {
            Text("MysticTale", fontSize = 64.sp, color = Color.White, fontFamily = Wolgadeutsche)
            Text(
                "Ваш путь в мир магии и тайн Таро",
                fontSize = 15.sp,
                color = Color.White, fontFamily = OpenSans, fontWeight = FontWeight.Light,
                modifier = Modifier.padding(bottom = 20.dp)
            )
            Spacer(modifier = Modifier.height(50.dp))

            Button(
                onClick = { navController.navigate(Screens.SingIn.route) },
                modifier = Modifier
                    .width(290.dp)
                    .height(48.dp),
                shape = RoundedCornerShape(12.dp),
                colors = ButtonColors(
                    containerColor = Color.White,
                    contentColor = DarkPurple,
                    disabledContentColor = DarkPurple,
                    disabledContainerColor = Color.White
                )
            ) {
                Text("Вход", fontSize = 20.sp, fontWeight = FontWeight.Bold)

            }
            Spacer(modifier = Modifier.height(10.dp))


            Button(
                onClick = { navController.navigate(Screens.RegistrationEmail.route) },
                modifier = Modifier
                    .width(290.dp)
                    .height(48.dp),
                shape = RoundedCornerShape(12.dp),
                colors = ButtonColors(
                    containerColor = DarkPurple,
                    contentColor = Color.White,
                    disabledContentColor = Color.White,
                    disabledContainerColor = DarkPurple
                )
            ) {
                Text("Регистрация", fontSize = 20.sp, fontWeight = FontWeight.Bold)

            }

        }

    }
}