<div class="panel" id="{{acc.panelId}}">
  <div class="subpanel leds">
    {{acc.name}}: {{acc.curValStr()}}

    <div class="master-pgmr-decade-table">
      <div class="row">
        <div class="cell" ng-repeat="idx in [0,1,2,3,4,5,6,7,8,9,10]">
          {{acc.counters[idx].val}}
        </div>
      </div>
      <div class="row">
        <div class="cell" ng-repeat="idx in [0,1,2,3,4,5,6,7,8,9,10]">
          {{(idx < 1) ? 'PM' : 10-idx}}
        </div>
      </div>
    </div>

  </div>
   
  <div ng-repeat="panel_id in [acc.panelId]" class="subpanel data-buses" ng-include src="'partials/data_buses.html'">
  </div>

  <div class="subpanel panel-controls">
    <div class="control-row">
      <div class="control-8 plug inter-plug">inter<br/>con</br>plug<br/>L1</div>
      <div class="control-10 plug digital-in" ng-repeat="digitalInput in acc.digitalInputs">
        <div class="vert-connector" data-dest-id="{{digitalInput.portId}}" ng-tooltip="Accumulator Input {{digitalInput.name}}" ng-include src="'partials/vert_data_bus_inner.html'"></div>
      </div>
      <div class="control-10 plug digital-out" ng-repeat="digitalOutput in acc.digitalOutputs">
        <div class="vert-connector" data-dest-id="{{digitalOutput.portId}}" ng-tooltip="Accumulator Output {{digitalOutput.name}}" ng-include src="'partials/vert_data_bus_inner.html'"></div>
      </div>
      <div class="control-8 plug inter-plug">inter<br/>con</br>plug<br/>R1</div>
    </div>
  
    <div class="control-row">
      <div class="control-8 plug inter-plug">inter<br/>con<br/>plug<br/>L2</div>
      <div class="control-8 plug panel-label">Off / On</div>
      <div class="control-8 plug dial-and-switch {{dialAndSwitch.active ? 'active-ctrl' : ''}}" ng-repeat="dialAndSwitch in acc.nonRepeatProgControls">
        <div class="lbl">{{dialAndSwitch.idx}}</div>
        <div class="switch">c<input type="checkbox"></input></div>
        <div class="dial">
          <select ng-model="dialAndSwitch.operation" ng-options="option for option in acc.operationOpts"></select>
        </div>
      </div>
  
      <div class="control-8 plug sig-figs">
        <div class="switch">sc<input type="checkbox"></input></div>
        <div class="dial">
          <select ng-model="acc.sigFiguresCtrl.sigFigs" ng-options="option for option in acc.sigFigureOpts"></select>
        </div>
        <div class="lbl">Sig. Fig.</div>
      </div>
      <div class="control-8 plug inter-plug">inter<br/>con</br>plug<br/>R2</div>
    </div>
  
    <div class="control-row">
      <div class="control-8 plug dial-and-switch {{dialAndSwitch.active ? 'active-ctrl' : ''}}" ng-repeat="dialAndSwitch in acc.repeatProgControls">
        <div class="lbl">{{dialAndSwitch.idx}}</div>
        <div class="switch">c<input type="checkbox"></input></div>
        <div class="dial">
          <select ng-model="dialAndSwitch.operation" ng-options="option for option in acc.operationOpts"></select>
        </div>
      </div>
    </div>
  
    <div class="control-row">
      <div class="control-subrow">
        <div class="control-8 plug dial-only {{dial.active ? 'active-ctrl' : ''}}" ng-repeat="dial in acc.repeatProgControls">
          <div class="dial">
            <select ng-model="dial.repeat" ng-options="option for option in acc.repeatOpts"></select>
          </div>
        </div>
      </div>
    
      <div class="control-subrow">
        <div class="control-8"></div>
        <div class="control-8"></div>
        <div class="control-8 control-io" ng-repeat="ctrl in acc.nonRepeatProgControls">
          <div class="one-control-io"><div class="htfix"></div><div class="circled-content control-connector" ng-tooltip="Non-repeating control output {{$index}}" data-dest-id="{{ctrl.inPort.portId}}">{{ctrl.inPort.busName || "&bull;"}}</div></div>
        </div>
        <div class="control-8"></div>
        <div class="control-8"></div>
      </div>
    
      <div class="control-subrow">
        <div class="control-8 control-io-pair" ng-repeat="ctrl in acc.repeatProgControls">
          <div class="control-8 two-control-io-left"><div class="htfix"></div><div class="circled-content control-connector" ng-tooltip="Repeating control input {{$index}}" data-dest-id="{{ctrl.inPort.portId}}">{{ctrl.inPort.busName || "&bull;"}}</div></div>
          <div class="control-8 two-control-io-right"><div class="htfix"></div><div class="circled-content control-connector" ng-tooltip="Repeating control output {{$index}}" data-dest-id="{{ctrl.outPort.portId}}">{{ctrl.outPort.busName || "&bull;"}}</div></div>
        </div>
      </div>
    </div>
  </div>

  <div ng-repeat="panel_id in [acc.panelId]" class="subpanel control-buses" ng-include src="'partials/control_buses.html'">
  </div>

</div>
