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

export const ProvinceArchiveFeeDetails = ({ item }) => {
  return (
    <Grid container width="100%">
      <Grid container width="100%" justifyContent="space-between">
        <Typography>تاریخ و زمان:</Typography>
        <Typography>{formatTime(item?.archiver?.date)}</Typography>
      </Grid>
      <Grid container width="100%" justifyContent="space-between">
        <Typography>بایگانی کننده:</Typography>
        <Typography>
          {item?.archiver?.fullname} ({getFaUserRole(item.archiver.role)})
        </Typography>
      </Grid>
      <Grid container width="100%" justifyContent="space-between">
        <Typography>دلیل بایگانی:</Typography>
        <Typography>{item?.archiveMessage}</Typography>
      </Grid>
    </Grid>
  );
};
