{{#accordion-list-item
     title=(t 'formRunAsUserPodSecurityPolicy.title')
     detail=(t 'formRunAsUserPodSecurityPolicy.detail')
     status=status
     statusClass=statusClass
     expandAll=expandAll
     expand=(action expandFn)
}}
  <div class="row">
    {{#if (and readOnly (eq model.runAsUser.rule "RunAsAny"))}}
      {{t 'formRunAsUserPodSecurityPolicy.rule.runAsAny'}}
    {{else if (and readOnly (eq model.runAsUser.rule "MustRunAsNonRoot"))}}
      {{t 'formRunAsUserPodSecurityPolicy.rule.mustRunAsNonRoot'}}
    {{else if (and readOnly (eq model.runAsUser.rule "MustRunAs"))}}
      {{t 'formRunAsUserPodSecurityPolicy.rule.mustRunAs'}}
    {{else}}
      <div class="radio input">
        <label>{{radio-button selection=model.runAsUser.rule value="MustRunAs"}} {{t 'formRunAsUserPodSecurityPolicy.rule.mustRunAs'}}</label>
      </div>
      <div class="radio input">
        <label>{{radio-button selection=model.runAsUser.rule value="MustRunAsNonRoot"}} {{t 'formRunAsUserPodSecurityPolicy.rule.mustRunAsNonRoot'}}</label>
      </div>
      <div class="radio input">
        <label>{{radio-button selection=model.runAsUser.rule value="RunAsAny"}} {{t 'formRunAsUserPodSecurityPolicy.rule.runAsAny'}}</label>
      </div>
    {{/if}}
  </div>

  {{#if (eq model.runAsUser.rule "MustRunAs")}}
    <div class="row mt-20">
      {{#if (eq model.runAsUser.rule "MustRunAs")}}
        <table class="table fixed no-lines no-top-padding mt-10">
          <tr class="hidden-sm hidden-xs">
            <th>{{t 'formRunAsUserPodSecurityPolicy.range.min.label'}}{{#unless readOnly}}{{field-required}}{{/unless}}</th>
            <th width="30">&nbsp;</th>
            <th>{{t 'formRunAsUserPodSecurityPolicy.range.max.label'}}{{#unless readOnly}}{{field-required}}{{/unless}}</th>
            <th width="40">&nbsp;</th>
          </tr>
          {{#each model.runAsUser.ranges as |range|}}
            <tr class="sm-noborder">
              <td data-title="{{t 'formRunAsUserPodSecurityPolicy.range.min.label'}}">
                {{input class="form-control input-sm" type="number" disabled=readOnly value=range.min placeholder=(t 'formRunAsUserPodSecurityPolicy.range.min.placeholder')}}
              </td>
              <td class="text-center">
                <p><i class="icon icon-chevron-right"></i></p>
              </td>
              <td data-title="{{t 'formRunAsUserPodSecurityPolicy.range.max.label'}}">
                {{input class="form-control input-sm" type="number" disabled=readOnly value=range.max placeholder=(t 'formRunAsUserPodSecurityPolicy.range.max.placeholder')}}
              </td>
              <td class="text-right">
                {{#unless readOnly}}
                  <button class="btn bg-primary btn-sm" {{action "remove" range}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
                {{/unless}}
              </td>
            </tr>
          {{/each}}
        </table>
      {{/if}}

      {{#unless readOnly}}
        <div>
          <button class="btn bg-link icon-btn" {{action "add"}}>
            <span class="darken"><i class="icon icon-plus text-small"/></span>
            <span>{{t 'formRunAsUserPodSecurityPolicy.range.addLabel'}}</span>
          </button>
        </div>
      {{/unless}}
    </div>
  {{/if}}

{{/accordion-list-item}}
