{{#composer-body composer=model showPreview=showPreview 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"}} {{composer-toggles composeState=model.composeState toggleComposer=(action "toggle") toggleToolbar=(action "toggleToolbar")}} {{#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 class="users-input"}} {{#if showWarning}} {{/if}}
    {{/if}}
    {{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}} {{#if model.showCategoryChooser}}
    {{category-chooser value=model.categoryId scopedCategoryId=scopedCategoryId tabindex="3"}} {{popup-input-tip validation=categoryValidation}}
    {{#if model.archetype.hasOptions}} {{d-button action="showOptions" label="topic.options"}} {{/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 isCancellable=isCancellable uploadProgress=uploadProgress groupsMentioned="groupsMentioned" cannotSeeMention="cannotSeeMention" importQuote="importQuote" showOptions="showOptions" hideOptions="hideOptions" optionsVisible=optionsVisible togglePreview="togglePreview" showToolbar=showToolbar showUploadSelector="showUploadSelector" afterRefresh="afterRefresh"}}
    {{plugin-outlet name="composer-fields-below" args=(hash model=model)}} {{#if canEditTags}} {{tag-chooser tags=model.tags tabIndex="4" categoryId=model.categoryId}} {{/if}}
    {{composer-save-button action=(action "save") icon=model.saveIcon label=model.saveLabel disableSubmit=disableSubmit}} {{i18n 'cancel'}} {{#if site.mobileView}} {{#if whisperOrUnlistTopic}} {{d-icon "eye-slash"}} {{/if}} {{/if}} {{#if isUploading}}
    {{loading-spinner size="small"}} {{i18n 'upload_selector.uploading'}} {{uploadProgress}}% {{#if isCancellable}} {{d-icon "times"}} {{/if}}
    {{/if}}
    {{model.draftStatus}}
    {{#if site.mobileView}} {{i18n 'upload'}} {{#if showPreview}} {{d-button action='togglePreview' class='hide-preview' label='composer.hide_preview'}} {{/if}} {{else}} {{{toggleText}}} {{/if}}
    {{else}}
    {{#if model.createdPost}} {{i18n 'composer.saved'}} {{else}} {{i18n 'composer.saving'}} {{loading-spinner size="small"}} {{/if}}
    {{#if model.topic}} {{d-icon "mail-forward"}} {{{draftTitle}}} {{else}} {{i18n "composer.saved_draft"}} {{/if}}
    {{/if}} {{/if}} {{/composer-body}}