package com.ys.bdtp.adm.mvvm.ui.compose

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
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.res.painterResource
import androidx.compose.ui.text.font.FontWeight.Companion.Bold
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.ys.bdtp.adm.R

@Composable
fun HeadLeft() {
    Row(
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.Start
    ) {

        Spacer(modifier = Modifier.width(32.dp))

        Image(
            painter = painterResource(R.drawable.arrow_back),
            contentDescription = "",
            modifier = Modifier.size(24.dp)
        )

        Spacer(
            modifier = Modifier.width(16.dp)
        )

        Spacer(
            modifier = Modifier
                .width(1.dp)
                .height(16.dp)
                .background(Color(0xFFD8D8D8))
        )

        Spacer(
            modifier = Modifier.width(16.dp)
        )

        Text(text = "京东", fontSize = 16.sp, fontWeight = Bold, color = Color(0xFF1F2329))

        Spacer(modifier = Modifier.width(16.dp))

        Image(
            painter = painterResource(R.drawable.arrow_down),
            contentDescription = "",
            modifier = Modifier.size(16.dp)
        )
    }
}


@Preview
@Composable
fun PreviewTopLeft() {
    HeadLeft()
}
