<!--

    Copyright © 2016-2020 The Thingsboard Authors

    Licensed 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 style="background: #fff;" ng-class="{'fill-height': fillHeight}" tb-expand-fullscreen fullscreen-zindex="100" expand-button-id="expand-button" on-fullscreen-changed="onFullscreenChanged()" layout="column">
    <div layout="row" layout-align="start center" style="height: 40px;" class="tb-json-content-toolbar">
        <label class="tb-title no-padding"
               ng-class="{'tb-error': !contentValid}">{{ label }}</label>
        <span flex></span>
        <md-button ng-if="!readonly" class="tidy" aria-label="{{ 'js-func.tidy' | translate }}" ng-click="beautifyJSON()">{{
            'js-func.tidy' | translate }}
        </md-button>
        <md-button ng-if="!readonly" class="tidy" aria-label="{{ 'js-func.mini' | translate }}" ng-click="minifyJSON()">{{
            'js-func.mini' | translate }}
        </md-button>
        <md-button id="expand-button" aria-label="Fullscreen" class="md-icon-button tb-md-32 tb-fullscreen-button-style"></md-button>
    </div>
    <div flex id="tb-json-panel" class="tb-json-content-panel" layout="column">
        <div flex id="tb-json-input" ng-class="{'fill-height': fillHeight}"
             ng-readonly="readonly"
             ui-ace="jsonEditorOptions"
             ng-model="contentBody">
        </div>
    </div>
</div>
