import { Box } from "@mui/material";
import ConfirmRoadSafetyForm from "./ConfirmRoadSafetyForm";
import ConfirmVerifyRoadSafetyForm from "./ConfirmVerifyRoadSafetyForm";
import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm";
import History from "./History";

const RowActions = ({ row, mutate }) => {
    return (
        <Box sx={{ display: "flex", gap: 1 }}>
            <History rowId={row.original.id} />
            {row.original.state_id == 3 && (
                <ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
            )}
            {row.original.state_id == 6 && (
                <ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
            )}
            {row.original.state_id == 14 && (
                <ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
            )}
        </Box>
    );
};
export default RowActions;
