package com.aiosman.ravenow.ui.splash

import androidx.compose.foundation.Image
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.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.aiosman.ravenow.R

@Composable
fun SplashScreen() {
    Box(
        modifier = Modifier.fillMaxSize()
    ) {
        // 居中的图标
        Image(
            painter = painterResource(id = R.mipmap.invalid_name),
            contentDescription = "App Logo",
            modifier = Modifier
                .align(Alignment.Center)
                .size(120.dp)
        )

        // 底部文字
        Column(
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Bottom,
            modifier = Modifier
                .fillMaxSize()
                .padding(bottom = 80.dp)
        ) {
            Image(
                painterResource(id = R.mipmap.kp_p_img),
                contentDescription = "",
                modifier = Modifier.size(85.dp, 25.dp)
            )
            Spacer(modifier = Modifier.padding(top = 16.dp))
            Text(
                stringResource(R.string.splash_title),
                fontSize = 13.sp
            )
        }
    }
}
