{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

{{#if @disabled}}
  <div class="box-radio-spacing">
    <ToolTip @verticalPosition="above" @horizontalPosition="center" as |T|>
      <T.Trigger @tabindex="-1">
        <label
          for={{@type}}
          class="box-radio is-disabled is-marginless"
          data-test-mount-type-radio
          data-test-mount-type={{@type}}
        >
          <Icon @name={{@glyph}} @size="24" class="has-text-grey-light" />
          {{@displayName}}
          <RadioButton
            id={{@type}}
            name={{@groupName}}
            class="radio"
            @disabled={{@disabled}}
            @value={{@type}}
            @groupValue={{@groupValue}}
            @onChange={{@onRadioChange}}
          />
        </label>
      </T.Trigger>
      <T.Content @defaultClass="tool-tip">
        <div class="box">
          {{@tooltipMessage}}
        </div>
      </T.Content>
    </ToolTip>
  </div>
{{else}}
  <div class="box-radio-spacing">
    <label
      for={{@type}}
      class="box-radio is-marginless {{if (eq @groupValue @type) ' is-selected'}}"
      data-test-mount-type-radio
      data-test-mount-type={{@type}}
    >
      <Icon @name={{@glyph}} @size="24" class="has-text-grey-light" />
      {{@displayName}}
      <RadioButton
        id={{@type}}
        name={{@groupName}}
        class="radio"
        @disabled={{@disabled}}
        @value={{@type}}
        @groupValue={{@mountType}}
        @onChange={{@onRadioChange}}
      />
    </label>
  </div>
{{/if}}