package com.ys.bdtp.adm.mvvm.ui.screen.task

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
fun TaskTitle() {
    Row(
        modifier = Modifier
            .fillMaxWidth()
            .height(60.dp)
            .background(Color(0xFFF8F9FA)),
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.SpaceAround

    ) {
        Text(
            text = "项目名称",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(3f)
        )
        Text(
            text = "楼层",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(2f)
        )
        Text(
            text = "起始时间",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(2f)
        )
        Text(
            text = "项目完成进度",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(3f)
        )

        Text(
            text = "",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(2f)
        )
    }
}

@Preview(widthDp = 1280)
@Composable
fun PreviewProjectRecentTaskTitle() {
    TaskTitle()
}