"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 Chatbot_1 = require("../Chatbot/Chatbot");
const ChatbotHeaderTitle_1 = __importDefault(require("./ChatbotHeaderTitle"));
describe('ChatbotHeaderTitle', () => {
    it('should render ChatbotHeaderTitle with children', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { children: "Chatbot Header Title" }));
        expect(react_1.screen.getByText('Chatbot Header Title')).toBeTruthy();
    });
    it('should render ChatbotHeaderTitle with custom classname', () => {
        const { container } = (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { className: "custom-header-class", children: "Chatbot Header Title" }));
        expect(container.querySelector('.custom-header-class')).toBeTruthy();
    });
    it('should render title for default display mode', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.default, showOnDefault: "Default header title" }));
        expect(react_1.screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for docked display mode', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.docked, showOnDocked: "Docked header title" }));
        expect(react_1.screen.getByText('Docked header title')).toBeTruthy();
    });
    it('should fallback to default title when docked display mode title is not configured', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.docked, showOnDefault: "Default header title" }));
        expect(react_1.screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for embedded display mode', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.embedded, showOnEmbedded: "Embedded header title" }));
        expect(react_1.screen.getByText('Embedded header title')).toBeTruthy();
    });
    it('should fallback to default title when embedded display mode title is not configured', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.embedded, showOnDefault: "Default header title" }));
        expect(react_1.screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for fullscreen display mode', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.fullscreen, showOnFullScreen: "Fullscreen header title", className: "custom-header-class" }));
        expect(react_1.screen.getByText('Fullscreen header title')).toBeTruthy();
    });
    it('should fallback to default title when fullscreen display mode title is not configured', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.fullscreen, showOnDefault: "Default header title" }));
        expect(react_1.screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for drawer display mode', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.drawer, showOnDrawer: "Drawer header title", className: "custom-header-class" }));
        expect(react_1.screen.getByText('Drawer header title')).toBeTruthy();
    });
    it('should fallback to default title when drawer display mode title is not configured', () => {
        (0, react_1.render)((0, jsx_runtime_1.jsx)(ChatbotHeaderTitle_1.default, { displayMode: Chatbot_1.ChatbotDisplayMode.drawer, showOnDefault: "Default header title" }));
        expect(react_1.screen.getByText('Default header title')).toBeTruthy();
    });
});
