<!--

    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.

-->
<section [formGroup]="widgetFontFormGroup" class="flex flex-col mt-2">
  <section class="flex flex-row xs:flex-col gt-xs:items-center gt-xs:justify-start gt-xs:gap-2">
    <mat-form-field class="mat-block flex-1" appearance="outline">
      <mat-label translate>widgets.widget-font.font-family</mat-label>
      <input matInput formControlName="family">
    </mat-form-field>
    <mat-form-field class="mat-block flex-1" appearance="outline">
      <mat-label translate>{{ sizeTitle }}</mat-label>
      <input matInput type="number" min="1" step="1" formControlName="size">
    </mat-form-field>
  </section>
  <section class="flex flex-row xs:flex-col gt-xs:items-center gt-xs:justify-start gt-xs:gap-2">
    <mat-form-field class="mat-block flex-1" appearance="outline">
      <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 class="mat-block flex-1" appearance="outline">
      <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 class="flex flex-row xs:flex-col gt-xs:gap-2">
    <tb-color-input
      class="flex-1"
      appearance="outline"
      formControlName="color"
      icon="format_color_fill"
      label="{{ 'widgets.widget-font.color' | translate }}" openOnInput colorClearButton>
    </tb-color-input>
    @if (hasShadowColor) {
      <tb-color-input
        class="flex-1"
        appearance="outline"
        formControlName="shadowColor"
        icon="format_color_fill"
        label="{{ 'widgets.widget-font.shadow-color' | translate }}" openOnInput colorClearButton>
      </tb-color-input>
    }
  </section>
</section>
