<DModalBody
  @title="raw_email.title"
  @class="incoming-email-modal"
  @maxHeight="80%"
>
  <div class="incoming-email-tabs">
    <DButton
      @action={{action "displayRaw"}}
      @label="post.raw_email.displays.raw.button"
      @title="post.raw_email.displays.raw.title"
      @class={{if this.showRawEmail "active"}}
    />

    {{#if this.textPart}}
      <DButton
        @action={{action "displayTextPart"}}
        @label="post.raw_email.displays.text_part.button"
        @title="post.raw_email.displays.text_part.title"
        @class={{if this.showTextPart "active"}}
      />
    {{/if}}

    {{#if this.htmlPart}}
      <DButton
        @action={{action "displayHtmlPart"}}
        @label="post.raw_email.displays.html_part.button"
        @title="post.raw_email.displays.html_part.title"
        @class={{if this.showHtmlPart "active"}}
      />
    {{/if}}
  </div>

  <div class="incoming-email-content">
    {{#if this.showRawEmail}}
      {{#if this.rawEmail}}
        <Textarea @value={{this.rawEmail}} />
      {{else}}
        {{i18n "raw_email.not_available"}}
      {{/if}}
    {{/if}}
    {{#if this.showTextPart}}
      <Textarea @value={{this.textPart}} />
    {{/if}}
    {{#if this.showHtmlPart}}
      <IframedHtml
        @html={{this.htmlPart}}
        @className="incoming-email-html-part"
      />
    {{/if}}
  </div>
</DModalBody>