<button
  #multiselectButton
  [msfaDropdownTriggerFor]="dropdown"
  [attr.id]="buttonElementId"
  [attr.aria-controls]="panelId"
  [ngClass]="{'multiselect__toggle-btn--invalid': isInvalid && showValidation}"
  type="button"
  class="multiselect__toggle-btn"
>
  <span class="multiselect__toggle-btn__text">{{multiselectTitle}}</span>
  <digi-icon-arrow-down
    aria-hidden="true"
    class="multiselect__toggle-btn__arrow-down"
  ></digi-icon-arrow-down>
  <span class="msfa__a11y-sr-only">
        Filtrera på {{multiselectTitle}}.
  </span>
</button>

<msfa-dropdown #dropdown [attr.id]="panelId">
  <msfa-multiselect-panel
    [availableOptions]="availableOptions"
    [selectedOptions]="selectedOptions"
    [dropdownRef]="dropdown"
    [multiselectTitle]="multiselectTitle"
    [confirmButtonText]="confirmButtonText"
    (selectedOptionsChange)="emitSelectedOptions($event)"
  ></msfa-multiselect-panel>
</msfa-dropdown>

