import React, {useContext} from "react";
import {Dialog as MuiDialog, DialogActions, DialogContent, DialogContentText, DialogTitle} from "@mui/material";
import {Button} from "@material-ui/core";
import {LocaleContext} from "../locale";
import "./dialog.css";
export default function Dialog(props) {
const show = props.show;
const onClose = props.onClose || function() { };
const onOption = props.onOption || function() { };
const options = props.options || ["Close"];
const type = props.type || "default";
const {translate: L} = useContext(LocaleContext);
let buttons = [];
for (let name of options) {
let type = "default";
if (name === "Yes") type = "warning";
else if(name === "No") type = "danger";
buttons.push(
)
}
return
{ props.title }
{ props.message }
{buttons}
}