{{#composer-body composer=model openIfDraft="openIfDraft" typed="typed" cancelled="cancelled" save="save"}} {{#if visible}}
{{#if showPopupMenu}} {{#popup-menu visible=optionsVisible hide="hideOptions" title="composer.options"}} {{#each popupMenuOptions as |option|}} {{#if option.condition}}
  • {{d-button action=option.action icon=option.icon label=option.label}}
  • {{/if}} {{/each}} {{/popup-menu}} {{/if}} {{composer-messages composer=model messageCount=messageCount addLinkLookup="addLinkLookup"}}
    {{#if site.mobileView}} {{/if}} {{#if model.viewOpen}}
    {{plugin-outlet name="composer-open" args=(hash model=model)}}
    {{{model.actionTitle}}} {{#unless site.mobileView}} {{#if whisperOrUnlistTopicText}} ({{whisperOrUnlistTopicText}}) {{/if}} {{/unless}} {{#if canEdit}} {{#if showEditReason}}
    {{text-field autofocus="true" value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
    {{else}} {{i18n 'composer.show_edit_reason'}} {{/if}} {{/if}}
    {{#if model.canEditTitle}}
    {{#if model.creatingPrivateMessage}} {{composer-user-selector topicId=topicModel.id usernames=model.targetUsernames hasGroups=model.hasTargetGroups focusTarget=focusTarget}} {{#if showWarning}}
    {{/if}} {{/if}} {{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}} {{#if model.showCategoryChooser}}
    {{category-chooser valueAttribute="id" value=model.categoryId scopedCategoryId=scopedCategoryId tabindex="3"}} {{popup-input-tip validation=categoryValidation}}
    {{#if model.archetype.hasOptions}} {{/if}} {{/if}}
    {{/if}} {{plugin-outlet name="composer-fields" args=(hash model=model)}}
    {{composer-editor topic=topic composer=model lastValidatedAt=lastValidatedAt canWhisper=canWhisper showPopupMenu=showPopupMenu draftStatus=model.draftStatus isUploading=isUploading groupsMentioned="groupsMentioned" cannotSeeMention="cannotSeeMention" importQuote="importQuote" showOptions="showOptions" hideOptions="hideOptions" optionsVisible=optionsVisible showToolbar=showToolbar showUploadSelector="showUploadSelector" afterRefresh="afterRefresh"}} {{#if currentUser}}
    {{plugin-outlet name="composer-fields-below" args=(hash model=model)}} {{#if canEditTags}} {{tag-chooser tags=model.tags tabIndex="4" categoryId=model.categoryId}} {{/if}} {{i18n 'cancel'}} {{#if site.mobileView}} {{#if whisperOrUnlistTopic}} {{/if}} {{/if}}
    {{/if}}
    {{else}}
    {{#if model.createdPost}} {{i18n 'composer.saved'}} {{else}} {{i18n 'composer.saving'}} {{loading-spinner size="small"}} {{/if}}
    {{#if model.topic}} {{fa-icon "mail-forward"}} {{{draftTitle}}} {{else}} {{i18n "composer.saved_draft"}} {{/if}}
    {{/if}}
    {{/if}} {{/composer-body}}