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

  <fieldset>
    <legend>{{localize "FTLNOMAD.Label.robot"}}</legend>
    <div class="robot-pc robot-pc-{{ifThen isPlayMode 'play' 'edit'}}">

      <div class="robot-left">
        <div class="robot-left-image">
          <img
            class="robot-img"
            src="{{actor.img}}"
            data-edit="img"
            data-action="editImage"
            data-tooltip="{{actor.name}}"
          />
        </div>
        <div>
          <fieldset class="robot-cost">
            <legend>Cost</legend>
            <div class="flexrow">
              {{formField
                systemFields.cost
                value=system.cost
                localize=true
                disabled=isPlayMode
              }}
            </div>
          </fieldset>
        </div>
      </div>

      <div class="robot-right">
        <div class="robot-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="main-stats">
          <legend>{{localize "FTLNOMAD.Label.mainStats"}}</legend>
          <div class="flexrow">
            {{formField
              systemFields.robotSize
              value=system.robotSize
              localize=true
              disabled=isPlayMode
            }}
            &nbsp;
            {{formField
              systemFields.protection
              value=system.protection
              localize=true
              disabled=isPlayMode
            }}
          </div>
          <div class="flexrow">
            {{formField
              systemFields.speed
              value=system.speed
              localize=true
              disabled=isPlayMode
            }}
            &nbsp;
            {{formField
              systemFields.durability
              value=system.durability
              localize=true
              disabled=isPlayMode
            }}
          </div>
          <div class="flexrow">
          {{#if isEncumbered}}
            {{formField
              systemFields.enc.fields.value
              value=system.enc.value
              rootId=partId
              disabled=true
              classes="encumbered"
            }}
          {{else}}
            {{formField
              systemFields.enc.fields.value
              value=system.enc.value
              rootId=partId
              disabled=true
            }}
          {{/if}}
           &nbsp;
          {{formField
            systemFields.enc.fields.max
            value=system.enc.max
            rootId=partId
            disabled=isPlayMode
          }}
          </div>
        </fieldset>

        <fieldset class="robot-brain">
          <legend>Brain</legend>
          <div class="flexrow">
            <textarea
              cols="64"
              rows="2"
              name="system.brain"
              data-tooltip="{{localize 'FTLNOMAD.Tooltip.brain'}}"
              {{#if isPlayMode}}disabled{{/if}}>{{system.brain}}</textarea>
          </div>
        </fieldset>

      </div>

      <fieldset
        class="robot-skills robot-skills-{{ifThen isPlayMode 'play' 'edit'}}"
      >
        <legend>{{localize "FTLNOMAD.Label.skills"}}</legend>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_combat.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="combat"
          >{{localize "FTLNOMAD.Label.combat"}}</label>
          {{formInput
            systemFields.skills.fields.combat.fields.value
            value=system.skills.combat.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_knowledge.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="knowledge"
          >{{localize "FTLNOMAD.Label.knowledge"}}</label>
          {{formInput
            systemFields.skills.fields.knowledge.fields.value
            value=system.skills.knowledge.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_social.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="social"
          >{{localize "FTLNOMAD.Label.social"}}</label>
          {{formInput
            systemFields.skills.fields.social.fields.value
            value=system.skills.social.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_physical.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="physical"
          >{{localize "FTLNOMAD.Label.physical"}}</label>
          {{formInput
            systemFields.skills.fields.physical.fields.value
            value=system.skills.physical.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_stealth.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="stealth"
          >{{localize "FTLNOMAD.Label.stealth"}}</label>
          {{formInput
            systemFields.skills.fields.stealth.fields.value
            value=system.skills.stealth.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_vehicles.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="vehicles"
          >{{localize "FTLNOMAD.Label.vehicles"}}</label>
          {{formInput
            systemFields.skills.fields.vehicles.fields.value
            value=system.skills.vehicles.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
        <div class="robot-skill">
          <img
            src="systems/fvtt-ftl-nomad/assets/icons/icon_technology.svg"
            class="icon-skill"
          />
          <label
            class="rollable"
            data-roll-type="skill"
            data-skill-id="technology"
          >{{localize "FTLNOMAD.Label.technology"}}</label>
          {{formInput
            systemFields.skills.fields.technology.fields.value
            value=system.skills.technology.value
            rootId=partId
            disabled=isPlayMode
            type="number"
          }}
        </div>
      </fieldset>

    </div>
  </fieldset>

</section>