{{#let (and @groupHasFocus (eq @currentIndex @selectedIndex)) as |active|}}
  <div class='border border-gray-400 {{if active 'relative border-orange-400'}}' ...attributes>
    {{#if active}}
      <button
        {{on 'click' (fn @orderItemUp @currentIndex)}}
        {{on 'blur' @handleBlur}}
        data-action-up
        role="button"
        class="text-gray-800 outline-none absolute left-0 top-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm"
        data-test-id='sort-up'>
        <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>
      </button>
      <button
        {{on 'click' (fn @orderItemDown @currentIndex)}}
        {{on 'blur' @handleBlur}}
        data-action-down
        role="button"
        class="transform rotate-180 text-gray-800 outline-none absolute left-0 bottom-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm"
        data-test-id='sort-down'>
        <svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>
      </button>
    {{/if}}
    {{yield}}
  </div>
{{/let}}
