"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 });
exports.GlobalTableSettings = exports.ObjectPageTreeTable = exports.ObjectPageGridTable = exports.ObjectPageAnalyticalTable = exports.ObjectPageResponsiveTable = exports.CommonTableSettingsForSections = exports.Fields4DialogOP = exports.QuickVariantSelectionOP = void 0;
const ux_specification_types_1 = require("@sap/ux-specification-types");
const decoration_1 = require("../../../common/decoration");
const application_1 = require("../../application");
const common_1 = require("../../../common");
const Table_1 = require("./Table");
const getSmartTableControlId = (baseId, _idBreadcrumbs, breadcrumbs, controlType, title) => {
    const breadCrumbsCopy = breadcrumbs.slice(1, 2);
    let suffixId;
    if (controlType() === 'sap.ui.comp.smarttable.SmartTable') {
        suffixId = ux_specification_types_1.DefinitionName.Table;
    }
    else if (controlType() === 'sap.m.Table') {
        suffixId = 'responsiveTable';
    }
    breadCrumbsCopy.push(suffixId);
    breadCrumbsCopy[0] = (0, decoration_1.convertSectionId)(breadCrumbsCopy[0], title);
    return (0, decoration_1.buildControlIdFromParent)(baseId, breadCrumbsCopy);
};
class QuickVariantSelectionOP {
}
exports.QuickVariantSelectionOP = QuickVariantSelectionOP;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: (pageKeys, manifest, sectionId) => (0, application_1.getAppSettingOBJsectionPathV2)(pageKeys, manifest, sectionId) + ux_specification_types_1.QUICKVARPATH
        }
    }),
    (0, decoration_1.validity)({
        since: '1.48.0'
    })
], QuickVariantSelectionOP.prototype, "showCounts", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: (pageKeys, manifest, sectionId) => (0, application_1.getAppSettingOBJsectionPathV2)(pageKeys, manifest, sectionId) + ux_specification_types_1.QUICKVARPATH
        }
    }),
    (0, decoration_1.validity)({
        since: '1.48.0'
    })
], QuickVariantSelectionOP.prototype, "variants", void 0);
class Fields4DialogOP {
}
exports.Fields4DialogOP = Fields4DialogOP;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: (pageKeys, manifest, sectionId) => (0, application_1.getTableSettingsOBJsectionPathV2)(pageKeys, manifest, sectionId) + '/createWithParameterDialog',
            export: Table_1.exportCreateParametersFields
        }
    }),
    (0, decoration_1.validity)({
        since: '1.77.0'
    })
], Fields4DialogOP.prototype, "fields", void 0);
class CommonTableSettingsForSections {
    constructor() {
        this.getDeprecated = () => {
            return {
                tableType: {
                    since: '1.50.0',
                    deprecated: {
                        since: '1.70.0',
                        text: 'Use tableSettings.type instead'
                    }
                }
            };
        };
    }
}
exports.CommonTableSettingsForSections = CommonTableSettingsForSections;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            key: 'createWithParameterDialog',
            path: application_1.getTableSettingsOBJsectionPathV2,
            import: Table_1.importCreateParameters
        }
    }),
    (0, decoration_1.validity)({
        since: '1.77.0'
    })
], CommonTableSettingsForSections.prototype, "createWithParameterDialog", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.SmartTable
        }
    }),
    (0, decoration_1.validity)({
        since: '1.28.0'
    })
], CommonTableSettingsForSections.prototype, "editable", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.SmartTable
        }
    }),
    (0, decoration_1.validity)({
        since: '1.95.0' // git 5376552
    }),
    (0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/#/topic/f6a8fd2812d9442a9bba2f6fb296c42e')
], CommonTableSettingsForSections.prototype, "showPasteButton", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.54.0'
    })
], CommonTableSettingsForSections.prototype, "multiSelect", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.70.0'
    })
], CommonTableSettingsForSections.prototype, "selectAll", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.70.0'
    })
], CommonTableSettingsForSections.prototype, "selectionLimit", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.63.0'
    })
], CommonTableSettingsForSections.prototype, "quickVariantSelection", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.SmartTable
        }
    }),
    (0, decoration_1.validity)({
        since: '1.26.0'
    })
], CommonTableSettingsForSections.prototype, "useExportToExcel", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.SmartTable
        }
    }),
    (0, decoration_1.validity)({
        since: '1.50.0'
    })
], CommonTableSettingsForSections.prototype, "exportType", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.48.5'
    }),
    (0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/cfb04f0c58e7409992feb4c91aa9410b')
], CommonTableSettingsForSections.prototype, "createMode", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.61.0'
    })
], CommonTableSettingsForSections.prototype, "disableDefaultInlineCreateSort", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.78.0'
    })
], CommonTableSettingsForSections.prototype, "variantManagement", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.120.0'
    })
], CommonTableSettingsForSections.prototype, "copy", void 0);
__decorate([
    (0, decoration_1.childId)('toolBar')
], CommonTableSettingsForSections.prototype, "toolBar", void 0);
class ObjectPageResponsiveTable extends CommonTableSettingsForSections {
}
exports.ObjectPageResponsiveTable = ObjectPageResponsiveTable;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    })
], ObjectPageResponsiveTable.prototype, "type", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.Table
        }
    })
], ObjectPageResponsiveTable.prototype, "includeItemInSelection", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.Table
        },
        generate: common_1.addPatternForBindingChangeOfEnumOP
    }),
    (0, decoration_1.validity)({
        since: '1.52.0'
    })
], ObjectPageResponsiveTable.prototype, "popinLayout", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.77.0'
    })
], ObjectPageResponsiveTable.prototype, "inlineDelete", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        flex: {
            controlId: getSmartTableControlId,
            controlType: () => ux_specification_types_1.ControlType.Table
        }
    }),
    (0, decoration_1.validity)({
        since: '1.16.0'
    })
], ObjectPageResponsiveTable.prototype, "growingThreshold", void 0);
class ObjectPageAnalyticalTable extends CommonTableSettingsForSections {
}
exports.ObjectPageAnalyticalTable = ObjectPageAnalyticalTable;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    })
], ObjectPageAnalyticalTable.prototype, "type", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.67.0'
    })
], ObjectPageAnalyticalTable.prototype, "condensedTableLayout", void 0);
class ObjectPageGridTable extends CommonTableSettingsForSections {
}
exports.ObjectPageGridTable = ObjectPageGridTable;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    })
], ObjectPageGridTable.prototype, "type", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.67.0'
    })
], ObjectPageGridTable.prototype, "condensedTableLayout", void 0);
class ObjectPageTreeTable extends CommonTableSettingsForSections {
}
exports.ObjectPageTreeTable = ObjectPageTreeTable;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsOBJsectionPathV2
        }
    })
], ObjectPageTreeTable.prototype, "type", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getAppSettingOBJsectionPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.67.0'
    })
], ObjectPageTreeTable.prototype, "condensedTableLayout", void 0);
class GlobalTableSettings {
}
exports.GlobalTableSettings = GlobalTableSettings;
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.70.0'
    })
], GlobalTableSettings.prototype, "selectAll", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.78.0'
    })
], GlobalTableSettings.prototype, "variantManagement", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.120.0'
    })
], GlobalTableSettings.prototype, "copy", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    })
], GlobalTableSettings.prototype, "type", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.54.0'
    })
], GlobalTableSettings.prototype, "multiSelect", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.67.0'
    })
], GlobalTableSettings.prototype, "condensedTableLayout", void 0);
__decorate([
    (0, decoration_1.syncRule)({
        manifest: {
            path: application_1.getGlobalTableSettingsPathV2
        }
    }),
    (0, decoration_1.validity)({
        since: '1.77.0'
    })
], GlobalTableSettings.prototype, "inlineDelete", void 0);
//# sourceMappingURL=ObjectPageTable.js.map