<div class="modal fade d-md-none" id="adminModal-{{p.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
	<div class="modal-dialog modal-dialog-centered" role="document">
		<div class="modal-content">
			<div class="modal-header p-3">
				<h5 class="col modal-title text-center h6">Admin options</h5>
				<button class="close position-absolute py-3" style="right: 1rem"data-bs-dismiss="modal" aria-label="Close">
					<span aria-hidden="true"><i class="fas fa-times-circle text-gray-500"></i></span>
				</button>
			</div>
			<div class="modal-body">
				<ul class="list-group post-actions">
					{% if request.path.startswith('/post/') and v.admin_level > 2 %}
						<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
					{% endif %}

					{#<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-primary" role="button" onclick="postToastSwitch(this,'/distinguish/{{p.id}}','POST','distinguish2-{{p.id}}','undistinguish2-{{p.id}}');" data-bs-dismiss="modal"><i class="fas fa-crown text-center text-primary mr-3"></i>Distinguish</button>
					<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-primary" role="button" onclick="postToastSwitch(this,'/distinguish/{{p.id}}','POST','distinguish2-{{p.id}}','undistinguish2-{{p.id}}');" data-bs-dismiss="modal"><i class="fas fa-crown text-center text-primary mr-3"></i>Undistinguish</button> #}

					<button id="pin2-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-primary" role="button" onclick="postToastSwitch(this,'/sticky/{{p.id}}','POST','pin2-{{p.id}}','unpin2-{{p.id}}');" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center text-primary mr-3"></i>Pin</button>
					<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-primary" role="button" onclick="postToastSwitch(this,'/unsticky/{{p.id}}','POST','pin2-{{p.id}}','unpin2-{{p.id}}');" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center  text-primary mr-3"></i>Unpin</button>

					{%- 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.REMOVED -%}
						<a id="remove2-{{p.id}}" class="dropdown-item list-inline-item text-danger{% if not show_remove %} d-none{% endif %}" role="button" data-bs-dismiss="modal" 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="approve2-{{p.id}}" class="dropdown-item list-inline-item text-success{% if not show_approve %} d-none{% endif %}" role="button" data-bs-dismiss="modal" 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 p.oauth_app %}
						<a href="{{p.oauth_app.permalink}}"><button class="nobackground btn btn-link btn-block btn-lg text-muted text-left"><i class="far fa-code text-center text-info mr-3"></i>API App</button></a>
					{% endif %}

					<button id="mark2-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="postToastSwitch(this,'/toggle_post_nsfw/{{p.id}}','POST','mark2-{{p.id}}','unmark2-{{p.id}}');" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Mark 18+</button>
					<button id="unmark2-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="postToastSwitch(this,'/toggle_post_nsfw/{{p.id}}','POST','mark2-{{p.id}}','unmark2-{{p.id}}');" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Unmark 18+</button>

					{% if v.id != p.author_id %}
						<button id="ban2-{{p.id}}" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button"><i class="fas fa-user-minus mr-3"></i>Ban user</button>
						<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="postToastSwitch(this,'/unban_user/{{p.author_id}}','POST','ban2-{{p.id}}','unban2-{{p.id}}');" data-bs-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</button>
					{% endif %}
				</ul>
			</div>
		</div>
	</div>
</div>
