import React from 'react';
import Toast from 'react-bootstrap/Toast';

interface ToastMessageProps {
    show: boolean;
    onClose: () => void;
    message: string;
    variant: string; // Assuming variant is a string, adjust if it's a specific type
}

const ToastMessage: React.FC<ToastMessageProps> = ({ show, onClose, message, variant }) => {
    return (
        <Toast show={show} onClose={onClose} className={`bg-${variant} text-white`} delay={2000} autohide style={{ position: "sticky", top: "10px" }}>
            <Toast.Body>{message}</Toast.Body>
        </Toast>
    );
};

export default ToastMessage;
