{{!
    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_contact_body_content

    This template will render the content for the body section of the contact
    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:
    * userid The logged in user id
    * urls The URLs for the popover

    Example context (json):
    {}

}}

<div class="rui-message-header-margin">
    <div class="d-flex align-items-start">
        <div class="align-self-stretch" >
            <button class="ml-3 d-flex align-items-center btn-msg mr-3" data-route-back role="button">
                {{> core_message/message_drawer_icon_back }}
            </button>
        </div>
        <div class="rui-message-header-info d-flex align-items-center text-decoration-none">
            <a href="{{{profileurl}}}" class="text-decoration-none">
                <img
                    class="rui-message-avatar rounded mr-3"
                    src="{{profileimageurl}}"
                    alt="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
                    title="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
                    style="height: 40px; width: 40px"
                />
            </a>
            <h4 class="rui-message-name m-0">{{fullname}}</h4>
        </div>
    </div>
</div>

<div class="rui-message-container-md">
    <button
        type="button"
        class="mt-2 mx-0 btn btn-sm btn-dark {{^isblocked}}hidden{{/isblocked}}"
        data-route="view-conversation"
        data-route-param-1=""
        data-route-param-2="unblock"
        data-route-param-3="{{id}}"
    >
        <svg class="mr-2" width="20" height="20" fill="none" viewBox="0 0 24 24">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 12C19.25 13 17.5 18.25 12 18.25C6.5 18.25 4.75 13 4.75 12C4.75 11 6.5 5.75 12 5.75C17.5 5.75 19.25 11 19.25 12Z"></path>
            <circle cx="12" cy="12" r="2.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
        </svg>

        {{#str}}unblockuser, message{{/str}}
    </button>
    <button
        type="button"
        class="mt-2 mx-0 btn btn-sm btn-danger {{#isblocked}}hidden{{/isblocked}}"
        data-route="view-conversation"
        data-route-param-1=""
        data-route-param-2="block"
        data-route-param-3="{{id}}"
    >
        <svg class="mr-2" width="20" height="20" fill="none" viewBox="0 0 24 24">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.6247 10C19.0646 10.8986 19.25 11.6745 19.25 12C19.25 13 17.5 18.25 12 18.25C11.2686 18.25 10.6035 18.1572 10 17.9938M7 16.2686C5.36209 14.6693 4.75 12.5914 4.75 12C4.75 11 6.5 5.75 12 5.75C13.7947 5.75 15.1901 6.30902 16.2558 7.09698"></path>
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 4.75L4.75 19.25"></path>
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.409 13.591C9.53033 12.7123 9.53033 11.2877 10.409 10.409C11.2877 9.5303 12.7123 9.5303 13.591 10.409"></path>
        </svg>
        {{#str}}blockuser, message{{/str}}
    </button>
    <button
        type="button"
        class="mt-2 mx-0 btn btn-sm btn-secondary {{^iscontact}}hidden{{/iscontact}}"
        data-route="view-conversation"
        data-route-param-1=""
        data-route-param-2="remove-contact"
        data-route-param-3="{{id}}"
    >
        <svg class="mr-2" width="20" height="20" fill="none" viewBox="0 0 24 24">
            <circle cx="12" cy="8" r="3.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12.25 19.25H6.94953C5.77004 19.25 4.88989 18.2103 5.49085 17.1954C6.36247 15.7234 8.23935 14 12.25 14"></path>
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 17L15.75 17"></path>
        </svg>
        {{#str}}removefromyourcontacts, message{{/str}}
    </button>
    <button
        type="button"
        class="mt-2 mx-0 btn btn-sm btn-success {{#iscontact}}hidden{{/iscontact}}"
        data-route="view-conversation"
        data-route-param-1=""
        data-route-param-2="add-contact"
        data-route-param-3="{{id}}"
    >
        {{#str}}addtoyourcontacts, message{{/str}}
    </button>
</div>
