<div class="entity-artwork-body">
    {{#if error}}<p role="status">{{error}}</p>{{else}}
    <header><span class="artwork-eyebrow">Portraits & artwork</span><h2>{{name}}</h2><p>{{#if isShip}}Choose artwork, or copy an image to make the linked portraits match.{{else}}The Person supplies linked artwork to the Actor. Use the Actor portrait below to adopt it instead.{{/if}}</p></header>
    <div class="artwork-pair">
        <section><h3>Nexus {{#if isShip}}Ship{{else}}Person{{/if}}</h3>
            <button type="button" class="artwork-preview artwork-pick" data-action="choose" title="{{#if isShip}}Choose ship artwork{{else}}Choose Person portrait{{/if}}" aria-label="{{#if isShip}}Choose ship artwork{{else}}Choose Person portrait{{/if}}">{{#if entityImage}}<img src="{{entityImage}}" alt="Nexus portrait">{{else}}<i class="fas fa-image"></i>{{/if}}<span><i class="fas fa-pen"></i> {{#if isShip}}Change ship artwork{{else}}Change portrait{{/if}}</span></button>
        </section>
        <section><h3>Linked Actor</h3><div class="artwork-preview">{{#if actorImage}}<img src="{{actorImage}}" alt="Actor portrait">{{else}}<i class="fas fa-user-circle"></i>{{/if}}</div><p class="artwork-actor-name">{{#if hasActor}}{{actorName}}{{else}}{{#if hasLink}}Linked Actor unavailable{{else}}No Actor linked{{/if}}{{/if}}</p></section>
    </div>
    {{#if canCopy}}
    {{#unless isShip}}
    <div class="artwork-link-options">
        <label class="artwork-token-option"><input type="checkbox" name="syncActorPortrait" {{#if syncActorPortrait}}checked{{/if}} {{#if busy}}disabled{{/if}}><span>Keep Actor portrait linked to this Person</span></label>
        <p class="artwork-help">Updates the Actor portrait when this Person's portrait changes. Unlink to keep separate portraits.</p>
        <label class="artwork-token-option"><input type="checkbox" name="syncActorToken" {{#if syncActorToken}}checked{{/if}} {{#if busy}}disabled{{/if}}><span>Keep Actor's default token artwork linked</span></label>
        <p class="artwork-help">Uses the Person's matching token image when available, otherwise their portrait. Enabling applies it now and keeps it updated. Tokens already placed on scenes are unaffected.</p>
    </div>
    {{/unless}}
    <div class="artwork-copy-actions"><button type="button" data-action="copyNexus" {{#unless copyNexus}}disabled{{/unless}}><i class="fas fa-arrow-right"></i> Use Nexus portrait for both</button><button type="button" data-action="copyActor" {{#unless copyActor}}disabled{{/unless}}><i class="fas fa-arrow-left"></i> Use Actor portrait for both</button></div>
    {{#unless syncActorToken}}
    <label class="artwork-token-option"><input type="checkbox" name="includeToken" {{#if includeToken}}checked{{/if}}><span>Also update the Actor’s default token artwork</span></label>
    <p class="artwork-help">{{#unless isShip}}Copying from Nexus uses the Person’s matching token image when available. {{/unless}}Copies once. Existing tokens on scenes stay unchanged.</p>
    {{/unless}}
    {{else}}<p class="artwork-help">{{#if hasActor}}You can change the Nexus artwork. Ownership of the linked Actor is required to copy between them.{{else}}You can change the Nexus artwork here. Your GM can manage the Actor link from the dossier.{{/if}}</p>{{/if}}
    {{#if message}}<p class="artwork-message" role="status">{{message}}</p>{{/if}}
    {{/if}}
</div>
