<!--

    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-form-row no-border no-padding column-lt-md" style="gap: 10px;" [formGroup]="thresholdFormGroup">
  <tb-value-source style="flex: 1" [aliasController]="aliasController" formControlName="valueSource"></tb-value-source>
  <div class="tb-form-row no-border no-padding" style="gap: 10px;">
    <mat-form-field appearance="outline" class="number lt-md:flex-1" subscriptSizing="dynamic">
      <input matInput formControlName="lineWidth" type="number" min="0" placeholder="{{ 'widgets.chart.line-width' | translate }}">
    </mat-form-field>
    <tb-color-input asBoxInput
                    formControlName="color">
    </tb-color-input>
    @if (!disabled) {
      <button mat-icon-button
              class="tb-box-button"
              type="button"
              (click)="removeThreshold.emit()"
              matTooltip="{{ 'action.remove' | translate }}"
              matTooltipPosition="above">
        <mat-icon>delete</mat-icon>
      </button>
    }
  </div>
</div>
