import { Logout } from "@mui/icons-material";
import { Dialog, DialogTitle, IconButton, Tooltip } from "@mui/material";
import { useState } from "react";
import StartMissionContent from "./StartMissionContent";
const StartMission = ({ rowId, mutate }) => {
    const [openStartMissionDialog, setOpenStartMissionDialog] = useState(false);

    return (
        <>
            <Tooltip title="خروج">
                <IconButton color="primary" onClick={() => setOpenStartMissionDialog(true)}>
                    <Logout />
                </IconButton>
            </Tooltip>
            <Dialog
                open={openStartMissionDialog}
                onClose={() => setOpenStartMissionDialog(false)}
                PaperProps={{
                    sx: {
                        boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
                    },
                }}
                dir="rtl"
                maxWidth={"md"}
            >
                <DialogTitle>خروج و شروع ماموریت</DialogTitle>
                <StartMissionContent
                    rowId={rowId}
                    mutate={mutate}
                    setOpenStartMissionDialog={setOpenStartMissionDialog}
                />
            </Dialog>
        </>
    );
};
export default StartMission;
