<div class="alert alert-warning" ng-show="!smartGroupColumns.length">
  {{:: ts('Unable to create smart group because this search does not include any contacts.') }}
</div>

<div class="form-inline">
  <label for="crm-search-admin-group-title">{{ ts('Group Title:') }} <span class="crm-marker">*</span></label>
  <input id="crm-search-admin-group-title" class="form-control" placeholder="{{:: ts('Untitled') }}" ng-model="$ctrl.savedSearch.groups[0].title" ng-disabled="!smartGroupColumns.length" ng-required="smartGroupColumns.length">
  <label for="api-save-search-select-column">{{:: ts('Contact Column:') }}</label>
  <input id="api-save-search-select-column" ng-model="$ctrl.savedSearch.api_params.select[0]" class="form-control huge" crm-ui-select="{data: smartGroupColumns}"/>
</div>
<fieldset ng-show="smartGroupColumns.length">
  <label>{{:: ts('Description:') }}</label>
  <textarea class="form-control" ng-model="$ctrl.savedSearch.groups[0].description"></textarea>
  <div class="form-inline">
    <label>{{:: ts('Group Type:') }} </label>
    <div class="checkbox" ng-repeat="option in groupOptions.group_type track by option.id">&nbsp;
      <label>
        <input type="checkbox" checklist-model="$ctrl.savedSearch.groups[0].group_type" checklist-value="option.id">
        {{ option.label }}
      </label>&nbsp;
    </div>
  </div>
  <div class="form-inline">
    <label>{{:: ts('Visibility:') }}</label>
    <select class="form-control" ng-model="$ctrl.savedSearch.groups[0].visibility" ng-options="item.id as item.label for item in groupOptions.visibility track by item.id" crm-ui-select></select>
  </div>
</fieldset>
