/**
 * @file DialogYesNo.js
 * @author Radim Buráň (xburan03@stud.fit.vutbr.cz)
 */

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

function DialogYesNo(props) {
    const fceYes = props.fceYes;
    const fceNo = props.fceNo;
    const title = props.title;
    const description = props.description;
    const isOpen = props.isOpen;

    return (
        <Dialog open={isOpen} onClose={fceNo}>
            <DialogTitle>{title}</DialogTitle>
            <DialogContent>
                <DialogContentText>{description}</DialogContentText>
            </DialogContent>
            <DialogActions>
                <Button onClick={fceYes} variant={"contained"} autoFocus>Ano</Button>
                <Button onClick={fceNo}>Ne</Button>
            </DialogActions>
        </Dialog>
    );
}

export default DialogYesNo;