<!--

    Copyright © 2016-2026 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 class="tb-led-indicator flex flex-col">
  <div #ledTitleContainer class="title-container flex max-h-20% flex-full flex-row items-center justify-center" [class.!hidden]="!showTitle">
    <span #ledTitle class="led-title">{{title | customTranslate}}</span>
  </div>
  <div class="flex flex-full flex-col items-center justify-center"
       [class]="{
          'max-h-80%': showTitle,
          'max-h-100%': !showTitle
       }"
       [style.padding-top]="showTitle ? '5px': '10px'" #ledContainer id="led-container">
    <div #led class="led">
    </div>
  </div>
  <div #ledErrorContainer class="error-container flex flex-row items-center justify-center" [style.background]="error?.length ? 'rgba(255,255,255,0.25)' : 'none'">
    <span #ledError class="led-error">{{ error }}</span>
  </div>
  <div #textMeasure id="text-measure"></div>
</div>
