<main class="ship-domain-overview" aria-label="Ship profile">
    {{> "modules/augur-nexus/templates/campaign-entities/ship-command-cards.hbs" domain=domain}}

    <section class="ship-domain-identity">
        <h3><i class="fas fa-fingerprint"></i> Ship Identity</h3>
        <div>{{#each identity}}<article><em>{{label}}</em><strong>{{value}}</strong></article>{{/each}}</div>
    </section>

    <div class="ship-domain-columns">
        <section class="ship-domain-collection" data-ship-domain-drop="crew">
            <h3><i class="fas fa-users"></i> Crew Manifest <span>{{domain.crewCount}}</span></h3>
            <div class="ship-domain-card-grid">
                {{#if domain.hasCaptain}}<button type="button" class="ship-domain-small-card is-captain" data-ship-domain-node="{{domain.captain.nodeId}}" draggable="true"><span class="nexus-entity-image is-person">{{#if domain.captain.imageSrc}}<img src="{{domain.captain.imageSrc}}" alt="" draggable="false">{{else}}<i class="fas fa-user"></i>{{/if}}</span><strong>{{domain.captain.name}}</strong><em>Captain</em></button>{{/if}}
                {{#each domain.crew}}<button type="button" class="ship-domain-small-card" data-ship-domain-node="{{nodeId}}" draggable="true"><span class="nexus-entity-image is-person">{{#if imageSrc}}<img src="{{imageSrc}}" alt="" draggable="false">{{else}}<i class="fas fa-user"></i>{{/if}}</span><strong>{{name}}</strong><em>{{subtitle}}</em></button>{{/each}}
                {{#unless domain.crewCount}}<div class="ship-domain-empty">{{#if domain.canManage}}Drop People here to build the crew.{{else}}No crew members have been recorded.{{/if}}</div>{{/unless}}
            </div>
            {{#if domain.canManage}}
            <div class="ship-domain-crew-footer">
                <p class="ship-domain-drop-hint"><i class="fas fa-hand-pointer"></i> People can be dragged here to add them to the crew.</p>
                <button type="button" class="nexus-create-button-round" data-action="createShipCrewMember" title="Create crew member" aria-label="Create crew member"><i class="fas fa-plus"></i></button>
            </div>
            {{/if}}
        </section>
        <section class="ship-domain-collection" data-ship-domain-drop="ties">
            <h3><i class="fas fa-diagram-project"></i> World Ties <span>{{domain.worldTieCount}}</span></h3>
            <div class="ship-domain-card-grid">
                {{#each domain.worldTies}}<button type="button" class="ship-domain-small-card" data-ship-domain-node="{{nodeId}}" draggable="true" style="--connection-category-color: {{categoryColor}}"><span class="nexus-entity-image {{#if isFaction}}is-emblem{{else}}{{#if isPerson}}is-person{{else}}is-place{{/if}}{{/if}}">{{#if imageSrc}}<img src="{{imageSrc}}" alt="" draggable="false">{{else}}<i class="{{categoryIcon}}"></i>{{/if}}</span><strong>{{name}}</strong><em>{{role}}</em></button>{{else}}<div class="ship-domain-empty">{{#if domain.canManage}}Drop a Person, Organization, Ship, or Place here.{{else}}No other world ties have been recorded.{{/if}}</div>{{/each}}
            </div>
            {{#if domain.canManage}}<p class="ship-domain-drop-hint"><i class="fas fa-hand-pointer"></i> Drop other Nexus entities here to create connections.</p>{{/if}}
        </section>
    </div>
</main>
