<section class="vehicle-main vehicle-main-{{ifThen isPlayMode 'play' 'edit'}}">

  <fieldset>
    <legend>{{localize "FTLNOMAD.Label.vehicle"}}</legend>
    <div class="vehicle-pc vehicle-pc-{{ifThen isPlayMode 'play' 'edit'}}">
      <div class="vehicle-left">
        <div class="vehicle-left-image">
          <img
            class="vehicle-img"
            src="{{actor.img}}"
            data-edit="img"
            data-action="editImage"
            data-tooltip="{{actor.name}}"
          />
        </div>
        <fieldset class="spec">
          {{formField
            systemFields.agility
            value=system.agility
            localize=true
            disabled=isPlayMode
          }}
          {{formField
            systemFields.armor
            value=system.armor
            localize=true
            disabled=isPlayMode
          }}
          {{formField
            systemFields.armorCritical
            value=system.armorCritical
            localize=true
            disabled=isPlayMode
          }}
        </fieldset>

      </div>

      <div class="vehicle-right">
        <div class="vehicle-name">
          {{formInput
            fields.name
            value=source.name
            rootId=partId
            disabled=isPlayMode
          }}
          <a
            class="control"
            data-action="toggleSheet"
            data-tooltip="FTLNOMAD.ToggleSheet"
            data-tooltip-direction="UP"
          >
            <i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
          </a>
        </div>

        <fieldset class="capacity">
          <legend>{{localize "FTLNOMAD.Label.capacity"}}</legend>
          <div class="flexrow">
            {{formField
              systemFields.force
              value=system.force
              localize=true
              disabled=isPlayMode
            }}
          </div>
          <div class="flexrow">
            {{formField
              systemFields.range
              value=system.range
              localize=true
              disabled=isPlayMode
            }}
            {{formField
              systemFields.speed
              value=system.speed
              localize=true
              disabled=isPlayMode
            }}
          </div>
        </fieldset>

        <fieldset class="cargo">
          <legend>{{localize "FTLNOMAD.Label.cargo"}}</legend>
          <div class="cargo-content">
            <div class="cargo-line">
              {{formField
                systemFields.crewCapacity
                value=system.crewCapacity
                localize=true
                disabled=isPlayMode
              }}
              <div class="npc-crew-field">
                <a
                  class="npc-crew-roll rollable"
                  data-action="rollNpcCrew"
                  data-tooltip="{{localize 'FTLNOMAD.RollNpcCrew'}}"
                ><i class="fas fa-dice-d6"></i></a>
                {{formField
                  systemFields.npcCrew
                  value=system.npcCrew
                  localize=true
                  disabled=isPlayMode
                }}
              </div>
            </div>
            <div class="cargo-line">
              {{formField
                systemFields.cargo
                value=system.cargo
                localize=true
                disabled=isPlayMode
              }}
              {{formField
                systemFields.tonnage
                value=system.tonnage
                localize=true
                disabled=isPlayMode
              }}
            </div>
          </div>
        </fieldset>
      </div>
    </div>
  </fieldset>

</section>