<fieldset>
    <legend>{{ localize "DND5E.ItemConsumableDetails" }}</legend>

    {{!-- Consumable Type --}}
    {{ formField fields.type.fields.value value=source.type.value choices=CONFIG.consumableTypes labelAttr="label"
                 label="DND5E.ItemConsumableType" localize=true rootId=partId }}

    {{!-- Consumable Sub-Type --}}
    {{#if itemSubtypes}}
    {{ formField fields.type.fields.subtype value=source.type.subtype choices=itemSubtypes blank="" localize=true
                 label=(localize "DND5E.ItemConsumableSubtype" category=(lookup (lookup CONFIG.consumableTypes source.type.value) "label")) rootId=partId }}
    {{/if}}

    {{!-- Consumable Properties --}}
    {{ formField fields.properties options=properties.options localize=true input=inputs.createMultiCheckboxInput
                 stacked=true classes="checkbox-grid checkbox-grid-3"
                 label=(ifThen (eq source.type.value "ammo") "DND5E.ItemAmmoProperties" "DND5E.ItemConsumableProperties") }}

    {{!-- Magical Properties --}}
    {{#if properties.object.mgc}}
    <div class="form-group split-group">
        <label>{{ localize "DND5E.ITEM.Property.Magical" }}</label>
        <div class="form-fields">

            {{!-- Attunement --}}
            <div class="form-group label-top">
                <label>{{ localize "DND5E.Attunement" }}</label>
                <div class="form-fields">

                    {{!-- Attuned --}}
                    {{#if source.attunement}}
                    {{ formInput fields.attuned value=source.attuned input=inputs.createCheckboxInput
                                 ariaLabel=(localize "DND5E.Attuned") dataset=(dnd5e-object tooltip="DND5E.Attuned") }}
                    {{/if}}

                    {{!-- Attunement --}}
                    {{ formInput fields.attunement value=source.attunement choices=CONFIG.attunementTypes
                                 blank="DND5E.AttunementNone" localize=true }}
                </div>
            </div>

            {{!-- Magical Bonus --}}
            {{#if (and properties.object.mgc (eq source.type.value "ammo"))}}
            {{ formField fields.magicalBonus value=source.magicalBonus step=1 placeholder="0" label="DND5E.Bonus"
                         localize=true classes="label-top" rootId=partId }}
            {{/if}}
        </div>
    </div>
    {{/if}}
</fieldset>

{{#if (eq source.type.value "ammo")}}
<fieldset>
    <legend>{{ localize "DND5E.CONSUMABLE.FIELDS.damage.label" }}</legend>

    {{!-- Replace Damage --}}
    {{ formField fields.damage.fields.replace value=source.damage.replace input=inputs.createCheckboxInput
                 rootId=partId }}

    {{> "dnd5e.field-damage" fields=fields.damage.fields.base.fields source=source.damage.base
        types=damageTypes prefix="system.damage.base." }}

</fieldset>
{{/if}}
