<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
    <t t-inherit="mail.Thread" t-inherit-mode="extension">
        <xpath expr="//*[@name='content']" position="before">
            <div t-if="props.thread?.livechatWelcomeMessage" class="bg-100 py-3" data-name="LivechatWelcomeMessage">
                <Message message="props.thread.livechatWelcomeMessage" hasActions="false" thread="props.thread"/>
            </div>
        </xpath>
        <xpath expr="(//div[hasclass('o-mail-Thread')])" position="inside">
            <Message t-if="props.thread.chatbot?.typingMessage" message="props.thread.chatbot.typingMessage" hasActions="false" isInChatWindow="env.inChatWindow" isTypingMessage="true"  thread="props.thread"/>
        </xpath>
        <xpath expr="//*[hasclass('o-mail-Thread-empty')]" position="replace">
            <t t-if="props.thread.channel_type !== 'livechat'">$0</t>
        </xpath>
        <xpath expr="//*[hasclass('o-mail-Thread-newMessage')]" position="replace">
            <t t-if="!props.thread.chatbot">$0</t>
        </xpath>
    </t>
</templates>
