import { Typography } from "@mui/material";
import { Grid } from "../../../../components/grid/Grid";

export const RespSlaughterGuildListItem = ({ data }) => {
  return (
    <Grid mt={2}>
      {data?.map((item, i) => {
        return (
          <Grid
            container
            key={i}
            alignItems="center"
            justifyContent="start"
            flexWrap="nowrap"
            style={{
              backgroundColor:
                i % 2 === 0 ? "rgb(225 225 155)" : "rgb(227 227 128)",
              padding: "10px",
            }}
          >
            <Grid xs={10}>
              <Typography textAlign={"justify"} variant="body1">
                {`${i + 1}- ${item[1]} ${item[3]}`}
              </Typography>
              <Typography textAlign={"justify"} variant="body2">
                {`  تلفن ${item[5]} در شهرستان ${item[9]} با میانگین سهم ${item[10]}`}
              </Typography>
            </Grid>
            <Grid xs={2}>{item[11]}</Grid>
          </Grid>
        );
      })}
    </Grid>
  );
};
