<section class="creature-main">

  <div class="actor-header">
    <img class="actor-img" src="{{actor.img}}" data-edit="img" data-action="editImage" data-tooltip="{{actor.name}}" />
    <div class="actor-identity">
      {{formInput fields.name value=source.name classes="actor-name"}}
      <div class="actor-details">
        <div class="detail-item">
          <label>{{localize "AWEMMY.Character.Level"}}</label>
          {{formInput systemFields.level value=system.level}}
        </div>
        <div class="detail-item">
          <label>{{localize "AWEMMY.Character.Stride"}}</label>
          {{formInput systemFields.stride value=system.stride}}
        </div>
        <div class="detail-item">
          <label>{{localize "AWEMMY.Character.HP"}}</label>
          {{formInput systemFields.hp.fields.value value=system.hp.value}}
          <span>/</span>
          {{formInput systemFields.hp.fields.max value=system.hp.max}}
        </div>
      </div>
    </div>
    <div class="sheet-controls">
      <button type="button" data-action="toggleSheet">
        {{#if isPlayMode}}<i class="fa-solid fa-lock"></i>{{else}}<i class="fa-solid fa-unlock"></i>{{/if}}
      </button>
    </div>
  </div>

  {{!-- Attributes --}}
  <fieldset>
    <legend>Attributes</legend>
    <table class="attributes-table">
      <thead>
        <tr>
          <th>Attribute</th>
          <th>{{localize "AWEMMY.Character.Mod"}}</th>
          <th>{{localize "AWEMMY.Character.DC"}}</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="attr-label">{{localize "AWEMMY.Attribute.Agility"}}</td>
          <td>{{formInput systemFields.attributes.fields.agility.fields.mod value=system.attributes.agility.mod}}</td>
          <td>{{formInput systemFields.attributes.fields.agility.fields.dc value=system.attributes.agility.dc}}</td>
        </tr>
        <tr>
          <td class="attr-label">{{localize "AWEMMY.Attribute.Fitness"}}</td>
          <td>{{formInput systemFields.attributes.fields.fitness.fields.mod value=system.attributes.fitness.mod}}</td>
          <td>{{formInput systemFields.attributes.fields.fitness.fields.dc value=system.attributes.fitness.dc}}</td>
        </tr>
        <tr>
          <td class="attr-label">{{localize "AWEMMY.Attribute.Awareness"}}</td>
          <td>{{formInput systemFields.attributes.fields.awareness.fields.mod value=system.attributes.awareness.mod}}</td>
          <td>{{formInput systemFields.attributes.fields.awareness.fields.dc value=system.attributes.awareness.dc}}</td>
        </tr>
        <tr>
          <td class="attr-label">{{localize "AWEMMY.Attribute.Influence"}}</td>
          <td>{{formInput systemFields.attributes.fields.influence.fields.mod value=system.attributes.influence.mod}}</td>
          <td>{{formInput systemFields.attributes.fields.influence.fields.dc value=system.attributes.influence.dc}}</td>
        </tr>
      </tbody>
    </table>
  </fieldset>

  {{!-- Description --}}
  <fieldset>
    <legend>Description</legend>
    {{formInput
      systemFields.description
      enriched=enrichedDescription
      value=system.description
      name="system.description"
      toggled=true
    }}
  </fieldset>

  {{!-- Eureka Rubric --}}
  <fieldset>
    <legend>{{localize "AWEMMY.Creature.EurekaRubric"}}</legend>
    <div class="eureka-rubric">
      <div class="eureka-row">
        <label>{{localize "AWEMMY.Creature.Claims"}}</label>
        {{formInput systemFields.eurekaClaims value=system.eurekaClaims}}
      </div>
      <div class="eureka-row">
        <label>{{localize "AWEMMY.Creature.Evidence"}}</label>
        {{formInput systemFields.eurekaEvidence value=system.eurekaEvidence}}
      </div>
      <div class="eureka-row">
        <label>Threshold 1</label>
        {{formInput systemFields.eurekaThreshold1 value=system.eurekaThreshold1}}
      </div>
      <div class="eureka-row">
        <label>Threshold 2</label>
        {{formInput systemFields.eurekaThreshold2 value=system.eurekaThreshold2}}
      </div>
      <div class="eureka-row">
        <label>{{localize "AWEMMY.Creature.Hints"}}</label>
        {{formInput systemFields.eurekaHints value=system.eurekaHints}}
      </div>
    </div>
  </fieldset>

</section>
