{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template core_message/message_drawer_view_conversation_body

    This template will render the body container for the conversation page in
    the message drawer.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * All data attributes are required

    Context variables required for this template:
    *

    Example context (json):
    {}

}}

<div
    class="view-conversation hidden h-100"
    aria-hidden="true"
    data-region="view-conversation"
    data-user-id="{{loggedinuser.id}}"
    data-midnight="{{loggedinuser.midnight}}"
    data-message-poll-min="{{messagepollmin}}"
    data-message-poll-max="{{messagepollmax}}"
    data-message-poll-after-max="{{messagepollaftermax}}"
    style="overflow-y: auto; overflow-x: hidden"
>
    <div class="position-relative h-100" data-region="content-container" style="overflow-y: auto; overflow-x: hidden">
        <div class="content-message-container hidden h-100 px-2 pt-0" data-region="content-message-container" role="log" style="overflow-y: auto; overflow-x: hidden">
            <div class="py-3 border-bottom text-center hidden" data-region="contact-request-sent-message-container">
                <p class="m-0">{{#str}} contactrequestsent, core_message {{/str}}</p>
                <p class="fst-italic fw-light" data-region="text"></p>
            </div>
            <div class="p-3 text-center hidden" data-region="self-conversation-message-container">
                <p class="m-0">{{#str}} selfconversation, core_message {{/str}}</p>
                <p class="fst-italic fw-light" data-region="text">{{#str}} selfconversationdefaultmessage, core_message {{/str}}</p>
            </div>
            <div class="p-3 text-center hidden" data-region="unable-to-send-container">
                <p class="m-0">{{#str}} cannotsendmessages, core_message {{/str}}</p>
                <p class="fst-italic fw-light" data-region="text">{{#str}} nopermissiontosend, core_message {{/str}}</p>
            </div>
            <div class="hidden text-center p-3" data-region="more-messages-loading-icon-container">{{> core/loading }}</div>
        </div>
        <div class="p-4 w-100 h-100 hidden position-absolute z-index-1" data-region="confirm-dialogue-container" style="top: 0; background: rgba(0,0,0,0.3);">
            {{> core_message/message_drawer_view_conversation_body_confirm_dialogue }}
        </div>
        <div class="px-2 pb-2 pt-0" data-region="content-placeholder">
            {{> core_message/message_drawer_view_conversation_body_placeholder }}
        </div>
    </div>
</div>
