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

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
import com.ys.bdtp.adm.app.theme.thColor

@Composable
fun CadDrawingTitle() {
    Row(
        modifier = Modifier
            .fillMaxWidth()
            .height(40.dp)
            .background(thColor),
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.SpaceAround

    ) {
        Text(
            text = "CAD文件名",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(4f)
        )
        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)
        )
        Text(
            text = "",
            fontSize = 16.sp,
            color = Color(0xFF646C73),
            textAlign = TextAlign.Center,
            maxLines = 1,
            modifier = Modifier.weight(2f)
        )
    }

}

@Preview(widthDp = 900)
@Composable
fun PreviewCadDrawingTitle() {
    CadDrawingTitle()
}