import PhotoLibraryIcon from "@mui/icons-material/PhotoLibrary";
import { Button, Dialog, DialogActions, DialogContent, IconButton, Tooltip } from "@mui/material";
import { useState } from "react";
import List from "./List";

const ActionPictureDialog = ({ image1, image2, image3 }) => {
    const [openImageDialog, setOpenImageDialog] = useState(false);

    return (
        <>
            <Tooltip title="تصاویر اقدام">
                <IconButton color="primary" onClick={() => setOpenImageDialog(true)}>
                    <PhotoLibraryIcon />
                </IconButton>
            </Tooltip>
            <Dialog
                fullWidth
                open={openImageDialog}
                onClose={() => setOpenImageDialog(false)}
                PaperProps={{
                    sx: {
                        boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
                    },
                }}
                maxWidth={"sm"}
                scroll="paper"
            >
                <DialogContent>
                    <List image1={image1} image2={image2} image3={image3} />
                </DialogContent>
                <DialogActions>
                    <Button onClick={() => setOpenImageDialog(false)} variant="outlined" color="secondary">
                        بستن
                    </Button>
                </DialogActions>
            </Dialog>
        </>
    );
};
export default ActionPictureDialog;
