<!--
  Copyright IBM Corp. 2016, 2018

  This source code is licensed under the Apache-2.0 license found in the
  LICENSE file in the root directory of this source tree.
-->

<fieldset class="{{@root.prefix}}--fieldset">
  <legend class="{{@root.prefix}}--label">Radio button label</legend>
  <div class="{{@root.prefix}}--form-item">
    <div class="{{@root.prefix}}--radio-button-group {{#if vertical}} {{@root.prefix}}--radio-button-group--vertical {{/if}}">
      {{#each items}}
        <div class="{{@root.prefix}}--radio-button-wrapper{{#if ../direction}} {{@root.prefix}}--radio-button-wrapper--label-{{../direction}}{{/if}}">
          <input id="{{id}}" class="{{@root.prefix}}--radio-button" type="radio" value="{{value}}" name="{{../group}}" tabindex="0"{{#is value ../selectedValue}} checked{{/is}}{{#if disabled}} disabled{{/if}}>
          <label for="{{id}}" class="{{@root.prefix}}--radio-button__label">
            <span class="{{@root.prefix}}--radio-button__appearance"></span>
            <span class="{{@root.prefix}}--radio-button__label-text">{{label}}</span>
          </label>
        </div>
      {{/each}}
    </div>
  </div>
</fieldset>