<!--

    Copyright © 2016-2022 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.

-->
<section class="tb-widget-settings" [formGroup]="flotPieWidgetSettingsForm" fxLayout="column">
  <fieldset class="fields-group">
    <legend class="group-title" translate>widgets.chart.common-pie-settings</legend>
    <section fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap="8px">
      <mat-form-field fxFlex class="mat-block">
        <mat-label translate>widgets.chart.radius</mat-label>
        <input matInput type="number" min="0" formControlName="radius">
      </mat-form-field>
      <mat-form-field fxFlex class="mat-block">
        <mat-label translate>widgets.chart.inner-radius</mat-label>
        <input matInput type="number" min="0" formControlName="innerRadius">
      </mat-form-field>
      <mat-form-field fxFlex class="mat-block">
        <mat-label translate>widgets.chart.tilt</mat-label>
        <input matInput type="number" min="0" formControlName="tilt">
      </mat-form-field>
    </section>
    <mat-slide-toggle formControlName="showLabels" class="slide-block">
      {{ 'widgets.chart.show-labels' | translate }}
    </mat-slide-toggle>
    <mat-slide-toggle formControlName="showTooltip" class="slide-block">
      {{ 'widgets.chart.show-tooltip' | translate }}
    </mat-slide-toggle>
  </fieldset>
  <fieldset class="fields-group" formGroupName="stroke">
    <legend class="group-title" translate>widgets.chart.stroke-settings</legend>
    <section fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap="8px">
      <mat-form-field fxFlex class="mat-block">
        <mat-label translate>widgets.chart.width-pixels</mat-label>
        <input matInput type="number" min="0" formControlName="width">
      </mat-form-field>
      <tb-color-input fxFlex
        formControlName="color"
        icon="format_color_fill"
        label="{{ 'widgets.chart.color' | translate }}" openOnInput colorClearButton>
      </tb-color-input>
    </section>
  </fieldset>
  <fieldset class="fields-group">
    <legend class="group-title" translate>widgets.chart.animation-settings</legend>
    <mat-slide-toggle formControlName="animatedPie" class="slide-block">
      {{ 'widgets.chart.animated-pie' | translate }}
    </mat-slide-toggle>
  </fieldset>
</section>
