<% if (m.layer == 'start_layer') { %>
	<div class="controls main">
		<div class="navigation"></div>
		<div class="fields_wrapper">
			<div class="title">
				<h2>Options</h2>
			</div>
			<div class="fields">
				<div class="field">
					<input type="button" id="organizer_schematic_builder__edit_background" value="Edit background"/>
				</div>
				<div class="field">
					<input type="button" id="organizer_schematic_builder__edit_foreground" value="Edit foreground"/>
				</div>
			</div>
		</div>
	</div>
<% } else if (m.layer == 'background') { %>
	<div class="controls background">
		<div class="navigation">
			<input type="button" id="<% if (m.itemSelected) { %>organizer_schematic_builder__back_to_background<% } else { %>organizer_schematic_builder__back_to_start<% } %>" value="Back"/>
		</div>
		<div class="fields_wrapper">
			<% if (!m.itemSelected && !m.multiItemSelected) { %>
				<div class="title">
					<h2>Editing the background</h2>
				</div>
				<div class="fields">
					<div class="field">
						<input type="button" id="organizer_schematic_builder__add_background_image" value="Upload"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__add_library_background_image" value="Add from image library"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__clear_background" value="Delete all"/>
					</div>
				</div>
			<% } else if (m.itemSelected) { %>
				<div class="title">
					<h2>Background item options</h2>
				</div>
				<div class="fields">
					<div class="field">
						<input type="button" id="organizer_schematic_builder__duplicate_background_image" value="Duplicate"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__move_background_image_forward" value="Bring forwards"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__move_background_image_back" value="Send Backwards"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__move_background_image_first" value="Bring to front"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__move_background_image_last" value="Send to back"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__delete_background_image" value="Delete"/>
					</div>
					<div class="field">
						<p class="label">Opacity:</p>
						<div id="organizer_schematic_builder__background_opacity_slider"></div>
						<input type="text" id="organizer_schematic_builder__background_opacity" value="{{m.opacity|e}}%" readonly/>
					</div>
				</div>
			<% } else if (m.multiItemSelected) { %>
				<div class="title">
					<h2>Background multi-item options</h2>
				</div>
				<div class="fields">
					<div class="field">
						<input type="button" id="organizer_schematic_builder__create_line_1" value="Line 1"/>
					</div>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__create_line_2" value="Line 2"/>
					</div>
					<div class="field">
						<select id="organizer_schematic_builder__arrow_type">
							<option value="double">⇿</option>
							<option value="single_left">⇽</option>
							<option value="single_right">⇾</option>
						</select>
					</div>
				</div>
			<% } %>
		</div>
	</div>
<% } else if (m.layer == 'foreground') { %>
	<div class="controls foreground">
		<div class="navigation">
			<input type="button" id="<% if (m.itemSelected) { %>organizer_schematic_builder__back_to_foreground<% } else { %>organizer_schematic_builder__back_to_start<% } %>" value="Back"/>
		</div>
		<div id="organizer_schematic_builder__foreground_fields_wrapper" class="fields_wrapper">
			<% if (!m.itemSelected) { %>
				<div class="title">
					<h2>Editing the foreground</h2>
				</div>
				<div class="foreground_controls">
					<div class="field">
						<input type="button" id="organizer_schematic_builder__add_foreground_hotspot" value="Add a hotspot"/>
					</div>
					<% if (m.is_system_schematic) { %>
						<div class="field">
							<input type="button" id="organizer_schematic_builder__add_foreground_asset_block" value="Add an asset block"/>
						</div>
					<% } %>
					<div class="field">
						<input type="button" id="organizer_schematic_builder__clear_foreground" value="Delete all"/>
					</div>
				</div>
			<% } %>
		</div>
	</div>
<% } %>