<form class="npc-create-form location-create-form">
    <section class="npc-create-generator">
        <label>
            <span>Generator</span>
            <select name="generatorId">
                {{#each generators}}<option value="{{id}}" {{#if selected}}selected{{/if}}>{{label}}</option>{{/each}}
            </select>
        </label>
        <div class="npc-create-generator-grid">
            {{#if hasTypes}}
            <label>
                <span>Type</span>
                <select name="typeId">
                    {{#each types}}<option value="{{id}}" {{#if selected}}selected{{/if}}>{{label}}</option>{{/each}}
                </select>
            </label>
            {{/if}}
            <label>
                <span>Parent Place</span>
                <select name="parentKey">
                    <option value="" {{#if isRootSelected}}selected{{/if}}>None (root location)</option>
                    {{#each parentOptions}}<option value="{{id}}" {{#if selected}}selected{{/if}}>{{label}}</option>{{/each}}
                </select>
            </label>
        </div>
    </section>


    {{#if hasCandidate}}
    <section class="npc-candidate-panel location-candidate-panel">
        {{> "modules/augur-nexus/templates/campaign-entities/location-profile-panel.hbs" profile=candidate.profile}}
    </section>

    <footer class="npc-create-candidate-actions">
        <button type="button" data-action="cancel">Cancel</button>
        <button type="button" data-action="rerollCandidate">
            <i class="fas fa-dice"></i>
            <span>Reroll</span>
        </button>
        <button type="button" data-action="editCandidate">
            <i class="fas fa-pen"></i>
            <span>Edit</span>
        </button>
        <button type="button" data-action="acceptCandidate">
            <i class="fas fa-check"></i>
            <span>Accept</span>
        </button>
    </footer>
    {{else}}
    <footer>
        <button type="button" data-action="cancel">Cancel</button>
        <button type="submit">
            <i class="fas fa-dice"></i>
            <span>Generate Candidate</span>
        </button>
    </footer>
    {{/if}}
</form>
