"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_2 = require("@testing-library/react");
const ChatbotHeaderMenu_1 = require("./ChatbotHeaderMenu");
require("@testing-library/jest-dom");
describe('ChatbotHeaderMenu', () => {
    it('should render ChatbotHeaderMenu with custom class', () => {
        const { container } = (0, react_2.render)(react_1.default.createElement(ChatbotHeaderMenu_1.ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: jest.fn() }));
        expect(container.querySelector('.custom-header-menu')).toBeTruthy();
    });
    it('should call onMenuToggle when ChatbotHeaderMenu button is clicked', () => {
        const onMenuToggle = jest.fn();
        (0, react_2.render)(react_1.default.createElement(ChatbotHeaderMenu_1.ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: onMenuToggle }));
        react_2.fireEvent.click(react_2.screen.getByRole('button', { name: 'Toggle menu' }));
        expect(onMenuToggle).toHaveBeenCalled();
    });
    it('should handle isCompact', () => {
        (0, react_2.render)(react_1.default.createElement(ChatbotHeaderMenu_1.ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: jest.fn(), isCompact: true, "data-testid": "button" }));
        expect(react_2.screen.getByTestId('button')).toHaveClass('pf-m-compact');
    });
});
