{{! @glint-nocheck }}
{{#if this.isBS5ToggleButton}}
  <input
    type={{@buttonGroupType}}
    class="btn-check"
    id={{this.formId}}
    autocomplete="off"
    checked={{this.active}}
    ...attributes
    {{on "click" this.handleClick}}
    {{did-update this.resetState @reset}}
  >
  <label
    class="btn {{bs-size-class "btn" @size}} {{bs-type-class "btn" @type default="secondary" outline=@outline}}"
    for={{this.formId}}
  >
    {{#if this.icon}}
      <i class={{this.icon}}></i>
    {{/if}}
    {{this.text}}
    {{yield
      (hash
        isFulfilled=this.isFulfilled
        isPending=this.isPending
        isRejected=this.isRejected
        isSettled=this.isSettled
      )
    }}
  </label>
{{else}}
  <button
    disabled={{this.__disabled}}
    type="button"
    class="btn {{if this.active "active"}} {{if this.block "btn-block"}} {{bs-size-class "btn" @size}} {{bs-type-class "btn" @type default="secondary" outline=@outline}}"
    ...attributes
    {{on "click" this.handleClick}}
    {{did-update this.resetState @reset}}
  >
    {{#if this.icon}}
      <i class={{this.icon}}></i>
    {{/if}}
    {{this.text}}
    {{yield
      (hash
        isFulfilled=this.isFulfilled
        isPending=this.isPending
        isRejected=this.isRejected
        isSettled=this.isSettled
      )
    }}
  </button>
{{/if}}