import { jsx as _jsx } from "react/jsx-runtime";
import { render, screen } from '@testing-library/react';
import { ChatbotDisplayMode } from '../Chatbot/Chatbot';
import ChatbotHeaderTitle from './ChatbotHeaderTitle';
describe('ChatbotHeaderTitle', () => {
    it('should render ChatbotHeaderTitle with children', () => {
        render(_jsx(ChatbotHeaderTitle, { children: "Chatbot Header Title" }));
        expect(screen.getByText('Chatbot Header Title')).toBeTruthy();
    });
    it('should render ChatbotHeaderTitle with custom classname', () => {
        const { container } = render(_jsx(ChatbotHeaderTitle, { className: "custom-header-class", children: "Chatbot Header Title" }));
        expect(container.querySelector('.custom-header-class')).toBeTruthy();
    });
    it('should render title for default display mode', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.default, showOnDefault: "Default header title" }));
        expect(screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for docked display mode', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.docked, showOnDocked: "Docked header title" }));
        expect(screen.getByText('Docked header title')).toBeTruthy();
    });
    it('should fallback to default title when docked display mode title is not configured', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.docked, showOnDefault: "Default header title" }));
        expect(screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for embedded display mode', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.embedded, showOnEmbedded: "Embedded header title" }));
        expect(screen.getByText('Embedded header title')).toBeTruthy();
    });
    it('should fallback to default title when embedded display mode title is not configured', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.embedded, showOnDefault: "Default header title" }));
        expect(screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for fullscreen display mode', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.fullscreen, showOnFullScreen: "Fullscreen header title", className: "custom-header-class" }));
        expect(screen.getByText('Fullscreen header title')).toBeTruthy();
    });
    it('should fallback to default title when fullscreen display mode title is not configured', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.fullscreen, showOnDefault: "Default header title" }));
        expect(screen.getByText('Default header title')).toBeTruthy();
    });
    it('should render title for drawer display mode', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.drawer, showOnDrawer: "Drawer header title", className: "custom-header-class" }));
        expect(screen.getByText('Drawer header title')).toBeTruthy();
    });
    it('should fallback to default title when drawer display mode title is not configured', () => {
        render(_jsx(ChatbotHeaderTitle, { displayMode: ChatbotDisplayMode.drawer, showOnDefault: "Default header title" }));
        expect(screen.getByText('Default header title')).toBeTruthy();
    });
});
