<select class="uni-select" onchange={{action "changeSelected"}}>
  {{#if (and placeholder (not selected))}}
    <option value="" disabled selected="selected">
      {{placeholder}}
    </option>
  {{/if}}
  {{#if groups}}
    {{#each groups as |group|}}
      <optgroup label={{group.value}} key={{group.key}}>
        {{#each group.options as |opt|}}
          <option disabled={{opt.disabled}} selected={{if (eq opt.key selected) "selected"}} value={{opt.key}} class="uni-select__option">
            {{#if hasBlock}}
              {{yield opt}}
            {{else}}
              {{opt.value}}
            {{/if}}
          </option>
        {{/each}}
      </optgroup>
    {{/each}}
  {{else}}
    {{#each options as |opt|}}
      <option disabled={{opt.disabled}} selected={{if (eq opt.key selected) "selected"}} value={{opt.key}} class="uni-select__option">
        {{#if hasBlock}}
          {{yield opt}}
        {{else}}
          {{opt.value}}
        {{/if}}
      </option>
    {{/each}}
  {{/if}}
</select>

{{#if useAlias}}
  <div class="uni-select">
    {{#if (and placeholder (not aliasValue))}}
      {{placeholder}}
    {{else}}
      {{aliasValue}}
    {{/if}}
  </div>
{{/if}}
