import {
Avatar,
Box,
Button,
Chip,
darken,
DialogActions,
DialogContent,
DialogTitle,
Divider,
Grid2,
IconButton,
List,
ListItem,
ListItemAvatar,
ListItemButton,
ListItemIcon,
ListItemText,
ListSubheader,
PaletteColor,
Theme,
} from "@mui/material";
import ResponsiveDialog from "common/ResponsiveDialog";
import SearchSelect, { Option } from "common/SearchSelect";
import { useSnackbar, useUserAPI } from "hooks";
import { User } from "models";
import PageContainer from "pages/PageContainer";
// import { ListUsersResponse } from "providers/pond/userAPI";
import { useEffect, useState } from "react";
import { makeStyles } from "@mui/styles";
import { getSecondaryColour, getSignatureAccentColour } from "services/whiteLabel";
import { Add, Face, Remove } from "@mui/icons-material";
import ResponsiveTable, { Column } from "common/ResponsiveTable";
const useStyles = makeStyles((theme: Theme) => {
// const isMobile = useMobile()
return ({
gutter: {
backgroundColor: darken(theme.palette.background.paper, 0.03),
border: "none"
},
dataTable: {
backgroundColor: theme.palette.background.paper
},
tableContainer: {
margin: theme.spacing(1),
[theme.breakpoints.up("sm")]: {
margin: theme.spacing(2)
},
width: "auto"
},
title: {
padding: theme.spacing(1)
},
titleContainer: {
border: "none"
},
chipContainer: {
maxWidth: "100%",
maxHeight: "100%",
justifyContent: "flex-start",
alignItems: "flex-start"
},
deleteIcon: {
color: "var(--status-alert)"
},
userAvatar: {
color: "#fff",
backgroundColor: getSecondaryColour()["700" as keyof PaletteColor],
[theme.breakpoints.down("xs")]: {
width: "32px",
height: "32px"
}
},
listItemButton: {
'&:hover': {
color: getSignatureAccentColour()
}
},
avatarContainer: {
textAlign: "center",
justifyContent: "center",
},
addIcon: {
color: "var(--status-ok)"
}})},
);
export default function Users() {
const classes = useStyles();
const userAPI = useUserAPI();
// let tableRef: any = React.createRef();
const { error, success } = useSnackbar();
const [pageSize, setPageSize] = useState(5);
const [isLoading, setIsLoading] = useState(false);
const [page, setPage] = useState(0);
const [total, setTotal] = useState(0);
const [showAllowAction, setShowAllowAction] = useState(false);
const [selectedAction, setSelectedAction] = useState