{% if v and v.admin_level >= 2 %}
	<a href="/votes?link={{c.fullname}}" class="btn caction nobackground px-1 text-muted"><i class="fas fa-arrows-v"></i>Votes</a>
{% endif %}
	<a class="btn caction nobackground px-1 text-muted" href="{{c.permalink}}"><i class="fas fa-book-open"></i>Context</a>
	<button class="btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text="{{c.permalink}}"><i class="fas fa-copy"></i>Copy link</button>
{% if v %}
	<button class="btn caction py-0 nobackground px-1 text-muted" role="button" onclick="openReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i>Reply</button>
	<button class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author_name}}',)"><i class="fas fa-flag fa-fw"></i>Report</button>
	<button id="unsave-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="postToastSwitch(this,'/unsave_comment/{{c.id}}','POST', 'save-{{c.id}}','unsave-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-save"></i>Unsave</button>
	<button id="save-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="postToastSwitch(this,'/save_comment/{{c.id}}','POST', 'save-{{c.id}}','unsave-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-save"></i>Save</button>
{% endif %}
{% if c.parent_submission %}
{% if v and c.author_id == v.id %}
	<button class="btn caction py-0 nobackground px-1 text-muted" onclick="toggleEdit('{{c.id}}')"><i class="fas fa-edit fa-fw"></i>Edit</button>
	<button id="undelete-{{c.id}}" class="btn caction py-0 nobackground px-1 text-muted {% if not c.state_user_deleted_utc %}d-none{% endif %}" onclick="postToastSwitch(this,'/undelete/comment/{{c.id}}','POST','delete-{{c.id}}','undelete-{{c.id}}');document.getElementById('comment-{{c.id}}').classList.remove('deleted');"><i class="fas fa-trash-alt fa-fw"></i>Undelete</button>
	<button id="delete-{{c.id}}" class="btn caction py-0 nobackground px-1 text-muted {% if c.state_user_deleted_utc %}d-none{% endif %}" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</button>
{% elif v and c.body %}
	<button class="btn caction py-0 nobackground px-1 text-muted" onclick="expandMarkdown(this,'{{c.id}}')"><i class="fas text-expand-icon-{{c.id}} fa-expand-alt"></i><span>View source</span></button>
{% endif %}
{% endif %}

{%- if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] -%}
	{%- set show_approve = c.state_mod != StateMod.VISIBLE or "/reported/" in request.path -%}
	{%- set show_remove = c.state_mod != StateMod.REMOVED -%}
	<button id="remove-{{c.id}}" class="btn caction py-0 nobackground px-1 text-muted{% if not show_remove %} d-none{% endif %}" role="button" onclick="moderate(false, {{c.id}}, true, 'remove-{{c.id}}', 'remove2-{{c.id}}', 'approve-{{c.id}}', 'approve2-{{c.id}}');"><i class="fas fa-ban"></i>Remove</a>
	<button id="approve-{{c.id}}" class="btn caction py-0 nobackground px-1 text-muted{% if not show_approve %} d-none{% endif %}" role="button" onclick="moderate(false, {{c.id}}, false, 'remove-{{c.id}}', 'remove2-{{c.id}}', 'approve-{{c.id}}', 'approve2-{{c.id}}');"><i class="fas fa-check"></i>Approve</a>
{%- endif -%}

{% if v %}
	<button style="margin-top:0.2rem" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></button>
<ul class="dropdown-menu">
	{% if v.admin_level and v.id==c.author_id %}
		<button id="undistinguish-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.distinguish_level %}d-md-block{% endif %} text-info"  onclick="postToastSwitch(this,'/distinguish_comment/{{c.id}}','POST','distinguish-{{c.id}}','undistinguish-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>
		<button id="distinguish-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.distinguish_level %}d-md-block{% endif %} text-info" onclick="postToastSwitch(this,'/distinguish_comment/{{c.id}}','POST','distinguish-{{c.id}}','undistinguish-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</button>
	{% endif %}

	{% if v.id != c.author_id and not c.ghost %}
		<a id="unblock-{{c.id}}" class="dropdown-item text-success list-inline-item {% if not c.is_blocking %}d-none{% endif %}" role="button" onclick="postToastSwitch(this,'/settings/unblock?username={{c.author_name}}','POST','block-{{c.id}}','unblock-{{c.id}}');"><i class="fas fa-eye text-success"></i>Unblock user</a>
		<a id="block-{{c.id}}" class="dropdown-item list-inline-item text-danger {% if c.is_blocking %}d-none{% endif %}" role="button" onclick="postToastSwitch(this,'/settings/block?username={{c.author_name}}','POST','block-{{c.id}}','unblock-{{c.id}}');"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
	{% endif %}

	{% if c.post %}
		{%- set url = c.sticky_api_url(v) -%}
		{% if url != "" %}
			<button id="unpin-{{c.id}}" class="dropdown-item list-inline-item {% if c.is_pinned %}d-md-block{% endif %} text-muted d-none text-info"  data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="postToastSwitch(this,'/un{{url}}/{{c.id}}','POST','pin-{{c.id}}','unpin-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
			<button id="pin-{{c.id}}" class="dropdown-item list-inline-item {% if not c.is_pinned %}d-md-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="postToastSwitch(this,'/{{url}}/{{c.id}}','POST','pin-{{c.id}}','unpin-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
		{% endif %}
	{% endif %}

	{% if c.parent_submission and (c.author_id==v.id or v.admin_level >= 2) %}
		<button id="unmark-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.over_18 %}d-md-block{% endif %} text-danger" onclick="postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','POST','mark-{{c.id}}','unmark-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark 18+</button>
		<button id="mark-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.over_18 %}d-md-block{% endif %} text-danger" onclick="postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','POST','mark-{{c.id}}','unmark-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark 18+</button>
	{% endif %}

	{% if v.admin_level >= 2 and v.id != c.author_id %}
		<button id="unban-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.author.is_suspended %}d-md-block{% endif %} text-success" id="unexile-comment-{{c.id}}" onclick="postToastSwitch(this,'/unban_user/{{c.author_id}}','POST','ban-{{c.id}}','unban-{{c.id}}', 'd-md-inline-block')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</button>
		<button id="ban-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.author.is_suspended %}d-md-block{% endif %} text-danger" id="exile-comment-{{c.id}}" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</button>
	{% endif %}

	{% if v.admin_level >= 2 and c.oauth_app %}
		<a class=" text-muted" href="{{c.oauth_app.permalink}}/comments"><i class="fas fa-code fa-fw"></i>API App</a>
	{% endif %}
</ul>
{% endif %}
