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

  <fieldset>
    <legend>{{localize "FTLNOMAD.Label.starship"}}</legend>
    <div class="starship-pc starship-pc-{{ifThen isPlayMode 'play' 'edit'}}">
      <div class="starship-left">
        <div class="starship-left-image">
          <img
            class="starship-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
          }}

          {{formField
            systemFields.endurance
            value=system.endurance
            localize=true
            disabled=isPlayMode
          }}
        </fieldset>

      </div>

      <div class="starship-right">
        <div class="starship-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 hull-field">
            {{formField
              systemFields.hullType
              value=system.hullType
              localize=true
              disabled=isPlayMode
            }}
          </div>

          <div class="flexrow-guns">
            <a
              class="rollable starship-guns-label"
              data-roll-type="starship-guns"
            >
              <i class="fa-regular fa-dice dice-2d6"></i>Guns
            </a>
            {{formInput
              systemFields.guns
              value=system.guns
              localize=true
              disabled=isPlayMode
            }}

            {{formField
              systemFields.travelMultiplier
              value=system.travelMultiplier
              localize=true
              disabled=isPlayMode
            }}

          </div>

        </fieldset>

        <fieldset class="cargo">
          <legend>{{localize "FTLNOMAD.Label.cargo"}}</legend>
          <div class="flexrow">
            {{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="flexrow">
            {{formField
              systemFields.cargo
              value=system.cargo
              localize=true
              disabled=isPlayMode
            }}
          </div>
        </fieldset>

      </div>
    </div>
  </fieldset>

</section>