<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.proficiencyGroup value=system.proficiencyGroup name="system.proficiencyGroup" localize=true}}
      <div class="form-group">
        <label>{{localize "OATHHAMMER.Weapon.FIELDS.damageMod.label"}}</label>
        <div class="form-fields">
          <select name="system.damageMod">
            {{selectOptions damageModChoices selected=system.damageMod}}
          </select>
        </div>
      </div>
      <div class="form-group">
        <label>{{localize "OATHHAMMER.Weapon.FIELDS.ap.label"}}</label>
        <div class="form-fields">
          <select name="system.ap">
            {{selectOptions apChoices selected=system.ap}}
          </select>
        </div>
      </div>
      {{formField systemFields.reach value=system.reach name="system.reach"}}
      {{formField systemFields.shortRange value=system.shortRange name="system.shortRange"}}
      {{formField systemFields.longRange value=system.longRange name="system.longRange"}}
    </div>
    <div class="align-top">
      {{formField systemFields.traits value=system.traits name="system.traits" localize=true}}
      {{formField systemFields.specialProperties value=system.specialProperties name="system.specialProperties" localize=true}}
      {{formField systemFields.slots value=system.slots name="system.slots"}}
      {{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>
