"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.CustomFilterField = exports.CustomFilterFieldPosition = exports.VisualFilter = exports.FilterBar = void 0;
const decorators_1 = require("../../../common/decoration/decorators");
const application_1 = require("../../application");
/**
 * Updates the manifest section with the value list from the configuration object.
 *
 * @param manifestSection - The section of the manifest to be updated
 * @param configObject - The configuration object containing the data
 * @param key - The key in the configuration object to retrieve the value
 * @param manifestKey - The key in the manifest section to update (optional)
 */
function exportVisualFilterValueList(manifestSection, configObject, key, manifestKey) {
    if (manifestSection[manifestKey]) {
        manifestSection[manifestKey].valueList = configObject[key];
    }
    else {
        manifestSection[manifestKey] = { valueList: configObject[key] };
    }
}
class FilterBar {
}
exports.FilterBar = FilterBar;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getSelectionFieldsPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.93.0'
    }),
    (0, decorators_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/33f3d807c10b47d9a8141692d2619dc2')
], FilterBar.prototype, "initialLayout", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getSelectionFieldsPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.93.0'
    }),
    (0, decorators_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/33f3d807c10b47d9a8141692d2619dc2')
], FilterBar.prototype, "layout", void 0);
class VisualFilter {
}
exports.VisualFilter = VisualFilter;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getFilterFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.93.0'
    }),
    (0, decorators_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/33f3d807c10b47d9a8141692d2619dc2')
], VisualFilter.prototype, "availability", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getFilterFieldPath,
            import: (manifestSection) => manifestSection?.['visualFilter']?.['valueList'],
            export: exportVisualFilterValueList,
            key: 'visualFilter'
        }
    }),
    (0, decorators_1.validity)({
        since: '1.93.0'
    })
], VisualFilter.prototype, "visualFilterValueList", void 0);
class CustomFilterFieldPosition {
}
exports.CustomFilterFieldPosition = CustomFilterFieldPosition;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId, columnKey) => (0, application_1.getCustomFilterFieldFieldPath)(pageName, manifest, sectionId, columnKey) + '/position'
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], CustomFilterFieldPosition.prototype, "anchor", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: (pageName, manifest, sectionId, columnKey) => (0, application_1.getCustomFilterFieldFieldPath)(pageName, manifest, sectionId, columnKey) + '/position'
        }
    }),
    (0, decorators_1.validity)({
        since: '1.84.0'
    })
], CustomFilterFieldPosition.prototype, "placement", void 0);
class CustomFilterField {
}
exports.CustomFilterField = CustomFilterField;
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getCustomFilterFieldFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.77.0'
    })
], CustomFilterField.prototype, "label", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getCustomFilterFieldFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.77.0'
    })
], CustomFilterField.prototype, "property", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getCustomFilterFieldFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.77.0'
    })
], CustomFilterField.prototype, "template", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getCustomFilterFieldFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.77.0'
    })
], CustomFilterField.prototype, "required", void 0);
__decorate([
    (0, decorators_1.syncRule)({
        manifest: {
            path: application_1.getCustomFilterFieldFieldPath
        }
    }),
    (0, decorators_1.validity)({
        since: '1.77.0'
    })
], CustomFilterField.prototype, "position", void 0);
//# sourceMappingURL=FilterBar.js.map