{{#if (or target.canOverride @root.activity.isRider)}}
{{ formField fields.override value=source.override input=inputs.createCheckboxInput rootId=partId }}
{{/if}}

<fieldset {{ disabled disabled }}>
    <legend>{{ localize "DND5E.TargetPl" }}</legend>

    {{!-- Target Type --}}
    <div class="form-group split-group">
        <label>{{ localize "DND5E.Type" }}</label>
        <div class="form-fields">

            {{!-- Amount --}}
            {{#if target.affects.scalar}}
            {{ formField fields.affects.fields.count value=data.affects.count label="DND5E.Amount" localize=true
                         hint=false classes="label-top" placeholder=affectsPlaceholder rootId=partId }}
            {{/if}}

            {{!-- Type --}}
            {{ formField fields.affects.fields.type value=data.affects.type label="DND5E.Type" localize=true hint=false
                         choices=CONFIG.individualTargetTypes labelAttr="label" classes="label-top" rootId=partId }}
        </div>

        {{!-- Special --}}
        {{#if data.affects.type}}
        {{ formInput fields.affects.fields.special value=data.affects.special
                     placeholder=(localize "DND5E.TARGET.FIELDS.target.affects.special.label")
                     input=inputs.createTextInput classes="full-width" rootId=partId }}
        {{/if}}
    </div>

    {{!-- Choose Targets --}}
    {{#if data.template.type}}
    {{ formField fields.affects.fields.choice value=data.affects.choice localize=true input=inputs.createCheckboxInput
                 label="DND5E.TARGET.FIELDS.target.affects.choice.label"
                 hint="DND5E.TARGET.FIELDS.target.affects.choice.hint" rootId=partId }}
    {{/if}}
</fieldset>

<fieldset {{ disabled disabled }}>
    <legend>{{ localize "DND5E.TargetTypeArea" }}</legend>

    {{!-- Template Type --}}
    {{ formField fields.template.fields.type value=data.template.type label="DND5E.Shape" localize=true hint=false
                 options=CONFIG.areaTargetOptions rootId=partId }}

    {{!-- Dimensions --}}
    {{#if data.template.type}}
    <div class="form-group split-group">
        <label>{{ localize "DND5E.Dimensions" }}</label>
        <div class="form-fields">

            {{!-- Size --}}
            {{ formField fields.template.fields.size value=data.template.size label=dimensions.size localize=true
                         hint=false classes="label-top" rootId=partId }}

            {{!-- Width --}}
            {{#if dimensions.width}}
            {{ formField fields.template.fields.width value=data.template.width label=dimensions.width localize=true
                         hint=false classes="label-top" rootId=partId }}
            {{/if}}

            {{!-- Height --}}
            {{#if dimensions.height}}
            {{ formField fields.template.fields.height value=data.template.height label=dimensions.height localize=true
                         hint=false classes="label-top" rootId=partId }}
            {{/if}}

            {{!-- Units --}}
            {{ formField fields.template.fields.units value=data.template.units label="DND5E.Unit"
                         localize=true hint=false choices=CONFIG.movementUnits classes="label-top" rootId=partId }}
        </div>
    </div>

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

            {{!-- Amount --}}
            {{ formField fields.template.fields.count value=data.template.count label="DND5E.Amount" placeholder="1"
                         localize=true hint=false classes="label-top" rootId=partId }}

            {{!-- Contiguous --}}
            {{#if (and data.template.type (gt data.template.count 1))}}
            {{ formField fields.template.fields.contiguous value=data.template.contiguous label="DND5E.Contiguous"
                         localize=true hint=false input=inputs.createCheckboxInput classes="checkbox" rootId=partId }}
            {{/if}}
        </div>
    </div>
    {{/if}}

    {{!-- TODO: Template prompt? --}}
</fieldset>
