<!--

    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]="tenantProfileConfigurationForm" class="flex flex-col">
  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.entities' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-devices</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxDevices"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxDevices').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-devices-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxDevices').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-devices-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-dashboards</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxDashboards"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxDashboards').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-dashboards-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxDashboards').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-dashboards-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-assets</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxAssets"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxAssets').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-assets-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxAssets').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-assets-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-users</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxUsers"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxUsers').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-users-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxUsers').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-users-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <mat-expansion-panel class="configuration-panel">
      <mat-expansion-panel-header>
        <mat-panel-description class="flex items-stretch justify-end" translate>
          tenant-profile.advanced-settings
        </mat-panel-description>
      </mat-expansion-panel-header>
      <ng-template matExpansionPanelContent>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.maximum-customers</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxCustomers"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxCustomers').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.maximum-customers-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxCustomers').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.maximum-customers-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.maximum-rule-chains</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxRuleChains"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxRuleChains').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.maximum-rule-chains-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxRuleChains').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.maximum-rule-chains-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.maximum-edges</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxEdges"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxEdges').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.maximum-edges-required' | translate }}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxEdges').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.maximum-edges-range' | translate }}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <div class="flex-1"></div>
        </div>
      </ng-template>
    </mat-expansion-panel>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.rule-engine' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-r-e-executions</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxREExecutions"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxREExecutions').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-r-e-executions-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxREExecutions').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-r-e-executions-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-transport-messages</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxTransportMessages"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxTransportMessages').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-transport-messages-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxTransportMessages').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-transport-messages-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <mat-expansion-panel class="configuration-panel">
      <mat-expansion-panel-header>
        <mat-panel-description class="flex items-stretch justify-end" translate>
          tenant-profile.advanced-settings
        </mat-panel-description>
      </mat-expansion-panel-header>
      <ng-template matExpansionPanelContent>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-j-s-executions</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxJSExecutions"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxJSExecutions').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-j-s-executions-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxJSExecutions').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-j-s-executions-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-tbel-executions</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxTbelExecutions"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxTbelExecutions').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-tbel-executions-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxTbelExecutions').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-tbel-executions-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-rule-node-executions-per-message</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxRuleNodeExecutionsPerMessage"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxRuleNodeExecutionsPerMessage').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-rule-node-executions-per-message-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxRuleNodeExecutionsPerMessage').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-rule-node-executions-per-message-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-transport-data-points</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxTransportDataPoints"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxTransportDataPoints').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-transport-data-points-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxTransportDataPoints').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-transport-data-points-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
      </ng-template>
    </mat-expansion-panel>
  </fieldset>
  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.calculated-fields' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-calculated-fields</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxCalculatedFieldsPerEntity"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxCalculatedFieldsPerEntity').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-calculated-fields-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxCalculatedFieldsPerEntity').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-calculated-fields-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-data-points-per-rolling-arg</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxDataPointsPerRollingArg"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxDataPointsPerRollingArg').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-data-points-per-rolling-arg-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxDataPointsPerRollingArg').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-data-points-per-rolling-arg-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-arguments-per-cf</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxArgumentsPerCF"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxArgumentsPerCF').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-arguments-per-cf-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxArgumentsPerCF').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-arguments-per-cf-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <div class="flex-1"></div>
    </div>
    <mat-expansion-panel class="configuration-panel">
      <mat-expansion-panel-header>
        <mat-panel-description class="flex items-stretch justify-end" translate>
          tenant-profile.advanced-settings
        </mat-panel-description>
      </mat-expansion-panel-header>
      <ng-template matExpansionPanelContent>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-state-size</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxStateSizeInKBytes"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxStateSizeInKBytes').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-state-size-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxStateSizeInKBytes').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-state-size-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-value-argument-size</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="maxSingleValueArgumentSizeInKBytes"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxSingleValueArgumentSizeInKBytes').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-value-argument-size-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxSingleValueArgumentSizeInKBytes').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-value-argument-size-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.max-related-level-per-argument</mat-label>
            <input matInput required min="1" step="1"
                   formControlName="maxRelationLevelPerCfArgument"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxRelationLevelPerCfArgument').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.max-related-level-per-argument-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxRelationLevelPerCfArgument').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.max-related-level-per-argument-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.min-allowed-scheduled-update-interval</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="minAllowedScheduledUpdateIntervalInSecForCF"
                   type="number">
            @if (tenantProfileConfigurationForm.get('minAllowedScheduledUpdateIntervalInSecForCF').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-scheduled-update-interval-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('minAllowedScheduledUpdateIntervalInSecForCF').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-scheduled-update-interval-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.min-allowed-aggregation-interval</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="minAllowedAggregationIntervalInSecForCF"
                   type="number">
            @if (tenantProfileConfigurationForm.get('minAllowedAggregationIntervalInSecForCF').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-aggregation-interval-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('minAllowedAggregationIntervalInSecForCF').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-aggregation-interval-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.min-allowed-deduplication-interval</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="minAllowedDeduplicationIntervalInSecForCF"
                   type="number">
            @if (tenantProfileConfigurationForm.get('minAllowedDeduplicationIntervalInSecForCF').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-deduplication-interval-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('minAllowedDeduplicationIntervalInSecForCF').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.min-allowed-deduplication-interval-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.intermediate-aggregation-interval</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="intermediateAggregationIntervalInSecForCF"
                   type="number">
            @if (tenantProfileConfigurationForm.get('intermediateAggregationIntervalInSecForCF').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.intermediate-aggregation-interval-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('intermediateAggregationIntervalInSecForCF').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.intermediate-aggregation-interval-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.reevaluation-check-interval</mat-label>
            <input matInput required min="0" step="1"
                   formControlName="cfReevaluationCheckInterval"
                   type="number">
            @if (tenantProfileConfigurationForm.get('cfReevaluationCheckInterval').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.reevaluation-check-interval-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('cfReevaluationCheckInterval').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.reevaluation-check-interval-range' | translate}}
              </mat-error>
            }
            <mat-hint></mat-hint>
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
            <mat-label translate>tenant-profile.relation-search-entity-limit</mat-label>
            <input matInput required min="1" step="1"
                   formControlName="maxRelatedEntitiesToReturnPerCfArgument"
                   type="number">
            @if (tenantProfileConfigurationForm.get('maxRelatedEntitiesToReturnPerCfArgument').hasError('required')) {
              <mat-error>
                {{ 'tenant-profile.relation-search-entity-limit-required' | translate}}
              </mat-error>
            }
            @if (tenantProfileConfigurationForm.get('maxRelatedEntitiesToReturnPerCfArgument').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.relation-search-entity-limit-range' | translate}}
              </mat-error>
            }
            <mat-hint translate>tenant-profile.relation-search-entity-limit-hint</mat-hint>
          </mat-form-field>
          <div class="flex-1"></div>
        </div>
      </ng-template>
    </mat-expansion-panel>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.time-to-live' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-d-p-storage-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxDPStorageDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxDPStorageDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-d-p-storage-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxDPStorageDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-d-p-storage-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.alarms-ttl-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="alarmsTtlDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('alarmsTtlDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.alarms-ttl-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('alarmsTtlDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.alarms-ttl-days-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.default-storage-ttl-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="defaultStorageTtlDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('defaultStorageTtlDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.default-storage-ttl-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('defaultStorageTtlDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.default-storage-ttl-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.rpc-ttl-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="rpcTtlDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('rpcTtlDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.rpc-ttl-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('rpcTtlDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.rpc-ttl-days-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.queue-stats-ttl-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="queueStatsTtlDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('queueStatsTtlDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.queue-stats-ttl-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('queueStatsTtlDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.queue-stats-ttl-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.rule-engine-exceptions-ttl-days</mat-label>
        <input matInput required min="0" step="1"
               formControlName="ruleEngineExceptionsTtlDays"
               type="number">
        @if (tenantProfileConfigurationForm.get('ruleEngineExceptionsTtlDays').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.rule-engine-exceptions-ttl-days-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('ruleEngineExceptionsTtlDays').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.rule-engine-exceptions-ttl-days-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.alarms-and-notifications' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <mat-slide-toggle class="slide-toggle-element flex-1" formControlName="smsEnabled">
      {{ 'tenant-profile.sms-enabled' | translate }}
    </mat-slide-toggle>
    @if (tenantProfileConfigurationForm.get('smsEnabled').value) {
      <mat-form-field class="mat-block flex-1"
                      appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-sms</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxSms"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxSms').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-sms-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxSms').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-sms-range' | translate}}
          </mat-error>
        }
      </mat-form-field>
    }
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-emails</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxEmails"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxEmails').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-emails-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxEmails').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-emails-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.max-created-alarms</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxCreatedAlarms"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxCreatedAlarms').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.max-created-alarms-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxCreatedAlarms').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.max-created-alarms-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.alarms-reevaluation-interval</mat-label>
        <input matInput required min="0" step="1"
               formControlName="alarmsReevaluationInterval"
               type="number">
        @if (tenantProfileConfigurationForm.get('alarmsReevaluationInterval').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.alarms-reevaluation-interval-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('alarmsReevaluationInterval').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.alarms-reevaluation-interval-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <div class="flex-1"></div>
    </div>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.debug' | translate }}
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-debug-duration-min</mat-label>
        <input matInput min="0" step="1"
               formControlName="maxDebugModeDurationMinutes"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxDebugModeDurationMinutes').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-debug-duration-min-range' | translate }}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <div class="flex-1"></div>
    </div>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.ota-files-in-bytes' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-resources-sum-data-size</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxResourcesInBytes"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxResourcesInBytes').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-resources-sum-data-size-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxResourcesInBytes').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-resources-sum-data-size-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline" subscriptSizing="dynamic">
        <mat-label translate>tenant-profile.maximum-ota-packages-sum-data-size</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxOtaPackagesInBytes"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxOtaPackagesInBytes').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-ota-package-sum-data-size-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxOtaPackagesInBytes').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-ota-package-sum-data-size-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline">
        <mat-label translate>tenant-profile.maximum-resource-size</mat-label>
        <input matInput required min="0" step="1"
               formControlName="maxResourceSize"
               type="number">
        @if (tenantProfileConfigurationForm.get('maxResourceSize').hasError('required')) {
          <mat-error>
            {{ 'tenant-profile.maximum-resource-size-required' | translate}}
          </mat-error>
        }
        @if (tenantProfileConfigurationForm.get('maxResourceSize').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.maximum-resource-size-range' | translate}}
          </mat-error>
        }
        <mat-hint></mat-hint>
      </mat-form-field>
      <div class="flex-1"></div>
    </div>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.ws-title' | translate }} <span translate>tenant-profile.unlimited</span>
    </legend>
    <div class="fields-element flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline">
        <mat-label translate>tenant-profile.ws-limit-max-sessions-per-tenant</mat-label>
        <input matInput type="number" formControlName="maxWsSessionsPerTenant">
        @if (tenantProfileConfigurationForm.get('maxWsSessionsPerTenant').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.too-small-value-zero' | translate}}
          </mat-error>
        }
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline">
        <mat-label translate>tenant-profile.ws-limit-max-subscriptions-per-tenant</mat-label>
        <input matInput type="number" formControlName="maxWsSubscriptionsPerTenant">
        @if (tenantProfileConfigurationForm.get('maxWsSubscriptionsPerTenant').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.too-small-value-zero' | translate}}
          </mat-error>
        }
      </mat-form-field>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <mat-form-field class="mat-block flex-1" appearance="outline">
        <mat-label translate>tenant-profile.ws-limit-max-sessions-per-customer</mat-label>
        <input matInput type="number" formControlName="maxWsSessionsPerCustomer">
        @if (tenantProfileConfigurationForm.get('maxWsSessionsPerCustomer').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.too-small-value-zero' | translate}}
          </mat-error>
        }
      </mat-form-field>
      <mat-form-field class="mat-block flex-1" appearance="outline">
        <mat-label translate>tenant-profile.ws-limit-max-subscriptions-per-customer</mat-label>
        <input matInput type="number" formControlName="maxWsSubscriptionsPerCustomer">
        @if (tenantProfileConfigurationForm.get('maxWsSubscriptionsPerCustomer').hasError('min')) {
          <mat-error>
            {{ 'tenant-profile.too-small-value-zero' | translate}}
          </mat-error>
        }
      </mat-form-field>
    </div>
    <mat-expansion-panel class="configuration-panel">
      <mat-expansion-panel-header>
        <mat-panel-description class="flex items-stretch justify-end" translate>
          tenant-profile.advanced-settings
        </mat-panel-description>
      </mat-expansion-panel-header>
      <ng-template matExpansionPanelContent>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.ws-limit-max-sessions-per-public-user</mat-label>
            <input matInput type="number" formControlName="maxWsSessionsPerPublicUser">
            @if (tenantProfileConfigurationForm.get('maxWsSessionsPerPublicUser').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.too-small-value-zero' | translate}}
              </mat-error>
            }
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.ws-limit-max-subscriptions-per-public-user</mat-label>
            <input matInput type="number" formControlName="maxWsSubscriptionsPerPublicUser">
            @if (tenantProfileConfigurationForm.get('maxWsSubscriptionsPerPublicUser').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.too-small-value-zero' | translate}}
              </mat-error>
            }
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.ws-limit-max-sessions-per-regular-user</mat-label>
            <input matInput type="number" formControlName="maxWsSessionsPerRegularUser">
            @if (tenantProfileConfigurationForm.get('maxWsSessionsPerRegularUser').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.too-small-value-zero' | translate}}
              </mat-error>
            }
          </mat-form-field>
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.ws-limit-max-subscriptions-per-regular-user</mat-label>
            <input matInput type="number" formControlName="maxWsSubscriptionsPerRegularUser">
            @if (tenantProfileConfigurationForm.get('maxWsSubscriptionsPerRegularUser').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.too-small-value-zero' | translate}}
              </mat-error>
            }
          </mat-form-field>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <mat-form-field class="mat-block flex-1" appearance="outline">
            <mat-label translate>tenant-profile.ws-limit-queue-per-session</mat-label>
            <input matInput type="number" formControlName="wsMsgQueueLimitPerSession">
            @if (tenantProfileConfigurationForm.get('wsMsgQueueLimitPerSession').hasError('min')) {
              <mat-error>
                {{ 'tenant-profile.too-small-value-one' | translate}}
              </mat-error>
            }
            <mat-hint>
              {{ 'tenant-profile.queue-size-is-limited-by-system-configuration' | translate}}
            </mat-hint>
          </mat-form-field>
          <div class="flex-1"></div>
        </div>
      </ng-template>
    </mat-expansion-panel>
  </fieldset>

  <fieldset class="fields-group">
    <legend class="group-title">
      {{ 'tenant-profile.rate-limits.rate-limits' | translate }}
    </legend>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <tb-rate-limits class="flex-1" formControlName="transportTenantMsgRateLimit"
                      [type]="rateLimitsType.TENANT_MESSAGES">
      </tb-rate-limits>
      <tb-rate-limits class="flex-1" formControlName="transportDeviceMsgRateLimit"
                      [type]="rateLimitsType.DEVICE_MESSAGES">
      </tb-rate-limits>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <tb-rate-limits class="flex-1" formControlName="transportTenantTelemetryMsgRateLimit"
                      [type]="rateLimitsType.TENANT_TELEMETRY_MESSAGES">
      </tb-rate-limits>
      <tb-rate-limits class="flex-1" formControlName="transportDeviceTelemetryMsgRateLimit"
                      [type]="rateLimitsType.DEVICE_TELEMETRY_MESSAGES">
      </tb-rate-limits>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <tb-rate-limits class="flex-1" formControlName="transportGatewayMsgRateLimit"
                      [type]="rateLimitsType.GATEWAY_MESSAGES">
      </tb-rate-limits>
      <tb-rate-limits class="flex-1" formControlName="transportGatewayDeviceMsgRateLimit"
                      [type]="rateLimitsType.GATEWAY_DEVICE_MESSAGES">
      </tb-rate-limits>
    </div>
    <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
      <tb-rate-limits class="flex-1" formControlName="transportGatewayTelemetryMsgRateLimit"
                      [type]="rateLimitsType.GATEWAY_TELEMETRY_MESSAGES">
      </tb-rate-limits>
      <tb-rate-limits class="flex-1" formControlName="transportGatewayDeviceTelemetryMsgRateLimit"
                      [type]="rateLimitsType.GATEWAY_DEVICE_TELEMETRY_MESSAGES">
      </tb-rate-limits>
    </div>
    <mat-expansion-panel class="configuration-panel">
      <mat-expansion-panel-header>
        <mat-panel-description class="flex items-stretch justify-end" translate>
          tenant-profile.advanced-settings
        </mat-panel-description>
      </mat-expansion-panel-header>
      <ng-template matExpansionPanelContent>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="transportTenantTelemetryDataPointsRateLimit"
                          [type]="rateLimitsType.TENANT_TELEMETRY_DATA_POINTS">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="transportDeviceTelemetryDataPointsRateLimit"
                          [type]="rateLimitsType.DEVICE_TELEMETRY_DATA_POINTS">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="transportGatewayTelemetryDataPointsRateLimit"
                          [type]="rateLimitsType.GATEWAY_TELEMETRY_DATA_POINTS">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="transportGatewayDeviceTelemetryDataPointsRateLimit"
                          [type]="rateLimitsType.GATEWAY_DEVICE_TELEMETRY_DATA_POINTS">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="tenantServerRestLimitsConfiguration"
                          [type]="rateLimitsType.TENANT_SERVER_REST_LIMITS_CONFIGURATION">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="customerServerRestLimitsConfiguration"
                          [type]="rateLimitsType.CUSTOMER_SERVER_REST_LIMITS_CONFIGURATION">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="tenantEntityExportRateLimit"
                          [type]="rateLimitsType.TENANT_ENTITY_EXPORT_RATE_LIMIT">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="tenantEntityImportRateLimit"
                          [type]="rateLimitsType.TENANT_ENTITY_IMPORT_RATE_LIMIT">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="cassandraWriteQueryTenantCoreRateLimits"
                          [type]="rateLimitsType.CASSANDRA_WRITE_QUERY_TENANT_CORE_RATE_LIMITS">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="cassandraReadQueryTenantCoreRateLimits"
                          [type]="rateLimitsType.CASSANDRA_READ_QUERY_TENANT_CORE_RATE_LIMITS">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="cassandraWriteQueryTenantRuleEngineRateLimits"
                          [type]="rateLimitsType.CASSANDRA_WRITE_QUERY_TENANT_RULE_ENGINE_RATE_LIMITS">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="cassandraReadQueryTenantRuleEngineRateLimits"
                          [type]="rateLimitsType.CASSANDRA_READ_QUERY_TENANT_RULE_ENGINE_RATE_LIMITS">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="tenantNotificationRequestsRateLimit"
                          [type]="rateLimitsType.TENANT_NOTIFICATION_REQUEST_RATE_LIMIT">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="tenantNotificationRequestsPerRuleRateLimit"
                          [type]="rateLimitsType.TENANT_NOTIFICATION_REQUESTS_PER_RULE_RATE_LIMIT">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="edgeEventRateLimits"
                          [type]="rateLimitsType.EDGE_EVENTS_RATE_LIMIT">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="edgeEventRateLimitsPerEdge"
                          [type]="rateLimitsType.EDGE_EVENTS_PER_EDGE_RATE_LIMIT">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="edgeUplinkMessagesRateLimits"
                          [type]="rateLimitsType.EDGE_UPLINK_MESSAGES_RATE_LIMIT">
          </tb-rate-limits>
          <tb-rate-limits class="flex-1" formControlName="edgeUplinkMessagesRateLimitsPerEdge"
                          [type]="rateLimitsType.EDGE_UPLINK_MESSAGES_PER_EDGE_RATE_LIMIT">
          </tb-rate-limits>
        </div>
        <div class="flex flex-1 flex-row xs:flex-col gt-xs:gap-4">
          <tb-rate-limits class="flex-1" formControlName="wsUpdatesPerSessionRateLimit"
                          [type]="rateLimitsType.WS_UPDATE_PER_SESSION_RATE_LIMIT">
          </tb-rate-limits>
          <div class="flex-1"></div>
        </div>
      </ng-template>
    </mat-expansion-panel>
  </fieldset>
</section>
