{{#composer-body composer=model showPreview=showPreview openIfDraft="openIfDraft" typed="typed" cancelled="cancelled" save="save"}} {{#if visible}} {{composer-messages composer=model messageCount=messageCount addLinkLookup="addLinkLookup"}} {{#if model.viewOpen}}
{{plugin-outlet name="composer-open" args=(hash model=model)}}
{{composer-action-title model=model canWhisper=canWhisper}} {{#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}}
{{composer-toggles composeState=model.composeState toggleComposer=(action "toggle") toggleToolbar=(action "toggleToolbar")}}
{{#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}} {{#if canEditTags}} {{mini-tag-chooser tags=model.tags tabindex="4" categoryId=model.categoryId}} {{/if}}
{{/if}} {{plugin-outlet name="composer-fields" args=(hash model=model)}}
{{composer-editor topic=topic composer=model lastValidatedAt=lastValidatedAt canWhisper=canWhisper storeToolbarState="storeToolbarState" onPopupMenuAction=(action "onPopupMenuAction") popupMenuOptions=popupMenuOptions draftStatus=model.draftStatus isUploading=isUploading allowUpload=allowUpload isCancellable=isCancellable uploadProgress=uploadProgress groupsMentioned="groupsMentioned" cannotSeeMention="cannotSeeMention" importQuote="importQuote" togglePreview="togglePreview" showToolbar=showToolbar showUploadSelector="showUploadSelector" afterRefresh="afterRefresh"}}
{{plugin-outlet name="composer-fields-below" args=(hash model=model)}}
{{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}} {{#if allowUpload}} {{i18n 'upload'}} {{/if}} {{#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}}
{{composer-toggles composeState=model.composeState toggleComposer=(action "toggle") toggleToolbar=(action "toggleToolbar")}} {{/if}} {{/if}} {{/composer-body}}