<section class="flexcol">
    <div class="note info">
        {{ localize (ifThen isGroup "DND5E.REST.Short.Hint.Group" "DND5E.REST.Short.Hint.Normal") }}
    </div>

    {{#if fields.length}}
    <fieldset>
        <legend>{{ localize "DND5E.REST.Configuration" }}</legend>
        {{#each fields}}
        {{ formField field name=name value=value input=input options=options rootId=../partId }}
        {{/each}}
    </fieldset>
    {{/if}}

    {{#if hitDice}}
    {{#if hitDice.canRoll}}
    <fieldset>
        <legend>{{ localize "DND5E.HitDice" }}</legend>
        <div class="form-fields">
            <select name="denom">
                {{ selectOptions hitDice.options selected=hitDice.denomination }}
            </select>
            <button type="button" class="dice-button" data-action="rollHitDie" data-tooltip="DND5E.Roll"
                    aria-label="{{ localize 'DND5E.Roll' }}">
                <i class="fa-solid fa-dice-d20" inert></i>
            </button>
        </div>
        {{ formField autoRoll name="autoHD" value=config.autoHD input=inputs.createCheckboxInput rootId=partId }}
    </fieldset>
    {{else}}
    <div class="note warn">
        {{ localize "DND5E.REST.HitDice.None" }}
    </div>
    {{/if}}
    {{/if}}
</section>
