text: "use strict";
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  const common_1 = require("../../../../specification/common");
  const v2_1 = require("../../../../specification/v2");
  const common_2 = require("../../../common");
  const decoration_1 = require("../../../common/decoration");
  const application_1 = require("../../application");
  exports.getSmartTableControlId = (baseId, idBreadcrumbs, breadcrumbs, controlType) => {
      if (controlType() === 'sap.m.Table') {
          return baseId + 'responsiveTable';
      }
      else if (controlType() === 'sap.ui.comp.smarttable.SmartTable' && baseId.includes('AnalyticalListPage')) {
          return baseId + 'table';
      }
      return decoration_1.buildControlIdFromParent(baseId, idBreadcrumbs);
  };
  //import & export createWithParameterDialog
  function importCreateParameters(manifestSection) {
      if (!manifestSection['createWithParameterDialog']) {
          return undefined;
      }
      let configPart = {};
      if (manifestSection['createWithParameterDialog']) {
          configPart = JSON.parse(JSON.stringify(manifestSection['createWithParameterDialog']));
      }
      return configPart;
  }
  exports.importCreateParameters = importCreateParameters;
  function exportCreateParameters(manifestSection, configPart) {
      if (configPart['createWithParameterDialog']) {
          manifestSection['createWithParameterDialog'] = JSON.parse(JSON.stringify(configPart['createWithParameterDialog']));
      }
      else {
          delete manifestSection['createWithParameterDialog'];
      }
  }
  exports.exportCreateParameters = exportCreateParameters;
  class CreateWithFilters {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys) + '/createWithFilters'
          }
      })
  ], CreateWithFilters.prototype, "strategy", void 0);
  exports.CreateWithFilters = CreateWithFilters;
  //import && export table type
  function importType(manifestSection) {
      return manifestSection['type'] ? manifestSection['type'] : v2_1.TableTypeV2.ResponsiveTable;
  }
  function exportType(manifestSection, configPart) {
      if (configPart['type'] && (manifestSection['type'] || configPart['type'] !== v2_1.TableTypeV2.ResponsiveTable)) {
          manifestSection['type'] = configPart['type'];
      }
      else {
          delete manifestSection['type'];
      }
  }
  exports.exportType = exportType;
  class DataLoadSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getDataLoadSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.75.2'
      })
  ], DataLoadSettings.prototype, "loadDataOnAppLaunch", void 0);
  exports.DataLoadSettings = DataLoadSettings;
  class Fields4Dialog {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys) + '/createWithParameterDialog'
          }
      }),
      decoration_1.validity({
          since: '1.77.0'
      })
  ], Fields4Dialog.prototype, "fields", void 0);
  exports.Fields4Dialog = Fields4Dialog;
  class QuickVariantSelection {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys) + common_2.QUICKVARPATH
          }
      }),
      decoration_1.validity({
          since: '1.48.0'
      })
  ], QuickVariantSelection.prototype, "showCounts", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys) + common_2.QUICKVARPATH
          }
      }),
      decoration_1.validity({
          since: '1.48.0'
      })
  ], QuickVariantSelection.prototype, "variants", void 0);
  exports.QuickVariantSelection = QuickVariantSelection;
  class CommonTableSettings {
      constructor() {
          this.getDeprecated = () => {
              return {
                  tableType: {
                      since: '1.50.0',
                      deprecated: {
                          since: '1.70.0',
                          text: 'Use tableSettings.type instead'
                      }
                  },
                  enableAutoBinding: {
                      since: '1.40.0',
                      deprecated: {
                          since: '1.75.2',
                          text: 'Use tableSettings.loadDataOnAppLaunch instead'
                      }
                  }
              };
          };
      }
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              key: 'createWithParameterDialog',
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importCreateParameters,
              export: exportCreateParameters
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.77.0'
      })
  ], CommonTableSettings.prototype, "createWithParameterDialog", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: decoration_1.buildControlIdFromParent,
              controlType: () => common_2.ControlType.SmartTable,
              createFlexChange: decoration_1.exportToFlexChange
          }
      }),
      decoration_1.validity({
          since: '1.38.0'
      })
  ], CommonTableSettings.prototype, "showTablePersonalisation", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.SmartTable,
              createFlexChange: decoration_1.exportToFlexChange
          }
      }),
      decoration_1.validity({
          since: '1.26.0'
      })
  ], CommonTableSettings.prototype, "useExportToExcel", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.SmartTable,
              createFlexChange: decoration_1.exportToFlexChange
          }
      })
  ], CommonTableSettings.prototype, "fitContainer", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.48.0'
      })
  ], CommonTableSettings.prototype, "quickVariantSelection", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys),
              export: (manifestSection, configObject) => {
                  const quickVariantSelectionX = JSON.parse(JSON.stringify(configObject['quickVariantSelectionX']));
                  manifestSection['quickVariantSelectionX'] = quickVariantSelectionX;
                  if (quickVariantSelectionX['variants']) {
                      for (const variant in quickVariantSelectionX['variants']) {
                          const variantConfig = quickVariantSelectionX['variants'][variant];
                          variantConfig['tableSettings'] = {};
                          const tablesettings = [
                              'type',
                              'multiSelect',
                              'selectAll',
                              'selectionLimit',
                              'inlineDelete'
                          ];
                          for (const key in variantConfig) {
                              if (tablesettings.indexOf(key) !== -1) {
                                  variantConfig['tableSettings'][key] = variantConfig[key];
                                  delete variantConfig[key];
                              }
                          }
                          manifestSection['quickVariantSelectionX']['variants'][variant] = variantConfig;
                      }
                  }
              }
          }
      }),
      decoration_1.validity({
          since: '1.48.0'
      })
  ], CommonTableSettings.prototype, "quickVariantSelectionX", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.38.0'
      })
  ], CommonTableSettings.prototype, "multiSelect", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.70.0'
      })
  ], CommonTableSettings.prototype, "selectAll", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.70.0'
      })
  ], CommonTableSettings.prototype, "selectionLimit", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.75.2'
      })
  ], CommonTableSettings.prototype, "dataLoadSettings", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.42.0'
      })
  ], CommonTableSettings.prototype, "condensedTableLayout", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.56.0'
      })
  ], CommonTableSettings.prototype, "enableTableFilterInPageVariant", void 0);
  exports.CommonTableSettings = CommonTableSettings;
  class ResponsiveTable extends CommonTableSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importType,
              export: exportType
          }
      }),
      decoration_1.validity({
          since: '1.50.0'
      })
  ], ResponsiveTable.prototype, "type", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.54.0'
      })
  ], ResponsiveTable.prototype, "createWithFilters", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.Table,
              createFlexChange: decoration_1.exportToFlexChange
          },
          generate: common_2.addPatternForBindingChangeOfEnumLR
      }),
      decoration_1.validity({
          since: '1.52.0'
      })
  ], ResponsiveTable.prototype, "popinLayout", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.Table,
              createFlexChange: decoration_1.exportToFlexChange
          }
      })
  ], ResponsiveTable.prototype, "includeItemInSelection", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.77.0'
      })
  ], ResponsiveTable.prototype, "inlineDelete", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: () => common_1.GENERICAPPSETTINGS
          }
      }),
      decoration_1.validity({
          since: '1.63.0'
      })
  ], ResponsiveTable.prototype, "showDraftToggle", void 0);
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.Table,
              createFlexChange: decoration_1.exportToFlexChange
          }
      }),
      decoration_1.validity({
          since: '1.16.0'
      })
  ], ResponsiveTable.prototype, "growingThreshold", void 0);
  exports.ResponsiveTable = ResponsiveTable;
  class TreeTable extends CommonTableSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importType,
              export: exportType
          }
      }),
      decoration_1.validity({
          since: '1.50.0'
      })
  ], TreeTable.prototype, "type", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: () => common_1.GENERICAPPSETTINGS
          }
      }),
      decoration_1.validity({
          since: '1.63.0'
      })
  ], TreeTable.prototype, "showDraftToggle", void 0);
  exports.TreeTable = TreeTable;
  class AnalyticalTable extends CommonTableSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importType,
              export: exportType
          }
      }),
      decoration_1.validity({
          since: '1.50.0'
      })
  ], AnalyticalTable.prototype, "type", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], AnalyticalTable.prototype, "qualifier", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.38.0'
      }),
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], AnalyticalTable.prototype, "defaultContentView", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], AnalyticalTable.prototype, "defaultFilterMode", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.60.0'
      })
  ], AnalyticalTable.prototype, "contentTitle", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], AnalyticalTable.prototype, "autoHide", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.60.0'
      })
  ], AnalyticalTable.prototype, "filterDefaultsFromSelectionVariant", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.78.0'
      })
  ], AnalyticalTable.prototype, "allFiltersAsInParameters", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.54.0'
      })
  ], AnalyticalTable.prototype, "createWithFilters", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: () => common_1.GENERICAPPSETTINGS
          }
      }),
      decoration_1.validity({
          since: '1.63.0'
      })
  ], AnalyticalTable.prototype, "showDraftToggle", void 0);
  exports.AnalyticalTable = AnalyticalTable;
  class TableALP extends CommonTableSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importType,
              export: exportType
          }
      }),
      decoration_1.validity({
          since: '1.50.0'
      })
  ], TableALP.prototype, "type", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], TableALP.prototype, "qualifier", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.38.0'
      }),
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], TableALP.prototype, "defaultContentView", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], TableALP.prototype, "defaultFilterMode", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.60.0'
      })
  ], TableALP.prototype, "contentTitle", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      })
  ], TableALP.prototype, "autoHide", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.60.0'
      })
  ], TableALP.prototype, "filterDefaultsFromSelectionVariant", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          }
      }),
      decoration_1.validity({
          since: '1.78.0'
      })
  ], TableALP.prototype, "allFiltersAsInParameters", void 0);
  exports.TableALP = TableALP;
  class ALPResponsiveTable extends TableALP {
  }
  __decorate([
      decoration_1.syncRule({
          flex: {
              controlId: exports.getSmartTableControlId,
              controlType: () => common_2.ControlType.Table,
              createFlexChange: decoration_1.exportToFlexChange
          }
      }),
      decoration_1.validity({
          since: '1.16.0'
      })
  ], ALPResponsiveTable.prototype, "growingThreshold", void 0);
  exports.ALPResponsiveTable = ALPResponsiveTable;
  class ALPGridTable extends TableALP {
  }
  exports.ALPGridTable = ALPGridTable;
  class ALPAnalyticalTable extends TableALP {
  }
  exports.ALPAnalyticalTable = ALPAnalyticalTable;
  class GridTable extends CommonTableSettings {
  }
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getTableSettingPathV2(pageKeys),
              import: importType,
              export: exportType
          }
      }),
      decoration_1.validity({
          since: '1.50.0'
      })
  ], GridTable.prototype, "type", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: (pageKeys) => application_1.getAppSettingPathV2(pageKeys)
          },
          hasDistinctDefinition: true
      }),
      decoration_1.validity({
          since: '1.54.0'
      })
  ], GridTable.prototype, "createWithFilters", void 0);
  __decorate([
      decoration_1.syncRule({
          manifest: {
              path: () => common_1.GENERICAPPSETTINGS
          }
      }),
      decoration_1.validity({
          since: '1.63.0'
      })
  ], GridTable.prototype, "showDraftToggle", void 0);
  exports.GridTable = GridTable;
  //# sourceMappingURL=Table.js.map