{%- if p.is_real_submission -%}

{% if v and v.id==p.author_id and p.private %}
	<form action="/publish/{{p.id}}" method="post">
		<input type="hidden" name="formkey", value="{{v.formkey}}">
		<button class="list-inline-item text-small p-0 m-0 mr-3 border-0 nobackground font-weight-bold" type="submit"><i class="fas fa-globe"></i>Publish</button>
	</form>
{% endif %}


{# {% if v.admin_level >= 2 %}<a class="list-inline-item" href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>{% endif %} #}

{# <a class="list-inline-item copy-link" role="button" data-clipboard-text="{{p.permalink}}"><i class="fas fa-copy"></i>Copy link</a> #}

{% if v %}
	<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="postToastSwitch(this,'/subscribe/{{p.id}}','POST','subscribe-{{p.id}}','unsubscribe-{{p.id}}');"><i class="fas fa-eye"></i>Subscribe</a>
	<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="postToastSwitch(this,'/unsubscribe/{{p.id}}','POST','subscribe-{{p.id}}','unsubscribe-{{p.id}}');"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
{% endif %}

{% if v %}
	<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="postToastSwitch(this,'/save_post/{{p.id}}','POST','save-{{p.id}}','unsave-{{p.id}}');"><i class="fas fa-save"></i>Save</a>
	<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="postToastSwitch(this,'/unsave_post/{{p.id}}','POST','save-{{p.id}}','unsave-{{p.id}}');"><i class="fas fa-save"></i>Unsave</a>
	
	<a class="list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag"></i>Report</a>
{% endif %}

{% if v and v.id==p.author_id %}
	{% if request.path.startswith('/@') %}
		<a id="pin-profile-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="postToastSwitch(this,'/pin/{{p.id}}','POST','unpin-profile-{{p.id}}','pin-profile-{{p.id}}');"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin to profile</a>
		<a id="unpin-profile-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="postToastSwitch(this,'/pin/{{p.id}}','POST','unpin-profile-{{p.id}}','pin-profile-{{p.id}}');"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin from profile</a>
	{% endif %}

		<a id="undelete2-{{p.id}}" class="{% if not p.state_user_deleted_utc %}d-none{% endif %} list-inline-item" role="button" onclick="postToastSwitch(this,'/undelete_post/{{p.id}}','POST','delete2-{{p.id}}','undelete2-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted');"><i class="fas fa-trash-alt"></i>Undelete</a>

		<a id="delete2-{{p.id}}" class="{% if p.state_user_deleted_utc %}d-none{% endif %} list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a>
	{% endif %}

	{% if v and v.admin_level >= 2 and p.state_mod == StateMod.FILTERED %}
		<a id="filter-approve" class="list-inline-item" role="button" onclick="filter_new_status({{p.id}}, 'normal')">Approve</a>
		<a id="filter-remove" class="list-inline-item" role="button" onclick="filter_new_status({{p.id}}, 'removed')">Remove</a>
	{% endif %}

	{% if v %}
		<a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></a>
		<ul class="dropdown-menu">
			{# {% if v.admin_level %}
				<a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="postToastSwitch(this,'/distinguish/{{p.id}}','POST','distinguish-{{p.id}}','undistinguish-{{p.id}}');"><i class="fas fa-crown"></i>Distinguish</a>
				<a id="undistinguish-{{p.id}}" class="dropdown-item {% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="postToastSwitch(this,'/distinguish/{{p.id}}','POST','distinguish-{{p.id}}','undistinguish-{{p.id}}');"><i class="fas fa-crown"></i>Undistinguish</a>
			{% endif %} #}

			{% if v.admin_level > 1 %}
				<a id="pin-{{p.id}}" class="dropdown-item {% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="postToastSwitch(this,'/sticky/{{p.id}}','POST','pin-{{p.id}}','unpin-{{p.id}}');"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
				<a id="unpin-{{p.id}}" class="dropdown-item {% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="postToastSwitch(this,'/unsticky/{{p.id}}','POST','pin-{{p.id}}','unpin-{{p.id}}');"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
			{% endif %}

			{%- if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] -%}
				{%- set show_approve = p.state_mod != StateMod.VISIBLE or "/reported/" in request.path -%}
				{%- set show_remove = p.state_mod == StateMod.VISIBLE -%}
				<a id="remove-{{p.id}}" class="dropdown-item list-inline-item text-danger{% if not show_remove %} d-none{% endif %}" role="button" onclick="moderate(true, {{p.id}}, true, 'remove-{{p.id}}', 'remove2-{{p.id}}', 'approve-{{p.id}}', 'approve2-{{p.id}}');"><i class="fas fa-ban"></i>Remove</a>
				<a id="approve-{{p.id}}" class="dropdown-item list-inline-item text-success{% if not show_approve %} d-none{% endif %}" role="button" onclick="moderate(true, {{p.id}}, false, 'remove-{{p.id}}', 'remove2-{{p.id}}', 'approve-{{p.id}}', 'approve2-{{p.id}}');"><i class="fas fa-check"></i>Approve</a>
			{%- endif -%}

			{% if v.admin_level >= 2 %}
				{% if p.oauth_app %}
					<a class="dropdown-item list-inline-item" href="{{p.oauth_app.permalink}}"><i class="fas fa-code"></i>API App</a>
				{% endif %}
			{% endif %}

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

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

			{% if v.id==p.author_id or v.admin_level > 1 %}
				<a id="mark-{{p.id}}" class="dropdown-item {% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="postToastSwitch(this,'/toggle_post_nsfw/{{p.id}}','POST','mark-{{p.id}}','unmark-{{p.id}}');"><i class="fas fa-eye-evil"></i>Mark 18+</a>
				<a id="unmark-{{p.id}}" class="dropdown-item {% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="postToastSwitch(this,'/toggle_post_nsfw/{{p.id}}','POST','mark-{{p.id}}','unmark-{{p.id}}');"><i class="fas fa-eye-evil"></i>Unmark 18+</a>
			{% endif %}

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