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

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.ys.bdtp.adm.mvvm.ui.compose.*
import com.ys.bdtp.adm.mvvm.ui.screen.project.Project

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun HomeScreen() {
    Column(modifier = Modifier.fillMaxSize()) {
        Head(
            left = { HeadLeft() },
            right = {
                HeadRight(
                    role = { "管家" },
                    click = { println("heiheihei") }
                )
            }
        )

        Spacer(
            modifier = Modifier.fillMaxWidth().height(1.dp).background(Color(0xFFEFF0F1))
        )

        Content {
            Project()
        }
    }
}


@Preview(widthDp = 1280, heightDp = 800)
@Composable
fun PreviewHomeTopBar() {
    HomeScreen()
}