import { jsx as _jsx } from "react/jsx-runtime";
import { fireEvent, render, screen } from '@testing-library/react';
import ChatbotAlert from './ChatbotAlert';
describe('ChatbotAlert', () => {
    it('should render ChatbotAlert with default variant', () => {
        render(_jsx(ChatbotAlert, { title: "Chatbot Alert" }));
        expect(screen.getByText('Chatbot Alert')).toBeTruthy();
    });
    it('should render ChatbotAlert with children', () => {
        render(_jsx(ChatbotAlert, { title: "Chatbot Alert", children: "Chatbot Alert Content" }));
        expect(screen.getByText('Chatbot Alert Content')).toBeTruthy();
    });
    it('should call onClose handler when onClose button is clicked', () => {
        const onCloseHandler = jest.fn();
        render(_jsx(ChatbotAlert, { title: "Chatbot Alert", onClose: onCloseHandler, children: "Chatbot Alert Content" }));
        expect(screen.getByText('Chatbot Alert')).toBeTruthy();
        expect(screen.getByText('Chatbot Alert Content')).toBeTruthy();
        // click on the close button
        fireEvent.click(screen.getByRole('button'));
        expect(onCloseHandler).toHaveBeenCalled();
    });
});
