<!--

    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.

-->
<ng-container [formGroup]="unreadNotificationWidgetSettingsForm">
  <div class="tb-form-panel">
    <div class="tb-form-panel-title" translate>widget-config.appearance</div>
    <div class="tb-form-row space-between">
      <div>{{ 'widgets.notification.max-notification-display' | translate }}</div>
      <mat-form-field appearance="outline" subscriptSizing="dynamic">
        <input matInput type="number" min="1" formControlName="maxNotificationDisplay" placeholder="{{ 'widget-config.set' | translate }}">
      </mat-form-field>
    </div>
    <div class="tb-form-panel">
      <div class="tb-form-panel-title" translate>widget-config.appearance</div>
      <mat-slide-toggle class="mat-slide fixed-title-width" formControlName="enableFilter">
        {{ 'widgets.notification.type-filter' | translate }}
      </mat-slide-toggle>
      <mat-slide-toggle class="mat-slide fixed-title-width" formControlName="enableMarkAsRead">
        {{ 'widgets.notification.button-mark-read' | translate }}
      </mat-slide-toggle>
      <mat-slide-toggle class="mat-slide fixed-title-width" formControlName="enableViewAll">
        {{ 'widgets.notification.button-view-all' | translate }}
      </mat-slide-toggle>
    </div>
  </div>

  <div class="tb-form-panel">
    <div class="tb-form-row no-padding no-border">
      <mat-slide-toggle class="mat-slide" formControlName="showCounter">
        <div tb-hint-tooltip-icon="{{'widgets.notification.counter-hint' | translate}}">
          {{ 'widgets.notification.counter' | translate }}
        </div>
      </mat-slide-toggle>
    </div>
    <div class="tb-form-row space-between">
      <div>{{ 'widgets.notification.counter-value' | translate }}</div>
      <div class="flex flex-row items-center justify-start gap-2">
        <tb-font-settings formControlName="counterValueFont"
                          clearButton
                          [previewText]="countPreviewFn"
                          [initialPreviewStyle]="widgetConfig.config.titleStyle">
        </tb-font-settings>
        <tb-color-input asBoxInput
                        formControlName="counterValueColor">
        </tb-color-input>
      </div>
    </div>
    <div class="tb-form-row space-between">
      <div>{{ 'widgets.notification.counter-color' | translate }}</div>
      <tb-color-input asBoxInput
                      formControlName="counterColor">
      </tb-color-input>
    </div>
  </div>

  <div class="tb-form-row space-between">
    <div>{{ 'widgets.background.background' | translate }}</div>
    <tb-background-settings formControlName="background">
    </tb-background-settings>
  </div>
  <div class="tb-form-row space-between">
    <div>{{ 'widget-config.card-padding' | translate }}</div>
    <mat-form-field appearance="outline" subscriptSizing="dynamic">
      <input matInput formControlName="padding" placeholder="{{ 'widget-config.set' | translate }}">
    </mat-form-field>
  </div>
</ng-container>
