import {
  Alert,
  Button,
  Dialog,
  DialogActions,
  DialogContent,
  DialogTitle,
} from "@mui/material";
import React from "react";

interface McpConfigurationWarningDialogProps {
  open: boolean;
  onClose: () => void;
  onConfirm: () => void;
}

export const McpConfigurationWarningDialog: React.FC<
  McpConfigurationWarningDialogProps
> = ({ open, onClose, onConfirm }) => {
  return (
    <Dialog
      open={open}
      onClose={onClose}
      aria-labelledby="mcp-warning-dialog-title"
      aria-describedby="mcp-warning-dialog-description"
    >
      <DialogTitle id="mcp-warning-dialog-title">Warning</DialogTitle>
      <DialogContent>
        <Alert severity="warning" variant="outlined">
          Meta Agents Research Environments is a research tool with no security
          features. It does not implement any protection against prompt
          injection with non-simulated MCP apps. Users are responsible for
          verifying the safety of custom MCP configurations.
        </Alert>
      </DialogContent>
      <DialogActions>
        <Button onClick={onClose}>Cancel</Button>
        <Button
          color="primary"
          variant="contained"
          onClick={onConfirm}
          autoFocus
        >
          I understand
        </Button>
      </DialogActions>
    </Dialog>
  );
};
