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

    {{!-- Feature Type --}}
    {{ formField fields.type.fields.value value=source.type.value choices=config.featureTypes labelAttr="label" blank=""
                 localize=true }}

    {{!-- Feature Sub-Type --}}
    {{#if itemSubtypes}}
    {{ formField fields.type.fields.subtype value=source.type.subtype choices=itemSubtypes blank="" localize=true
                 label=(localize "DND5E.ItemFeatureSubtype" category=(lookup (lookup config.featureTypes source.type.value) "label")) }}
    {{/if}}

    {{#if (eq system.type.value "vehicle")}}
    {{ formField fields.cover value=source.cover options=coverOptions }}
    {{/if}}

    {{!-- Feature Prerequisites --}}
    {{ formField fields.prerequisites.fields.level value=source.prerequisites.level }}
    {{ formField fields.prerequisites.fields.repeatable value=source.prerequisites.repeatable
                 input=inputs.createCheckboxInput }}

    {{!-- Feature Properties --}}
    {{ formField fields.properties options=properties.options label="DND5E.ItemFeatureProperties" localize=true
                 input=inputs.createMultiCheckboxInput stacked=true classes="checkbox-grid checkbox-grid-3" }}
</fieldset>

{{#if system.isEnchantmentSource}}
<fieldset>
    <legend>{{ localize "DND5E.ENCHANTMENT.Label" }}</legend>

    {{!-- Max Enchantments --}}
    {{ formField fields.enchant.fields.max value=source.enchant.max localize=true
                 label="DND5E.ENCHANTMENT.FIELDS.enchantment.items.max.label"
                 hint="DND5E.ENCHANTMENT.FIELDS.enchantment.items.max.hint" }}

    {{!-- Enchantment Replacement --}}
    {{ formField fields.enchant.fields.period value=source.enchant.period localize=true
                 choices=config.enchantmentPeriods labelAttr="label" blank="DND5E.ENCHANTMENT.Period.Never"
                 label="DND5E.ENCHANTMENT.FIELDS.enchantment.items.period.label"
                 hint="DND5E.ENCHANTMENT.FIELDS.enchantment.items.period.hint" }}
</fieldset>
{{/if}}
