<?xml version='1.0' standalone='yes'?>
<container
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:var="http://www.skyrix.com/od/binding"
    xmlns:const="http://www.skyrix.com/od/constant"
    xmlns:label="OGo:label">
  <div layout="row" layout-wrap="layout-wrap">
    <md-input-container class="md-input-number">
      <input type="number" min="0" label:aria-label="quantity" ng-model="editor.component.alarm.quantity"/>
    </md-input-container>
    <md-input-container>
      <md-select label:aria-label="Reminder units" ng-model="editor.component.alarm.unit">
        <var:foreach list="unitsList" item="item">
          <md-option var:value="item"><var:string value="itemText"/></md-option>
        </var:foreach>
      </md-select>
    </md-input-container>
    <md-input-container>
      <md-select label:aria-label="Reminder position" ng-model="editor.component.alarm.reference">
        <var:foreach list="referencesList" item="item">
          <md-option var:value="item"><var:string value="itemText"/></md-option>
        </var:foreach>
      </md-select>
    </md-input-container>
    <md-input-container>
      <md-select label:aria-label="Reminder relation" name="alarmRelation"
                 ng-model="editor.component.alarm.relation"
                 ng-change="editor.changeAlarmRelation(eventForm)">
        <var:foreach list="relationsList" item="item">
          <md-option var:value="item"><var:string value="itemText"/></md-option>
        </var:foreach>
      </md-select>
    </md-input-container>
  </div>

  <var:if condition="emailAlarmsEnabled">
    <md-radio-group layout="column"
                    ng-model="editor.component.alarm.action">
      <md-radio-button value="display">
        <var:string label:value="Show an Alert"/>
      </md-radio-button>
      <md-radio-button value="email">
        <var:string label:value="Send an E-mail"/>
      </md-radio-button>
      <div layout="row" flex-offset="5"
           ng-show="editor.component.canRemindAttendeesByEmail()">
        <md-checkbox ng-model="editor.component.alarm.organizer"
                     ng-true-value="1"
                     ng-false-value="0"
                     label:aria-label="Email Organizer">
          <var:string label:value="Email Organizer"/>
        </md-checkbox>
        <var:entity const:name="nbsp" />
        <md-checkbox ng-model="editor.component.alarm.attendees"
                     ng-true-value="1"
                     ng-false-value="0"
                     label:aria-label="Email Attendees">
          <var:string label:value="Email Attendees"/>
        </md-checkbox>
      </div>
    </md-radio-group>
  </var:if>

</container>
