<!--
  ~ 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="column" flex="100" class="md-padding">
    <div layout="row">
        <md-select ng-model="ctrl.selectedTransportFormat" placeholder="Select Transport Format" ng-disabled="ctrl.disabled">
            <md-option ng-repeat="format in ctrl.availableTransportFormats" value="{{format.id}}">
                <b>{{format.name}}</b>
            </md-option>
        </md-select>
        <md-button class="md-accent" ng-click="ctrl.addTransportFormat(ctrl.grounding)"
                   ng-disabled="ctrl.disabled || ctrl.grounding.length > 0">Add Transport Format
        </md-button>
    </div>
    <div ng-show="ctrl.grounding.length > 0">
        <div layout="column" flex="100" class="panel-margin ontology-panel-pipeline-configurator">
            <div flex="100" layout="row">
                <div flex="70" layout="row" layout-align="start center"><h4>Transport Format:
                    {{ctrl.findFormat(ctrl.grounding[0])}}</h4></div>
                <div flex="30" layout="row" layout-align="end center">
                    <md-button ng-disabled="ctrl.disabled" ng-click="ctrl.removeTransportFormat(ctrl.grounding)"
                               class="md-icon-button tree-node-action">
                        <md-icon md-svg-icon="content:ic_clear_24px" aria-label="Remove Format"></md-icon>
                    </md-button>
                </div>
            </div>
        </div>
    </div>
</div>
<p></p>