import { Switch, TableBody, TableCell, TableRow } from "@mui/material";
import { useState } from "react";

export const ProvinceManageUsersRowInspectorOperator = ({ row, item }) => {
  const { details } = item;
  const [checked, setChecked] = useState(details.active);

  const handleChange = () => {
    setChecked(!checked);
  };

  return (
    <TableBody>
      {/* {row.userRoles.map((userRolesRow) => ( */}
      <TableRow key={details.name}>
        <TableCell align="center">{details.address.province.name}</TableCell>
        <TableCell align="center">{details.address.city.name}</TableCell>
        <TableCell align="center">{details.address.address}</TableCell>
        <TableCell align="center">{details.identityDocuments}</TableCell>
        <TableCell align="center">
          <Switch checked={checked} onChange={handleChange} color="primary" />
        </TableCell>
      </TableRow>
      {/* ))} */}
    </TableBody>
  );
};
