{% include 'ucp_header.html' %}

{% if S_DRAFT_LOADED %}
	<div class="iz-alert iz-alert--success" role="status">
		<h2 class="iz-h4">{{ L_INFORMATION }}</h2>
		<p>{{ L_DRAFT_LOADED_PM }}</p>
	</div>
{% endif %}

{% if S_SHOW_DRAFTS %}{% include 'drafts.html' %}{% endif %}
{% if S_DISPLAY_PREVIEW %}{% include 'posting_preview.html' %}{% endif %}

<section id="postingbox" class="iz-card iz-card--ucp">
	<header class="iz-card__header">
		<h1 class="iz-card__title">{{ L_TITLE }}</h1>
	</header>

	<div class="iz-card__body">
		<div class="iz-compose-pm">

			<div id="pmheader-postingbox" class="iz-compose-pm__header">
				{% EVENT posting_pm_layout_include_pm_header_before %}
				{% include 'posting_pm_header.html' %}
				{% EVENT posting_pm_layout_include_pm_header_after %}
			</div>

			{% set EXTRA_POSTING_OPTIONS = 1 %}
			{% include 'posting_editor.html' %}

			<!--
				Legacy layouts rendered attachments/review outside the editor.
				If your modern posting_editor.html already includes these panels (recommended),
				you can remove these includes to avoid duplication.
			-->
			{% if S_SHOW_ATTACH_BOX and FILTERS %}
				<section class="iz-compose-pm__attachments">
					{% include 'posting_attach_body.html' %}
				</section>
			{% endif %}

			{% if S_DISPLAY_REVIEW %}
				<section class="iz-compose-pm__review">
					{% include 'posting_topic_review.html' %}
				</section>
			{% endif %}

		</div>
	</div>
</section>

{% if S_DISPLAY_HISTORY %}
	<div class="iz-space iz-space--sm"></div>
	{% include 'ucp_pm_history.html' %}
{% endif %}

{% include 'ucp_footer.html' %}
