<header class="npc-dossier-header ship-dossier-header">
    <div class="npc-dossier-portrait ship-dossier-image" {{#if @root.isGM}}draggable="true" data-ship-dossier-drag="true" title="Drag {{profile.name}}"{{/if}}>
        {{#if profile.imageSrc}}<img src="{{profile.imageSrc}}" alt="{{profile.name}}" draggable="false">{{else}}<i class="fas fa-rocket"></i>{{/if}}
    </div>
    <div class="npc-dossier-title">
        <h2>{{profile.name}}</h2>
        <p>{{profile.subtitle}}</p>
        {{#if profile.showTabs}}
        <nav class="npc-dossier-tabs" aria-label="Ship dossier tabs">
            <button type="button" class="{{#if profile.tabs.isProfileTab}}active{{/if}}" data-action="setShipDossierTab" data-tab="profile">Profile</button>
            <button type="button" class="{{#if profile.tabs.isJournalTab}}active{{/if}}" data-action="setShipDossierTab" data-tab="journal">Journal</button>
            <button type="button" class="npc-dossier-tab-icon {{#if profile.tabs.isConnectionsTab}}active{{/if}}" data-action="setShipDossierTab" data-tab="connections" title="Connections" aria-label="Connections"><i class="fas fa-share-nodes"></i></button>
            {{#if profile.linkedActor}}
            <button type="button" class="npc-dossier-tab-icon" data-action="openShipLinkedActor" title="Open linked Actor" aria-label="Open linked Actor">
                <i class="fas fa-user-circle"></i>
            </button>
            {{/if}}
        </nav>
        {{/if}}
    </div>
    {{#if profile.showHeaderActions}}
    <div class="npc-dossier-header-actions ship-dossier-header-actions">
        {{#if profile.showActions}}<button type="button" class="npc-dossier-action" data-action="openShipActions" title="Ship actions" aria-label="Ship actions"><i class="fas fa-ellipsis"></i></button>{{/if}}
        {{#if profile.showCompactToggle}}
        <button type="button" class="npc-dossier-compact-toggle" data-action="toggleShipDossierCompact" title="{{#if profile.compactMode}}Expand ship dossier{{else}}Compact ship dossier{{/if}}" aria-label="{{#if profile.compactMode}}Expand ship dossier{{else}}Compact ship dossier{{/if}}">
            <i class="fas {{#if profile.compactMode}}fa-expand{{else}}fa-compress{{/if}}"></i>
        </button>
        {{/if}}
    </div>
    {{/if}}
</header>

{{#if profile.compactMode}}{{#if profile.tabs.isProfileTab}}
{{> "modules/augur-nexus/templates/campaign-entities/ship-command-cards.hbs" domain=domain}}
{{/if}}{{/if}}

{{#if profile.showBody}}
<section class="npc-dossier-section">
    {{#if profile.identityChips.length}}
    <div class="npc-dossier-chip-row npc-dossier-chip-row-primary">
        {{#each profile.identityChips}}<span><em>{{label}}</em><strong>{{value}}</strong></span>{{/each}}
    </div>
    {{/if}}
    {{#if profile.chips.length}}
    <div class="npc-dossier-chip-row">
        {{#each profile.chips}}<span><em>{{label}}</em><strong>{{value}}</strong></span>{{/each}}
    </div>
    {{/if}}
    {{#if profile.profileRows.length}}
    <div class="npc-dossier-custom-row">
        {{#each profile.profileRows}}<span><em>{{label}}</em><strong>{{value}}</strong></span>{{/each}}
    </div>
    {{/if}}
</section>
{{/if}}
