{% load static %}

<div class="menu_buttons curtain left open" data-name="конт">
    <div class="container_block_list_of_users">
        {% include 'blocks/profile/b_list_of_users_messenger.html' %}
    </div>
    <div class="handler_menu close" onclick="open_curtain('left')">
        <img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
        <div class="text_f_curtain left">конт</div>
        <img class="btns_f_curtain close right"  src="{% static 'img/svg/arrow_f_curtain.svg' %}">
        <div class="clear_both"></div>
    </div>
</div>
{#<div class="title-profile-cont">#}
{#    <h1>Написать сообщение</h1>#}
{#</div>#}

{#<div class="container-messenger">#}
{#    <div class="block-chat">#}
{#        <div class="container-header-chat">#}
{#            <div class="header-chat-left-part">#}
{#                <img class="chat-avatar" src="{% static "delete_later/Avatar.png" %}">#}
{#                <span class="chat-username">Сергейко Сергей</span>#}
{#            </div>#}
{#            <div class="header-chat-right-part">#}
{#                <img class="header-icons-right-part-padding" src="{% static "img/svg/phone.svg" %}">#}
{#                <img class="header-icons-right-part-padding" src="{% static "img/svg/info.svg" %}">#}
{#            </div>#}
{#        </div>#}
{#        <div class="container-messages">#}
{#            {% include "widgets/w_message.html" %}#}
{#        </div>#}
{#        <div class="footer-chat">#}
{#            <div class="left-part-block-enter-message">#}
{#                <input class="enter-message-inp" placeholder="Отправить сообщение">#}
{#            </div>#}
{#            <div class="right-part-block-enter-message">#}
{#                <button class="attach-file-btn-message" onclick="attachFilemeassge()"></button>#}
{#                <button class="send-message"></button>#}
{#            </div>#}
{#        </div>#}
{#    </div>#}
{#    <div class="block-list-of-users">#}
{#        <span class="title-list-of-users">Пользователи</span>#}
{#        <div class="insert_users">#}
{#            {% include "widgets/w_chat_right_panel_tickets.html" %}#}
{#        </div>#}
{#    </div>#}
{#</div>#}
<img class="loader_chat_f_sw_chats" src="{% static "/img/svg/loader.svg" %}" alt="loader">
{% if cur_receiver %}
    <div class="block-chat">
        <div class="container-header-chat">
            <div class="header-chat-left-part">
                <img class="chat-avatar" {% if cur_receiver.user_profile.avatar %}src="{{ cur_receiver.user_profile.avatar.url }}"{% else %}src="{% static "img/svg/User.svg" %}"{% endif %}>
    {#            <span class="chat-username">{{ ticket.manager.last_name }} {{ ticket.manager.first_name }}</span>#}
                <span class="chat-username">{{ cur_receiver.last_name }} {{ cur_receiver.first_name }}</span>
            </div>
            <div class="header-chat-right-part">
                <img class="header-icons-right-part-padding" src="{% static "img/svg/phone.svg" %}">
                <img class="header-icons-right-part-padding" src="{% static "img/svg/info.svg" %}">
            </div>
        </div>
        <div class="bottom_part_of_chats">
            <div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id="null" >
                {% include "blocks/profile/b_messages_container.html" %}
            </div>


            <div class="footer-chat">
                <div class="left-part-block-enter-message">
                    <input class="enter-message-inp" onfocus="check_new_messages_timeout()" onkeypress="sendMessageEnter(event,null,{{ user.id }},{{ cur_receiver.id }})" placeholder="Отправить сообщение">
                </div>
                <div class="right-part-block-enter-message">
    {#                <button class="attach-file-btn-message" onclick="attachFilemeassge(event,this,null,{{ user.id }},{{ cur_receiver.id }})"></button>#}
                    <input style="display: none;" type="file" onchange="attachFilemeassge(this,null,{{ user.id }},{{ cur_receiver.id }})" id="id_choce_file" multiple>
                    <label for="id_choce_file" class="attach-file-btn-message"></label>
                    <button class="send-message" onclick="sendMessage(null,{{ user.id }},{{ cur_receiver.id }})"></button>
                    <img src="{% static "/img/svg/loader.svg" %}" class="loader_show_message">
    {#                <button class="send-message" onclick="send_ws_msg('message')"></button>#}
                </div>
            </div>
        </div>
    </div>
{% endif %}

{#<div class="block-list-of-users">#}
{#    {% include "blocks/profile/b_list_of_users_messenger.html" %}#}
{#</div>#}

