<fieldset class="gh-publish-types">
    {{#each @publishOptions.publishTypeOptions as |option|}}
        <span>
            <input
                type="radio"
                name="publish-type"
                id="publish-type-{{option.value}}"
                class="gh-radio-button"
                value={{option.value}}
                checked={{eq option.value @publishOptions.selectedPublishTypeOption.value}}
                disabled={{option.disabled}}
                {{on "change" this.onChange}}
                data-test-publish-type={{option.value}}
            >
            <label for="publish-type-{{option.value}}">{{option.label}}</label>
        </span>
    {{/each}}
</fieldset>

{{#if @publishOptions.emailDisabledError}}
    <p class="gh-box gh-content-box" data-test-publish-type-error="email-disabled">
        {{@publishOptions.emailDisabledError}}
    </p>
{{else if (eq @publishOptions.totalMemberCount 0)}}
    <p class="gh-box gh-content-box" data-test-publish-type-error="no-members">
        <LinkTo @route="members">Add members</LinkTo>
        to start sending newsletters!
    </p>
{{else if (not @publishOptions.mailgunIsConfigured)}}
    <p class="gh-box gh-content-box" data-test-publish-type-error="no-mailgun">
        Set up <a href="https://ghost.org/docs/newsletters/#bulk-email-configuration" target="_blank" rel="noreferrer noopener">Mailgun</a> to start sending newsletters!
    </p>
{{/if}}