<xf:title>
	<xf:if is="$dropdown.isInsert()">
		{{ phrase('add_dropdown') }}
	<xf:else />
		{{ phrase('edit_dropdown:') }} {$dropdown.title}
	</xf:if>
</xf:title>

<xf:macro id="bb_code_button_manager_editor::setup" />

<xf:form action="{{ link('button-manager/dropdown/save', $dropdown) }}" ajax="true" data-xf-init="editor-manager" data-command-tray-class=".js-dragList-commandTrayDropdown">
	<div class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:if is="$dropdown.isInsert()">
					<xf:textboxrow name="cmd" label="{{ phrase('command_id') }}" />
				<xf:else />
					<xf:formrow label="{{ phrase('command_id') }}">{$dropdown.cmd}</xf:formrow>
				</xf:if>

				<xf:textboxrow name="title" value="{$dropdown}" label="{{ phrase('title') }}" />

				<xf:textboxrow name="icon" value="{$dropdown}" label="{{ phrase('icon') }}">
					<xf:explain>{{ phrase('you_can_preview_icons_and_their_names_here') }}</xf:explain>
				</xf:textboxrow>

				<xf:macro id="display_order_macros::row" arg-value="{$dropdown}" />

				<xf:checkboxrow label="">
					<xf:option name="active" selected="$dropdown.active"
						label="{{ phrase('dropdown_is_active') }}" />
				</xf:checkboxrow>
			</div>
		</div>
	</div>

	<div class="block">
		<div class="block-container">
			<h2 class="block-header">
				{{ phrase('available_buttons') }}
			</h2>
			<xf:macro id="bb_code_button_manager_editor::toolbar_block"
				arg-buttons="{{ array_keys($buttonData) }}"
				arg-buttonData="{$buttonData}"
				arg-toolbarType="commandTrayDropdown"
				arg-displayTooltips="{{ true }}" />

			<div class="block-row block-row--minor u-muted">
				{{ phrase('note_not_all_buttons_supported_inside_dropdowns') }}
			</div>
		</div>
	</div>

	<div class="block">
		<div class="block-container">
			<h2 class="block-header">
				{{ phrase('dropdown_buttons') }}
			</h2>

			<xf:macro id="bb_code_button_manager_editor::toolbar_block"
				arg-name="buttons"
				arg-buttons="{$dropdown.buttons}"
				arg-buttonData="{$buttonData}"
				arg-toolbarType="toolbarDropdown" />

			<xf:submitrow icon="save" />
		</div>
	</div>
</xf:form>