<!--

    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 [formGroup]="widgetFontFormGroup" fxLayout="column">
  <section fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center">
    <mat-form-field fxFlex class="mat-block">
      <mat-label translate>widgets.widget-font.font-family</mat-label>
      <input matInput formControlName="family">
    </mat-form-field>
    <mat-form-field fxFlex class="mat-block">
      <mat-label translate>{{ sizeTitle }}</mat-label>
      <input matInput type="number" min="1" step="1" formControlName="size">
    </mat-form-field>
  </section>
  <section fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center">
    <mat-form-field fxFlex class="mat-block">
      <mat-label translate>widgets.widget-font.font-style</mat-label>
      <mat-select formControlName="style">
        <mat-option [value]="'normal'">
          {{ 'widgets.widget-font.font-style-normal' | translate }}
        </mat-option>
        <mat-option [value]="'italic'">
          {{ 'widgets.widget-font.font-style-italic' | translate }}
        </mat-option>
        <mat-option [value]="'oblique'">
          {{ 'widgets.widget-font.font-style-oblique' | translate }}
        </mat-option>
      </mat-select>
    </mat-form-field>
    <mat-form-field fxFlex class="mat-block">
      <mat-label translate>widgets.widget-font.font-weight</mat-label>
      <mat-select formControlName="weight">
        <mat-option [value]="'normal'">
          {{ 'widgets.widget-font.font-weight-normal' | translate }}
        </mat-option>
        <mat-option [value]="'bold'">
          {{ 'widgets.widget-font.font-weight-bold' | translate }}
        </mat-option>
        <mat-option [value]="'bolder'">
          {{ 'widgets.widget-font.font-weight-bolder' | translate }}
        </mat-option>
        <mat-option [value]="'lighter'">
          {{ 'widgets.widget-font.font-weight-lighter' | translate }}
        </mat-option>
        <mat-option [value]="'100'">100</mat-option>
        <mat-option [value]="'200'">200</mat-option>
        <mat-option [value]="'300'">300</mat-option>
        <mat-option [value]="'400'">400</mat-option>
        <mat-option [value]="'500'">500</mat-option>
        <mat-option [value]="'600'">600</mat-option>
        <mat-option [value]="'700'">700</mat-option>
        <mat-option [value]="'800'">800</mat-option>
        <mat-option [value]="'900'">900</mat-option>
      </mat-select>
    </mat-form-field>
  </section>
  <section fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center">
    <tb-color-input
      fxFlex
      formControlName="color"
      icon="format_color_fill"
      label="{{ 'widgets.widget-font.color' | translate }}" openOnInput colorClearButton>
    </tb-color-input>
    <tb-color-input
      *ngIf="hasShadowColor"
      fxFlex
      formControlName="shadowColor"
      icon="format_color_fill"
      label="{{ 'widgets.widget-font.shadow-color' | translate }}" openOnInput colorClearButton>
    </tb-color-input>
  </section>
</section>
