<div ng-controller="EditRecipCtrl" class="crm-mailing-recipients-row">
  <div crm-ui-field="{name: 'subform.recipients_include', title: ts('Recipients'), required: true}">
    <crm-mailing-recipients-autocomplete ng-if="mailing" crm-recipients="mailing.recipients" crm-mailing-id="mailing.id" crm-mode="include"></crm-mailing-recipients-autocomplete>
    <div ng-style="{display: permitRecipientRebuild ? '' : 'inline-block'}">
      <button ng-click="rebuildRecipients()" ng-show="permitRecipientRebuild" class="crm-button" title="{{:: ts('Click to refresh recipient count') }}">{{getRecipientsEstimate()}}</button>
      <a ng-click="previewRecipients()" class="crm-hover-button" title="{{:: ts('Preview a List of Recipients') }}" style="font-weight: bold;">{{getRecipientCount()}}</a>
    </div>
  </div>
  <div crm-ui-field="{name: 'subform.recipients_exclude', title: ts('Exclude')}">
    <crm-mailing-recipients-autocomplete ng-if="mailing" crm-recipients="mailing.recipients" crm-mailing-id="mailing.id" crm-mode="exclude"></crm-mailing-recipients-autocomplete>
    <a crm-icon="fa-wrench" ng-click="editOptions(mailing)" class="crm-hover-button" title="{{:: ts('Edit Recipient Options') }}">{{:: ts('Advanced') }}</a>
  </div>
</div>
