"use client";
import Modal from "../../../containers/modals/Modal";
import { Controls } from "../../../components";
export default function Alert(props) {
    const handleLeftClick = (e) => {
        if (typeof props?.buttonLeft?.onClick === "function")
            props?.buttonLeft?.onClick(e);
        if (typeof props?.onClose === "function")
            props?.onClose(e);
    };
    const handleRightClick = (e) => {
        if (typeof props?.buttonRight?.onClick === "function")
            props?.buttonRight?.onClick(e);
        if (typeof props?.onClose === "function")
            props?.onClose(e);
    };
    return (<Modal title={props?.title} message={props?.message} buttonArea={<>
                    <Controls.Button onClick={(e) => handleLeftClick(e)}>{props?.buttonLeft?.name || "Cancel"}</Controls.Button>
                    <Controls.Button onClick={(e) => handleRightClick(e)}>{props?.buttonRight?.name || "OK"}</Controls.Button>
                </>} onClose={props?.onClose} close/>);
}
//# sourceMappingURL=Alert.jsx.map