"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.ObjectPageTable = exports.QuickVariantSelectionV4OP = exports.PersonalizationTypeOP = exports.TableCreationModeOP = void 0;
const ux_specification_types_1 = require("@sap/ux-specification-types");
const decorators_1 = require("../../../common/decoration/decorators");
const application_1 = require("../../application");
const Table_1 = require("./Table");
class TableCreationModeOP {
}
exports.TableCreationModeOP = TableCreationModeOP;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId),
            export: (manifestSection, configObject, key, manifestKey) => {
                (0, Table_1.exportCreationModeName)(manifestSection, configObject, key, manifestKey);
            },
            delete: (manifestSection, _configObject, _key, manifestKey) => {
                (0, Table_1.deleteCreationModeName)(manifestSection, manifestKey);
            }
        }
    })
], TableCreationModeOP.prototype, "name", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId),
            export: (manifestSection, configObject, key, manifestKey) => {
                (0, Table_1.exportCreationModeCreateAtEnd)(manifestSection, configObject, key, manifestKey);
            },
            delete: (manifestSection, _configObject, _key, manifestKey) => {
                (0, Table_1.deleteCreationModeCreateAtEnd)(manifestSection, manifestKey);
            }
        }
    })
], TableCreationModeOP.prototype, "createAtEnd", void 0);
class PersonalizationTypeOP {
}
exports.PersonalizationTypeOP = PersonalizationTypeOP;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId), // Here we are using path of parent to have correct value for manifestSection
            export: Table_1.exportPersonalizationProperty,
            delete: Table_1.deletePersonalizationProperty
        }
    })
], PersonalizationTypeOP.prototype, "column", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId), // Here we are using path of parent to have correct value for manifestSection
            export: Table_1.exportPersonalizationProperty,
            delete: Table_1.deletePersonalizationProperty
        }
    })
], PersonalizationTypeOP.prototype, "sort", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId),
            export: Table_1.exportPersonalizationProperty,
            delete: Table_1.deletePersonalizationProperty
        }
    })
], PersonalizationTypeOP.prototype, "filter", void 0);
class QuickVariantSelectionV4OP {
}
exports.QuickVariantSelectionV4OP = QuickVariantSelectionV4OP;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId) + ux_specification_types_1.QUICKVARPATH
        }
    })
], QuickVariantSelectionV4OP.prototype, "paths", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId) + ux_specification_types_1.QUICKVARPATH
        }
    })
], QuickVariantSelectionV4OP.prototype, "hideTableTitle", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId) => (0, application_1.getTableSettingsPathForOP)(pageName, manifest, sectionId) + ux_specification_types_1.QUICKVARPATH
        }
    })
], QuickVariantSelectionV4OP.prototype, "showCounts", void 0);
class ObjectPageTable {
}
exports.ObjectPageTable = ObjectPageTable;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "type", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP,
            import: (tableSettings) => {
                const value = tableSettings['creationMode'];
                if (typeof value === 'object') {
                    return value;
                }
                else if (typeof value === 'string') {
                    return {
                        name: value
                    };
                }
            }
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "creationMode", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP,
            import: (tableSettings) => {
                const value = tableSettings['personalization'];
                if (typeof value === 'object') {
                    return value;
                }
                else if (typeof value === 'boolean') {
                    return {
                        column: value,
                        sort: value,
                        filter: value
                    };
                }
            }
        }
    }),
    (0, decorators_1.validity)({
        since: '1.86.0'
    })
], ObjectPageTable.prototype, "personalization", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "selectionMode", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "selectAll", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "selectionLimit", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    }),
    (0, decorators_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/4bab6f2043814257974b52d4dafe1dcd')
], ObjectPageTable.prototype, "enableExport", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "quickVariantSelection", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    }),
    (0, decorators_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/f3cc057e405c4fd58ee2ed42c557797c')
], ObjectPageTable.prototype, "condensedTableLayout", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.86.0'
    })
], ObjectPageTable.prototype, "enableFullScreen", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getTableSettingsPathForOP
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], ObjectPageTable.prototype, "enablePaste", void 0);
//# sourceMappingURL=ObjectPageTable.js.map