<li>
  <div class="{{if result.validator.isInvalid 'warning'}}">
    <span class="glyphicon glyphicon-circle-arrow-right"></span>
    {{#x-select value=result.action action=(action 'resultActionChanged') class="form-control input-sm" as |xs|}}
      {{#each availableActions as |action|}}
        {{#xs.option value=action.value}}{{action.name}}{{/xs.option}}
      {{/each}}
    {{/x-select}}

    {{#if allFieldsReady}}
      {{#x-select value=result.field.content action=(action 'resultFieldChanged') class="form-control input-sm" as |xs|}}
        <option>Choose Field...</option>
        {{#each availableFields as |field|}}
          {{#xs.option value=field}}{{field.data_name}}{{/xs.option}}
        {{/each}}
      {{/x-select}}
    {{else}}
      Loading
    {{/if}}

    {{#if showOptionGroups}}
      {{#if fieldHasOptionGroups}}
        {{#x-select value=result.option_group.content action=(action 'resultOptionGroupChanged') class="form-control input-sm" as |xs|}}
          <option>Choose Group...</option>
          {{#each optionGroups as |group|}}
            {{#xs.option value=group}}{{group.name}}{{/xs.option}}
          {{/each}}
        {{/x-select}}
      {{else}}
        No groups in option list
      {{/if}}
    {{/if}}
    <button class="btn btn-xs btn-link" {{action "clickedDeleteResult" result bubbles=false}}>
      <span class="glyphicon glyphicon-trash"></span>
    </button>
  </div>
</li>
