{{#if mustFallback}}
  <select onchange={{action "handleChange"}}>
    <option value="" selected={{not selected}} disabled>{{placeholder}}</option>
    {{#if labelPath}}

      {{#each options as |opt index|}}
        {{#if opt.groupName}}
          <optgroup label={{opt.groupName}}>
            {{#each opt.options as |suboption subindex|}}
              <option value="{{index}}.{{subindex}}" selected={{if (eq suboption selected) true}}>{{get suboption labelPath}}</option>
            {{/each}}
          </optgroup>
        {{else}}
          <option value="{{index}}" selected={{if (eq opt selected) true}}>{{get opt labelPath}}</option>
        {{/if}}
      {{/each}}

    {{else}}

      {{#each options as |opt index|}}
        {{#if opt.groupName}}
          <optgroup label={{opt.groupName}}>
            {{#each opt.options as |suboption subindex|}}
              <option value="{{index}}.{{subindex}}" selected={{if (eq suboption selected) true}}>{{suboption}}</option>
            {{/each}}
          </optgroup>
        {{else}}
          <option value="{{index}}" selected={{if (eq opt selected) true}}>{{opt}}</option>
        {{/if}}
      {{/each}}

    {{/if}}
  </select>
{{else if (hasBlock "inverse")}}
  {{#power-select
      options=options
      selected=selected
      onchange=onchange
      onkeydown=onkeydown
      onfocus=onfocus
      onopen=onopen
      onclose=onclose
      disabled=disabled
      placeholder=placeholder
      searchEnabled=searchEnabled
      searchPlaceholder=searchPlaceholder
      loadingMessage=loadingMessage
      noMatchesMessage=noMatchesMessage
      searchMessage=searchMessage
      triggerComponent=triggerComponent
      selectedItemComponent=selectedItemComponent
      beforeOptionsComponent=beforeOptionsComponent
      optionsComponent=optionsComponent
      afterOptionsComponent=afterOptionsComponent
      matcher=matcher
      matchTriggerWidth=matchTriggerWidth
      searchField=searchField
      renderInPlace=renderInPlace
      destination=destination
      search=search
      allowClear=allowClear
      verticalPosition=verticalPosition
      horizontalPosition=horizontalPosition
      closeOnSelect=closeOnSelect
      opened=opened
      tabindex=tabindex
      dir=dir
      class=class
      triggerClass=triggerClass
      dropdownClass=dropdownClass
      extra=extra
      triggerId=triggerId
      as |option term|}}
      {{yield option term}}
    {{else}}
      {{yield to="inverse"}}
  {{/power-select}}
{{else}}
  {{#power-select
      options=options
      selected=selected
      onchange=onchange
      onkeydown=onkeydown
      onfocus=onfocus
      onopen=onopen
      onclose=onclose
      disabled=disabled
      placeholder=placeholder
      searchEnabled=searchEnabled
      searchPlaceholder=searchPlaceholder
      loadingMessage=loadingMessage
      noMatchesMessage=noMatchesMessage
      searchMessage=searchMessage
      triggerComponent=triggerComponent
      selectedItemComponent=selectedItemComponent
      beforeOptionsComponent=beforeOptionsComponent
      optionsComponent=optionsComponent
      afterOptionsComponent=afterOptionsComponent
      matcher=matcher
      matchTriggerWidth=matchTriggerWidth
      searchField=searchField
      renderInPlace=renderInPlace
      destination=destination
      search=search
      allowClear=allowClear
      verticalPosition=verticalPosition
      horizontalPosition=horizontalPosition
      closeOnSelect=closeOnSelect
      opened=opened
      tabindex=tabindex
      dir=dir
      class=class
      triggerClass=triggerClass
      dropdownClass=dropdownClass
      extra=extra
      triggerId=triggerId
      as |option term|}}
      {{yield option term}}
  {{/power-select}}
{{/if}}
