<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<div layout="row" flex="100" class="md-padding">
    <div flex="100" layout="column">
        <md-checkbox ng-model="ctrl.frequencySelected" aria-label="ctrl.qualities[0].label">
            {{ctrl.qualities[0].label}}
        </md-checkbox>
        <div ng-if="ctrl.frequencySelected" class="md-padding-left">
            <div layout="row" flex="70">

                <div flex="50">
                    <md-input-container>
                        <label>Quantity Value</label>
                        <input ng-model="ctrl.element.properties.quantityValue" required ng-disabled="disabled">
                    </md-input-container>
                </div>
                <div flex="50">
                    <measurement-unit disabled="disabled" property="element.properties.measurementUnit"
                                      style="width:100%;"></measurement-unit>
                </div>
            </div>
        </div>
        <md-checkbox ng-model="latencySelected" aria-label="qualities[1].label">
            {{ctrl.qualities[1].label}}
        </md-checkbox>
        <div ng-if="ctrl.latencySelected" class="md-padding-left">
            <div layout="row" flex="70">

                <div flex="50">
                    <md-input-container>
                        <label>Quantity Value</label>
                        <input ng-model="ctrl.element.properties.quantityValue" required ng-disabled="ctrl.disabled">
                    </md-input-container>
                </div>
                <div flex="50">
                    <measurement-unit disabled="ctrl.disabled" property="ctrl.element.properties.measurementUnit"
                                      style="width:100%;"></measurement-unit>
                </div>
            </div>
        </div>
    </div>
</div>