<DModalBody
  @rawTitle={{if
    this.post
    (i18n "post.share.title" post_number=this.post.post_number)
    (i18n "topic.share.title")
  }}
  @rawSubtitle={{if this.post this.displayDate}}
>
  <form>
    <div class="input-group invite-link">
      <label for="invite-link">
        {{if
          this.post
          (i18n "post.share.instructions" post_number=this.post.post_number)
          (i18n "topic.share.instructions")
        }}
      </label>
      <div class="link-share-container">
        <Input
          id="invite-link"
          name="invite-link"
          class="invite-link"
          @value={{this.url}}
          readonly={{true}}
        />
        <CopyButton @selector="input.invite-link" />
      </div>
    </div>

    <div class="link-share-actions">
      <div class="sources">
        {{#each this.sources as |s|}}
          <ShareSource
            @source={{s}}
            @title={{this.topic.title}}
            @action={{action "share"}}
          />
        {{/each}}

        {{#if this.allowInvites}}
          <DButton
            @class="btn-default invite"
            @label="topic.share.invite_users"
            @icon="user-plus"
            @action={{action "inviteUsers"}}
          />
        {{/if}}

        {{#if this.topic.details.can_reply_as_new_topic}}
          {{#if this.topic.isPrivateMessage}}
            <DButton
              @action={{action "replyAsNewTopic"}}
              @class="btn-default new-topic"
              @icon="plus"
              @aria-label="post.reply_as_new_private_message"
              @title="post.reply_as_new_private_message"
              @label="user.new_private_message"
            />
          {{else}}
            <DButton
              @action={{action "replyAsNewTopic"}}
              @class="btn-default new-topic"
              @icon="plus"
              @aria-label="post.reply_as_new_topic"
              @title="post.reply_as_new_topic"
              @label="topic.create"
            />
          {{/if}}
        {{/if}}
      </div>
    </div>
  </form>
</DModalBody>