<form class="flexcol">
  <div style="display: flex; align-items: center; margin: 0 auto">
    <img src="{{origin.texture.src}}" style="height: 40px; object-fit: contain; margin-right: 6px;" />
    <span>{{localize "pf2e-fc.template.emanation-area" origin=origin.name area=spell.system.area.value}}</span>
  </div>

  <div style="text-align: center;">
    <strong style="display: block;">{{localize "pf2e-fc.template.emanation-request.effect"}}</strong>
    <a class="content-link">
      <i class="fa-solid fa-person-rays"></i>
      {{effect.name}}
    </a>
  </div>

  {{#if durationOverride}}
    <div style="text-align: center;">
      <strong style="display: block;">{{localize "pf2e-fc.template.emanation-request.duration"}}</strong>
      <input type="number" value="{{effect.system.duration.value}}" min="1" required style="width: 5ch;" />
      <span>{{localize "pf2e-fc.template.emanation-request.rounds"}}</span>
    </div>
  {{/if}}

  <div style="text-align: center;">
    <strong>{{localize "pf2e-fc.template.emanation-request.targets"}}</strong>
    <div style="text-align: left; max-height: 400px; overflow: scroll">
      {{#each targets}}
        <div style="display: flex; align-items: center; margin-bottom: 2px;">
          <img src="{{this.texture.src}}" style="height: 40px; object-fit: contain; margin-right: 6px;" />
          <span style="flex-grow: 1;">{{this.name}}</span>
          <input type="checkbox" data-id="{{this.id}}" checked />
        </div>
      {{/each}}
    </div>
  </div>

  <button type="submit" style="margin: 3px 0;">{{localize "pf2e-fc.template.emanation-request.apply"}}</button>
  <button type="button" data-action="cancel">{{localize "pf2e-fc.template.emanation-request.cancel"}}</button>
</form>
