"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("@testing-library/react");
const ChatbotAlert_1 = __importDefault(require("./ChatbotAlert"));
describe('ChatbotAlert', () => {
    it('should render ChatbotAlert with default variant', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotAlert_1.default, { title: "Chatbot Alert" }));
        expect(react_1.screen.getByText('Chatbot Alert')).toBeTruthy();
    });
    it('should render ChatbotAlert with children', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotAlert_1.default, { title: "Chatbot Alert", children: "Chatbot Alert Content" }));
        expect(react_1.screen.getByText('Chatbot Alert Content')).toBeTruthy();
    });
    it('should call onClose handler when onClose button is clicked', () => {
        const onCloseHandler = jest.fn();
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotAlert_1.default, { title: "Chatbot Alert", onClose: onCloseHandler, children: "Chatbot Alert Content" }));
        expect(react_1.screen.getByText('Chatbot Alert')).toBeTruthy();
        expect(react_1.screen.getByText('Chatbot Alert Content')).toBeTruthy();
        // click on the close button
        react_1.fireEvent.click(react_1.screen.getByRole('button'));
        expect(onCloseHandler).toHaveBeenCalled();
    });
});
