<h4 class="bg-primary">Quick Setup for Device Control</h4>
<p>The control code sets that are most frequently used by this manufacturer are listed below.</p>

<p>Device type is: <strong class="text-primary">{{device.type.name}}</strong></p>
<p>Labeled: <strong class="text-primary">{{device.name}}</strong></p>
<p>Manufacturer: <strong class="text-primary">{{device.brand.name}}</strong></p>


<div class="fx-fade-down" ng-if="models.ip.length || models.ir.length">

  <div class="form-group" ng-if="device.targetType">
    <div class="select-style" ng-if="device.targetType === 1 && models.ir.length">
      <select size="9" ng-options="model as 'Code# ' + (model.index + 1) for model in models.ir" ng-model="device.model">
        <option value="">Select a code set</option>
      </select>
    </div>

    <div class="select-style" ng-if="device.targetType === 2 && models.ip.length">
      <select size="9" ng-options="model as model.name for model in models.ip" ng-model="device.model">
        <option value="">Select a code set</option>
      </select>
    </div>
  </div>

  <div class="form-group">
    <p>Select how the device will be controlled:</p>
    <label class="radio-inline">
      <input type="radio" name="targetType" ng-model="device.targetType" ng-disabled="models.ir.length === 0" ng-value="1"> IR controlled
    </label>

    <label class="radio-inline">
      <input type="radio" name="targetType" ng-model="device.targetType" ng-disabled="models.ip.length === 0"  ng-value="2"> Network controlled
    </label>
  </div>

</div>

<div class="form-group">
  <strong>Know your device model number?</strong> <button class="btn btn-primary" ng-click="goSearchModel()"">Search by model</button>
</div>



<div class="left-and-right">
  <go-back state="menu.programming.add-device.device-brand"></go-back>
  <button class="btn btn-primary btn-next" ng-disabled="!device.model" click-and-disable="doNext()">Next</button>
</div>
