import { Box, Typography } from "@mui/material";
import { SPACING } from "../../../../data/spacing";

export const DashboardBuyingCarcassess = ({ boxStats }) => (
  <Box
    sx={{
      flex: "1 1 46%",
      minWidth: { xs: "100%", sm: "48%" },
      maxWidth: { xs: "100%", md: "48%" },
      borderRadius: 2,
      border: "1px solid",
      borderColor: "divider",
      p: SPACING.MEDIUM,
      pt: 4,
      display: "flex",
      flexDirection: "column",
      boxSizing: "border-box",
      backgroundColor: "rgba(191, 182, 223, 0.69)",
      textAlign: "left",
    }}
  >
    <Typography textAlign="start" variant="h6" color="primary.main">
      خرید لاشه خارج استان
    </Typography>

    <Box
      mt={2}
      sx={{
        display: "flex",
        flexDirection: "column",
        gap: 1,
        overflowY: "auto",
        flex: 1,
      }}
    >
      <Box
        sx={{
          display: "flex",
          justifyContent: "space-between",
          alignItems: "center",
          height: 48,
          px: 2,
          borderRadius: 1,
          backgroundColor: "#fff",
        }}
      >
        <Typography color="primary.main"> تعداد بار :</Typography>
        <Typography color="primary.main" fontWeight="bold">
          {boxStats?.buyFreeCarcasses?.count?.toLocaleString() || 0}
        </Typography>
      </Box>
      <Box
        sx={{
          display: "flex",
          justifyContent: "space-between",
          alignItems: "center",
          height: 48,
          px: 2,
          borderRadius: 1,
          backgroundColor: "#fff",
        }}
      >
        <Typography color="primary.main">حجم لاشه(قطعه) :</Typography>
        <Typography color="primary.main" fontWeight="bold">
          {boxStats?.buyFreeCarcasses?.quantity?.toLocaleString() || 0}
        </Typography>
      </Box>
      <Box
        sx={{
          display: "flex",
          justifyContent: "space-between",
          alignItems: "center",
          height: 48,
          px: 2,
          borderRadius: 1,
          backgroundColor: "#fff",
        }}
      >
        <Typography color="primary.main">وزن لاشه(کیلوگرم) :</Typography>
        <Typography color="primary.main" fontWeight="bold">
          {boxStats?.buyFreeCarcasses?.weight?.toLocaleString() || 0}
        </Typography>
      </Box>
    </Box>
  </Box>
);
