<?php
	if (!isset($selected)) {
		$selected = 0;
	}
?>
<select x-data="select2Alpine()" name="consoleID" id="consoleID" x-init="changed('consoleID',() => consoleID=selected)" required>
	<?php if (in_array(settings('gameType'), $leaderosConnectSupportedGames)): ?>
		<option value="4" <?php _selected(old('consoleID', $selected) == '4'); ?>>
			LeaderOS Connect
		</option>
	<?php endif; ?>
	
	<?php if (settings('gameType') == 'minecraft'): ?>
		<option value="1" <?php _selected(old('consoleID', $selected) == '1'); ?>>
			Websend
		</option>
		<option value="3" <?php _selected(old('consoleID', $selected) == '3'); ?>>
			Websender
		</option>
	<?php endif; ?>
	
	<option value="2" <?php _selected(old('consoleID', $selected) == '2'); ?>>
		Rcon
	</option>
</select>