<section class="character-main character-main-{{ifThen isPlayMode 'play' 'edit'}}">
  {{!log "character-main" this}}
  <fieldset>
    <legend>{{localize "HELLBORN.Label.character"}}</legend>
    <div class="character-pc character-pc-{{ifThen isPlayMode 'play' 'edit'}}">
      <div class="character-left">
        <div class="character-left-image">
          <img class="character-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
            data-tooltip="{{actor.name}}" />
        </div>

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

        <fieldset class="character-definition">
          <div class="splitted">
            <div>
              <div class="flexcol">
                {{formField systemFields.pronouns value=system.pronouns rootId=partId disabled=isPlayMode}}
              </div>
              <div class="flexcol">
                {{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}}
              </div>
              <div class="flexrow">
                <div class="form-group">
                  <label>Trait</label>
                  <input class="trait" type="text" value="{{trait.name}}" disabled >
                  <div class="controls">
                    <a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{trait.id}}"
                      data-item-uuid="{{trait.uuid}}"><i class="fas fa-edit"></i></a>
                    <a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{trait.id}}"
                      data-item-uuid="{{trait.uuid}}"><i class="fas fa-trash"></i></a>
                  </div>
                </div>
              </div>
            </div>

            <div>
              <div class="flexrow">
                <div class="form-group">
                  <label>Upright</label>
                  <input class="trait" type="text" value="{{upright.name}}" disabled >
                  <div class="controls">
                    <a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{upright.id}}"
                      data-item-uuid="{{upright.uuid}}"><i class="fas fa-edit"></i></a>
                    <a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{upright.id}}"
                      data-item-uuid="{{upright.uuid}}"><i class="fas fa-trash"></i></a>
                  </div>
                </div>
              </div>
              <div class="flexrow">
                <div class="form-group">
                  <label>Reversed</label>
                  <input class="trait" type="text" value="{{downright.name}}" disabled >
                  <div class="controls">
                    <a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{downright.id}}"
                      data-item-uuid="{{downright.uuid}}"><i class="fas fa-edit"></i></a>
                    <a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{downright.id}}"
                      data-item-uuid="{{downright.uuid}}"><i class="fas fa-trash"></i></a>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </fieldset>

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

  <fieldset class="character-stats character-stats-{{ifThen isPlayMode 'play' 'edit'}}">
    <legend>{{localize "HELLBORN.Label.stats"}}</legend>
    <div class="character-stat">
      <label class="rollable" data-roll-type="stat" data-stat-id="flesh"><i class="fa-regular fa-dice"></i>{{localize
        "HELLBORN.Label.flesh"}}</label>
      {{formInput systemFields.stats.fields.flesh.fields.value value=system.stats.flesh.value rootId=partId disabled=isPlayMode type="number" }}
    </div>
    <div class="character-stat">
      <label class="rollable" data-roll-type="stat" data-stat-id="skin"><i class="fa-regular fa-dice"></i>{{localize
        "HELLBORN.Label.skin"}}</label>
      {{formInput systemFields.stats.fields.skin.fields.value value=system.stats.skin.value rootId=partId disabled=isPlayMode type="number" }}
    </div>
    <div class="character-stat">
      <label class="rollable" data-roll-type="stat" data-stat-id="heart"><i class="fa-regular fa-dice"></i>{{localize
        "HELLBORN.Label.heart"}}</label>
      {{formInput systemFields.stats.fields.heart.fields.value value=system.stats.heart.value rootId=partId disabled=isPlayMode type="number" }}
    </div>
    <div class="character-stat">
      <label class="rollable" data-roll-type="stat" data-stat-id="mind"><i class="fa-regular fa-dice"></i>{{localize
        "HELLBORN.Label.mind"}}</label>
      {{formInput systemFields.stats.fields.mind.fields.value value=system.stats.mind.value rootId=partId disabled=isPlayMode type="number" }}
    </div>
    <div class="character-stat">
      <label class="rollable" data-roll-type="stat" data-stat-id="soul"><i class="fa-regular fa-dice"></i>{{localize
        "HELLBORN.Label.soul"}}</label>
      {{formInput systemFields.stats.fields.soul.fields.value value=system.stats.soul.value rootId=partId disabled=isPlayMode type="number" }}
    </div>
  </fieldset>

</section>