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

export const InventorySection = ({ boxStats }) => (
  <Box
    sx={{
      flex: "1 1 30%",
      minWidth: { xs: "100%", sm: "340px" },
      maxWidth: { xs: "100%", md: "16%" },
      borderRadius: 2,
      border: "1px solid",
      borderColor: "divider",
      p: SPACING.MEDIUM,
      pt: 4,
      display: "flex",
      flexDirection: "column",
      boxSizing: "border-box",
      backgroundColor: "rgba(0, 128, 0, 0.05)",
      textAlign: "left",
    }}
  >
    <Typography
      variant="h6"
      color="primary.main"
      sx={{ mb: 2, fontSize: { xs: "1rem", lg: "1rem" } }}
    >
      موجودی
    </Typography>

    <Typography variant="body2" mt={3} bgGreen>
      حجم آماده کشتار بزرگتر از 40 روز (قطعه) :
    </Typography>
    <Typography variant="h6" mt={2} color="success.main">
      {boxStats?.inventory?.leftOverBetweenFortySeventyFive?.toLocaleString() ||
        0}
    </Typography>

    <Typography variant="body2" mt={3} bgGreen>
      وزن تقریبی کشتار بزرگتر از 40 روز (کیلوگرم) :
    </Typography>
    <Typography variant="h6" mt={2} color="success.main">
      {boxStats?.inventory?.weightBetweenFortySeventyFive?.toLocaleString() ||
        0}
    </Typography>

    <Typography variant="body2" mt={3} bgGreen>
      میانگین وزن مرغداری‌های آماده کشتار:
    </Typography>
    <Typography variant="h6" mt={2} color="success.main">
      {boxStats?.inventory?.aveWeight?.toLocaleString() || 0} کیلوگرم
    </Typography>

    <Typography variant="body2" mt={3} bgGreen>
      وزن گوشت قابل تولید:
    </Typography>
    <Typography variant="h6" mt={2} color="success.main">
      {boxStats?.inventory?.carcassWeight?.toLocaleString() || 0} کیلوگرم
    </Typography>
  </Box>
);
