<div class="tab road sheet-part {{#if @root.tabs.road.active}}active{{/if}}" data-group="sheet" data-tab="road">
  <div class="grid grid-1col">
    {{!-- Rencontres --}}
    <div>
      <h4>{{ localize 'VERMINE.encounters' }}{{#if isEditMode}}<a class="item-control chooseActor" data-action="chooseActor" data-list="encounters" title="{{ localize 'UI.add' }}" data-type="encounters"><i class="fas fa-plus"></i></a>{{/if}}</h4>
      <ol class="group-list">
        <li class="group-list-header">
          <div class="gcol-name">{{ localize 'IDENTITY.name'}}</div>
          <div class="gcol-profile">{{ localize 'IDENTITY.profile'}}</div>
          <div class="gcol-totem">{{ localize 'IDENTITY.totem'}}</div>
          <div class="item-controls"></div>
        </li>
        {{#each system.encounters as |encounterId|}}
          {{#with (lookup ../resolvedEncounters encounterId) as |encounter|}}
          <li class="actor" data-actor-id="{{encounterId}}">
            {{#if encounter}}
            <div class="gcol-name">
              <a class="item-control">{{encounter.name}}</a>
              <span class="encounter-type">({{encounter.type}})</span>
            </div>
            <div class="gcol-profile">{{encounter.profile}}</div>
            <div class="gcol-totem">{{#if encounter.totem}}{{ smarttl "TOTEMS" encounter.totem }}{{/if}}</div>
            {{else}}
            <div class="gcol-name"><a class="item-control" style="color: red;">ID: {{encounterId}}</a></div>
            <div class="gcol-profile"></div>
            <div class="gcol-totem"></div>
            {{/if}}
            <div class="item-controls">
              {{#if @root.isEditMode}}
              <a class="item-control encounter-delete" data-action="deleteEncounter" data-actor-id="{{encounterId}}" title="{{ localize 'UI.effect_delete' }}"><i class="fas fa-trash"></i></a>
              {{/if}}
            </div>
          </li>
          {{/with}}
        {{else}}
        <li class="item">
          <span class="item-name">{{ localize 'VERMINE.no_encounters' }}</span>
        </li>
        {{/each}}
      </ol>
    </div>

    {{!-- Notes de voyage --}}
    <div>
      <h4>{{ localize 'VERMINE.travel_notes' }}</h4>
      {{formInput systemFields.roadNotes enriched=enrichedRoadNotes value=system.roadNotes name="system.roadNotes" toggled=true}}
    </div>
  </div>
</div>
