<fieldset class="one-column">
    <legend>{{localize 'DAGGERHEART.GENERAL.Cost.single'}}</legend>
    <ul>
        {{#if uses}}
            <li class="scalable-input">
                <div class="form-group">
                    <div class="form-fields nest-inputs">
                        <input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
                        <label for="uses.enabled">Uses</label>
                    </div>
                </div>
                <label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label>
            </li>
        {{/if}}
        {{#each costs as | cost index |}}
        <li class="scalable-input">
            <div class="form-group">
                <div class="form-fields nest-inputs">
                    <input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}>
                    <label>{{label}}</label>
                </div>
            </div>
            {{#if (and scalable (gt maxStep 1))}}
                <input type="range" value="{{scale}}" min="1" max="{{maxStep}}" step="1" name="costs.{{index}}.scale">
            {{/if}}
            <label class="modifier-label">{{total}}/{{max}}</label>
        </li>
        {{/each}}
    </ul>
</fieldset>