{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: MPL-2.0
~}}

{{keyboard-commands this.keyCommands}}

{{#if this.system.shouldShowRegions}}
  <span data-test-region-switcher-parent>
    <PowerSelect
      data-test-region-switcher
      @tagName="div"
      @triggerClass={{this.decoration}}
      @options={{this.sortedRegions}}
      @selected={{this.system.activeRegion}}
      @searchEnabled={{false}}
      @onChange={{action this.gotoRegion}} as |region|>
      <span class="ember-power-select-prefix">Region: </span>{{region}}
    </PowerSelect>
  </span>
{{/if}}
