<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
    <fieldset class="one-column optional">
        <legend>
            {{localize "DAGGERHEART.ACTIVEEFFECT.Config.stacking.title"}} 
            <input type="checkbox" class="stacking-change-checkbox" {{checked source.system.stacking}} />
        </legend>

        {{#if source.system.stacking}}
            <div class="two-columns even full-width">
                {{formGroup systemFields.stacking.fields.value value=source.system.stacking.value localize=true }}
                {{formGroup systemFields.stacking.fields.max value=source.system.stacking.max localize=true }}
            </div>
        {{/if}}
    </fieldset>

    <fieldset class="one-column">
        <legend>{{localize "DAGGERHEART.ACTIVEEFFECT.Config.rangeDependence.title"}}</legend>

        {{formGroup systemFields.rangeDependence.fields.enabled value=source.system.rangeDependence.enabled localize=true }}
        {{formGroup systemFields.rangeDependence.fields.type value=source.system.rangeDependence.type localize=true }}
        {{formGroup systemFields.rangeDependence.fields.target value=source.system.rangeDependence.target localize=true }}
        {{formGroup systemFields.rangeDependence.fields.range value=source.system.rangeDependence.range localize=true }}
    </fieldset>
    <fieldset class="one-column">
        <legend>{{localize "EFFECT.DURATION.Label"}}</legend>

        {{formGroup systemFields.duration.fields.type value=source.system.duration.type localize=true }}

        <div class="form-group slim duration-description {{#if (eq source.system.duration.type 'temporary')}}visible{{/if}}">
            <div class="form-fields">
                {{formInput systemFields.duration.fields.description value=source.system.duration.description localize=true }}
            </div>
        </div>

        <div class="custom-duration-section">
            {{formGroup fields.start.fields.time value=source.start.time localize=true }}
            <div class="form-group slim duration" data-duration>
                <label class="flexrow" for="{{rootId}}-duration.value">
                    <span>{{localize "EFFECT.DURATION.Label"}}</span>
                    <span class="warning" hidden><i class="fa-duotone fa-triangle-exclamation"></i></span>
                </label>
                <div class="form-fields">
                    {{formInput fields.duration.fields.value value=source.duration.value id=(concat rootId "-duration.value")
                                aria=(object label=(localize "EFFECT.FIELDS.duration.value.label"))}}
                    {{formInput fields.duration.fields.units value=source.duration.units id=(concat rootId "-duration.units")
                                options=durationUnits aria=(object label=(localize "EFFECT.FIELDS.duration.units.label")) localize=true }}
                </div>
            </div>
        </div>
    </fieldset>
</section>