<!--

    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]="originatorFieldsConfigForm" class="tb-form-panel no-padding no-border">
  <tb-sv-map-config
    required
    [selectOptions]="originatorFields"
    targetKeyPrefix="originator"
    formControlName="dataMapping"
    [requiredText]="'rule-node-config.attr-mapping-required' | translate"
    [labelText]="'rule-node-config.originator-fields-mapping' | translate"
    [selectText]="'rule-node-config.source-field' | translate"
    [selectRequiredText]="'rule-node-config.source-field-required' | translate"
    [valText]="'rule-node-config.target-key' | translate"
    [valRequiredText]="'rule-node-config.target-key-required' | translate"
    [hintText]="'rule-node-config.originator-fields-sv-map-hint' | translate"
    popupHelpLink="rulenode/originator_fields_node_fields_templatization">
  </tb-sv-map-config>
  <tb-msg-metadata-chip [labelText]="'rule-node-config.add-mapped-originator-fields-to' | translate"
                        formControlName="fetchTo">
  </tb-msg-metadata-chip>
  <div tb-hint-tooltip-icon="{{ 'rule-node-config.skip-empty-fields-tooltip' | translate }}" class="tb-form-row same-padding">
    <mat-slide-toggle class="mat-slide margin" formControlName="ignoreNullStrings">
      {{ 'rule-node-config.skip-empty-fields' | translate }}
    </mat-slide-toggle>
  </div>
</section>
