{{!
    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):
    {}

}}

<a class="h-100 py-3 px-2 mr-2 ml-1 d-flex align-items-center btn btn-sm" href="#" data-route-back role="button">
    {{> core_message/message_drawer_icon_back }}
</a>
<div class="px-3 pb-3">
    <div class="text-center">
      <a href="{{{profileurl}}}">
        <img
            class="rounded-circle"
            src="{{profileimageurl}}"
            alt="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
            title="{{#str}} pictureof, moodle, {{fullname}} {{/str}}"
            style="height: 100px; width: 100px"
        >
        </a>
    </div>
    <h4 class="mt-3 text-center">{{fullname}}</h4>
    <div class="px-4 mt-4">
        <button
            type="button"
            class="btn btn-primary btn-block {{^isblocked}}hidden{{/isblocked}}"
            data-route="view-conversation"
            data-route-param-1=""
            data-route-param-2="unblock"
            data-route-param-3="{{id}}"
        >
            {{#str}}unblockuser, message{{/str}}
        </button>
        <button
            type="button"
            class="btn btn-secondary btn-block {{#isblocked}}hidden{{/isblocked}}"
            data-route="view-conversation"
            data-route-param-1=""
            data-route-param-2="block"
            data-route-param-3="{{id}}"
        >
            {{#str}}blockuser, message{{/str}}
        </button>
        <button
            type="button"
            class="mt-4 btn btn-danger btn-block btn-sm {{^iscontact}}hidden{{/iscontact}}"
            data-route="view-conversation"
            data-route-param-1=""
            data-route-param-2="remove-contact"
            data-route-param-3="{{id}}"
        >
            {{#str}}removefromyourcontacts, message{{/str}}
        </button>
        <button
            type="button"
            class="mt-4 btn btn-primary btn-block {{#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>
</div>
