import { Reply } from "@mui/icons-material";
import { IconButton, Tooltip } from "@mui/material";
import { useState } from "react";
import ChangeStatusDialog from "./Dialog";

const ChangeStatus = ({ row, mutate }) => {
    const [open, setOpen] = useState(false);
    return (
        <>
            <Tooltip title="تغییر وضعیت">
                <IconButton color="primary" onClick={() => setOpen(true)}>
                    <Reply />
                </IconButton>
            </Tooltip>
            <ChangeStatusDialog open={open} setOpen={setOpen} mutate={mutate} row={row} />
        </>
    );
};
export default ChangeStatus;
