<div class="tab main sheet-part" data-group="sheet" data-tab="main">
  {{!-- Toggle Edit/Play --}}
  <div class="sheet-header-toggle">
    {{#if isEditMode}}
      <button type="button" data-action="toggleSheet">{{localize "VERMINE.playMode"}}</button>
    {{else}}
      <button type="button" data-action="toggleSheet">{{localize "VERMINE.editMode"}}</button>
    {{/if}}
  </div>

  {{!-- HEADER --}}
  <header class="sheet-header">
    <img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" title="{{actor.name}}"
      height="100" width="100" />
    <div class="header-fields">
      <div class="resources grid grid-4col">
        <h1 class="charname grid-span-2">
          {{#if isEditMode}}
          <input name="name" type="text" value="{{actor.name}}" placeholder="{{ localize 'VERMINE.vehicle' }}" />
          {{else}}
          <span>{{actor.name}}</span>
          {{/if}}
        </h1>
        <div class="resource flex-group-center grid-span-1">
          <label for="system.kind" class="resource-label">{{ localize 'VERMINE.kind' }}</label>
          <div class="resource-content">
            {{#if isEditMode}}
            <select name="system.kind" id="system.kind" data-dtype="String">
              <option value="vehicle" {{#ife system.kind "vehicle"}}selected{{/ife}}>{{ localize "VERMINE.kind_vehicle" }}</option>
              <option value="mount" {{#ife system.kind "mount"}}selected{{/ife}}>{{ localize "VERMINE.kind_mount" }}</option>
            </select>
            {{else}}
            <span>{{#ife system.kind "mount"}}{{ localize "VERMINE.kind_mount" }}{{else}}{{ localize "VERMINE.kind_vehicle" }}{{/ife}}</span>
            {{/if}}
          </div>
        </div>
        <div class="resource flex-group-center grid-span-1">
          <label for="system.reliability" class="resource-label">{{ localize 'VERMINE.reliability' }}</label>
          <div class="resource-content">
            {{#if isEditMode}}
            <input type="number" name="system.reliability" id="system.reliability" value="{{system.reliability}}"
              data-dtype="Number" min="1" max="10" />
            {{else}}
            <span>{{system.reliability}}</span>
            {{/if}}
          </div>
        </div>
      </div>
      <div class="resources grid grid-4col">
        <div class="resource flex-group-center grid-span-1">
          <label for="system.rarity.value" class="resource-label">{{ localize 'VERMINE.rarity' }}</label>
          <div class="resource-content">
            {{#if isEditMode}}
            <input type="number" name="system.rarity.value" id="system.rarity.value" value="{{system.rarity.value}}"
              data-dtype="Number" min="1" max="10" />
            {{else}}
            <span>{{system.rarity.value}}</span>
            {{/if}}
          </div>
        </div>
        <div class="resource flex-group-center grid-span-1">
          <label for="system.mobility" class="resource-label">{{ localize 'VERMINE.mobility' }}</label>
          <div class="resource-content">
            {{#if isEditMode}}
            <input type="number" name="system.mobility" id="system.mobility" value="{{system.mobility}}"
              data-dtype="Number" min="0" />
            {{else}}
            <span>{{system.mobility}}</span>
            {{/if}}
          </div>
        </div>
        <div class="resource flex-group-center grid-span-2">
          <label for="system.distance" class="resource-label">{{ localize 'VERMINE.distance' }}</label>
          <div class="resource-content">
            {{#if isEditMode}}
            <input type="number" name="system.distance" id="system.distance" value="{{system.distance}}"
              data-dtype="Number" min="0" />
            {{else}}
            <span>{{system.distance}}</span>
            {{/if}}
            <span> km</span>
          </div>
        </div>
      </div>
    </div>
  </header>

  {{#if resolvedOwner}}
  <div class="vehicle-owner">
    <span class="label">{{ localize 'VERMINE.owner' }}:</span>
    <span class="value">{{ resolvedOwner.name }}</span>
  </div>
  {{/if}}
</div>
