package com.fastest.pass.splash.presentation.ui.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.fastest.pass.R
import com.fastest.pass.splash.presentation.viewmodels.SplashViewModel

@Composable
fun SplashScreen(viewModel: SplashViewModel) {

//    LaunchedEffect(key1 = true) {
//        viewModel.checkAuthentication()
//    }

    Box(
        modifier = Modifier
            .background(colorResource(id = R.color.blue_login))
            .fillMaxSize(),
        contentAlignment = Alignment.Center
        ) {
        Image(
            modifier = Modifier
//                .width(244.dp)
//                .height(75.dp)
                .padding(horizontal = 50.dp)
                .align(Alignment.Center),
            painter = painterResource(
                id = R.drawable.splashlogo),
            contentDescription = "FastestPass",
        )
    }
}