import React, { useRef, useState, useEffect } from "react";
import Alert from '@mui/material/Alert';
import Stack from '@mui/material/Stack';
import { IoCloseCircleOutline } from "react-icons/io5";
const Module_Alert_Confirmation = (props) => {
const [showElement, setShowElement] = React.useState(true);
useEffect(() => {
const timer = setTimeout(function () {
props.clear_display_alert_mysy();
setShowElement(false);
}, 4000);
},
[])
return (
{showElement && props.alert_message && String(props.alert_type) === "success" &&
{props.alert_message}
{
props.clear_display_alert_mysy();
setShowElement(false);
}}>
}
{showElement && props.alert_message && String(props.alert_type) === "error" &&
{props.alert_message}
{
props.clear_display_alert_mysy();
setShowElement(false);
}}>
}
{showElement && props.alert_message && String(props.alert_type) === "info" &&
{props.alert_message}
{
props.clear_display_alert_mysy();
setShowElement(false);
}}>
}
{showElement && props.alert_message && String(props.alert_type) === "warning" &&
{props.alert_message}
{
props.clear_display_alert_mysy();
setShowElement(false);
}}>
}
);
}
export default Module_Alert_Confirmation;