"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("@testing-library/react");
const ChatbotHeaderCloseButton_1 = require("./ChatbotHeaderCloseButton");
require("@testing-library/jest-dom");
describe('ChatbotHeaderCloseButton', () => {
    it('should render ChatbotHeaderCloseButton', () => {
        const { container } = (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderCloseButton_1.ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: jest.fn() }));
        expect(container.querySelector('.custom-header-close-button')).toBeTruthy();
    });
    it('should call onClick handler when close button is pressed', () => {
        const onClick = jest.fn();
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderCloseButton_1.ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: onClick }));
        react_1.fireEvent.click(react_1.screen.getByRole('button', { name: 'Close' }));
        expect(onClick).toHaveBeenCalled();
    });
    it('should render button with isCompact', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderCloseButton_1.ChatbotHeaderCloseButton, { "data-testid": "close-button", onClick: jest.fn(), isCompact: true }));
        expect(react_1.screen.getByTestId('close-button')).toHaveClass('pf-m-compact');
    });
});
