<section class="site-preview-shell place-preview-shell npc-dossier-shell faction-dossier-shell {{#if dossier.isCompact}}is-compact{{/if}}" style="{{backgroundStyle}}">
    <div class="site-preview-shade"></div>

    {{#if missing}}
    <div class="npc-dossier-missing">This organization could not be found.</div>
    {{else}}
    <div class="faction-domain-stage {{#if dossier.isCompact}}is-compact{{/if}}">
        {{#unless dossier.isCompact}}
        {{> "modules/augur-nexus/templates/campaign-entities/faction-domain-overview.hbs" domain=domain}}
        {{/unless}}
        <aside class="site-preview-dossier place-preview-dossier npc-dossier-profile faction-domain-dossier" data-connections-drop-surface>
            {{> "modules/augur-nexus/templates/campaign-entities/faction-profile-panel.hbs" profile=faction.profile domain=domain diplomacy=diplomacy}}

            {{#if dossier.isJournalTab}}
            <section class="npc-dossier-section npc-dossier-journal">
                <div class="npc-dossier-journal-body">
                {{#if journal.hasPage}}
                {{#if journal.hasContent}}
                <div class="npc-dossier-journal-content">
                    {{{journal.content}}}
                </div>
                {{else}}
                <div class="npc-dossier-empty">This journal is blank.</div>
                {{/if}}
                {{else}}
                <div class="npc-dossier-empty">No journal has been created for this organization.</div>
                {{/if}}
                </div>
                {{#if isGM}}
                <footer class="npc-dossier-journal-footer">
                    <button type="button" class="npc-dossier-secondary" data-action="{{#if journal.hasPage}}openFactionJournal{{else}}createFactionJournal{{/if}}">
                        <i class="fas {{#if journal.hasPage}}fa-book-open{{else}}fa-book-medical{{/if}}"></i>
                        <span>{{#if journal.hasPage}}Edit Journal{{else}}Create Journal{{/if}}</span>
                    </button>
                </footer>
                {{/if}}
            </section>
            {{/if}}
            {{#if dossier.isChronicleTab}}
            <section class="entity-dossier-chronicle">{{{chronicleHtml}}}</section>
            {{/if}}
            {{#if dossier.isConnectionsTab}}
            <section class="faction-domain-connections" aria-label="Organization connections">
                {{> "modules/augur-nexus/templates/connections/connections-board.hbs" connections.board}}
            </section>
            {{/if}}
        </aside>

    </div>
    {{/if}}
</section>
