{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}

<div class="has-text-right">
  <Hds::Dropdown @isInline={{true}} @listPosition="bottom-right" as |dd|>
    <dd.ToggleIcon
      @icon="more-horizontal"
      @text="Identity member options"
      @hasChevron={{false}}
      data-test-popup-menu-trigger
    />
    <dd.Interactive @color="critical" {{on "click" (fn (mut this.showConfirmModal) true)}}>Remove</dd.Interactive>
  </Hds::Dropdown>
</div>

{{#if this.showConfirmModal}}
  <ConfirmModal
    @color="critical"
    @onClose={{fn (mut this.showConfirmModal) false}}
    @onConfirm={{this.removeGroup}}
    @confirmTitle="Remove this group?"
    @confirmMessage="This may affect permissions for this group."
  />
{{/if}}