{{#modal-dialog action=(action 'closeModal')}}
  <article class="card">
    <div class="text-content">
      <header class="content-header">
        <h4>
          {{i18n 'Receive Subscriber List'}}
        </h4>
      </header>

      {{#if hasConfirmedEmailingSubscriberList}}
        <section class="item">
          <p>
            {{styled-i18n 'An email with a CSV attachment is being sent to %{emailAddress}.'
              (hash emailAddress=partnerEmailAddress)}}
          </p>
        </section>

        <section class="item">
          <p>
            {{i18n 'This may take several minutes if you have a large number of subscribers.'}}
          </p>
        </section>

        <section class="buttons">
          <button type="button" class="button" {{action 'closeModal'}}>
            {{t 'general.forms.close'}}
          </button>
        </section>
      {{else}}
        <section class="item">
          <p>
            {{i18n 'Do you wish to be emailed a list of your active subscribers?'}}
          </p>
        </section>

        <section class="item">
          <p>
            {{i18n 'An email with a CSV attachment will be sent to you.'}}
          </p>
        </section>

        {{#if hasEmailingSubscriberListErrored}}
          <section class="item">
            <p class="inline-warning">
              {{i18n 'Oops, something went wrong. Please try again.'}}
            </p>
          </section>
        {{/if}}

        <section class="buttons">
          <button type="button" class="button button--text" {{action 'closeModal'}}>
            {{t 'general.forms.cancel'}}
          </button>

          <button type="button"
            class="button {{if isEmailingSubscriberList 'button--disabled'}}"
            {{action 'emailSubscribersList'}}
            disabled={{isEmailingSubscriberList}}>

            {{~#if isEmailingSubscriberList~}}
              {{i18n 'Sending Email...'}}
            {{~else~}}
              {{i18n 'Send Me Email'}}
            {{~/if~}}
          </button>
        </section>
      {{/if}}
    </div>
  </article>
{{/modal-dialog}}
