<h3>Bambu Printer Settings <small>{{ _('Version') }} {{ plugin_bambu_printer_plugin_version }}</small></h3>

<form class="form-horizontal" onsubmit="return false;">
    <div class="control-group">
        <label class="control-label">{{ _('Device Type') }}</label>
        <div class="controls">
            <select class="input-block-level" data-bind="options: ['A1', 'A1MINI', 'P1P', 'P1S', 'X1', 'X1C'], value: settingsViewModel.settings.plugins.bambu_printer.device_type, allowUnset: true">
            </select>
        </div>
    </div>
	<div class="control-group">
		<label class="control-label">{{ _('IP Address') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.host" placeholder="192.168.0.2" title="{{ _('IP address or hostname of the printer') }}"></input>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">{{ _('Serial Number') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.serial" title="{{ _('Serial number of printer') }}"></input>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">{{ _('Access Code') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.access_code" title="{{ _('Access code of printer') }}"></input>
		</div>
	</div>
    <div class="control-group">
        <div class="controls">
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.local_mqtt"> {{ _('Use Local Access, disable for cloud connection') }}</label>
        </div>
    </div>
	<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
		<label class="control-label">{{ _('Region') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.region" title="{{ _('Region used to connect, ie China, US') }}"></input>
		</div>
	</div>
	<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
		<label class="control-label">{{ _('Email') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.email" title="{{ _('Registered email address') }}"></input>
		</div>
	</div>
	<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
		<label class="control-label">{{ _('Password') }}</label>
		<div class="controls">
            <div class="input-block-level input-append">
			    <input id="bambu_cloud_password" type="password" class="input-text input-block-level" title="{{ _('Password to generate Auth Token') }}"></input>
                <span class="btn btn-primary add-on" data-bind="click: getAuthToken">{{ _('Login') }}</span>
            </div>
		</div>
	</div>
	<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
		<label class="control-label">{{ _('Auth Token') }}</label>
		<div class="controls">
			<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.auth_token" title="{{ _('Auth Token') }}"></input>
		</div>
	</div>
	<div class="control-group">
        <label class="control-label">{{ _('Default Print Options') }}</label>
        <div class="controls">
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.timelapse"> {{ _('Enable timelapse') }}</label>
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.bed_leveling"> {{ _('Enable bed leveling') }}</label>
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.flow_cali"> {{ _('Enable flow calibration') }}</label>
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.vibration_cali"> {{ _('Enable vibration calibration') }}</label>
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.layer_inspect"> {{ _('Enable first layer inspection') }}</label>
            <label class="checkbox"><input type="checkbox" data-bind="checked: settingsViewModel.settings.plugins.bambu_printer.use_ams"> {{ _('Use AMS') }}</label>
        </div>
    </div>
	{#<div class="control-group">
        <label class="control-label">{{ _('Always Use Default') }}</label>
        <div class="controls">
            <label class="checkbox"><input type="checkbox" data-bind="checked: settings.plugins.bambu_printer.always_use_default_options"> </label>
        </div>
    </div>#}
</form>
