<section class="item-sheet-common">
  <div class="header">
    <img
      class="item-img"
      src="{{item.img}}"
      data-edit="img"
      data-action="editImage"
      data-tooltip="{{item.name}}"
    />
    {{formInput fields.name value=source.name}}
  </div>
  <div class="flexrow">
    <div class="align-top">
      {{formField
        systemFields.armorType
        value=system.armorType
        name="system.armorType"
        localize=true
      }}
      <div class="form-group">
        <label>{{localize "OATHHAMMER.Armor.FIELDS.armorValue.label"}}</label>
        <div class="form-fields">
          <select name="system.armorValue">
            {{selectOptions armorValueChoices selected=system.armorValue}}
          </select>
        </div>
      </div>
      <div class="form-group">
        <label>{{localize "OATHHAMMER.Armor.FIELDS.penalty.label"}}</label>
        <div class="form-fields">
          <select name="system.penalty">
            {{selectOptions penaltyChoices selected=system.penalty}}
          </select>
        </div>
      </div>
      {{formField systemFields.slots value=system.slots name="system.slots"}}
      {{formField
        systemFields.traits
        value=system.traits
        name="system.traits"
        localize=true
      }}
    </div>
    <div class="align-top">
      {{formField
        systemFields.rarity
        value=system.rarity
        name="system.rarity"
        localize=true
      }}
      <a data-action="rollRarity" class="rarity-roll-btn" data-tooltip="{{localize 'OATHHAMMER.Roll.RarityCheck'}}"><i class="fa-solid fa-dice"></i> {{localize "OATHHAMMER.Roll.RarityCheck"}}</a>
      {{formField
        systemFields.isMagic
        value=system.isMagic
        name="system.isMagic"
      }}
      {{formField
        systemFields.equipped
        value=system.equipped
        name="system.equipped"
      }}
      {{formField systemFields.cost value=system.cost name="system.cost"}}
      {{formField
        systemFields.currency
        value=system.currency
        name="system.currency"
        localize=true
      }}
    </div>
  </div>
  <fieldset>
    <legend>{{localize "OATHHAMMER.Label.Description"}}</legend>
    {{formInput
      systemFields.description
      enriched=enrichedDescription
      value=system.description
      name="system.description"
      toggled=true
    }}
  </fieldset>
  {{#if system.isMagic}}
    <fieldset>
      <legend>{{localize "OATHHAMMER.Label.Enchantment"}}</legend>
      <div class="flexrow">
        {{formField
          systemFields.magicQuality
          value=system.magicQuality
          name="system.magicQuality"
          localize=true
        }}
        {{formField
          systemFields.isCursed
          value=system.isCursed
          name="system.isCursed"
        }}
        {{formField
          systemFields.classRestriction
          value=system.classRestriction
          name="system.classRestriction"
        }}
      </div>
      {{formInput
        systemFields.magicEffect
        enriched=enrichedMagicEffect
        value=system.magicEffect
        name="system.magicEffect"
        toggled=true
      }}
    </fieldset>
  {{/if}}
</section>