import { getTopLevelPredicate } from "../commonHelpers/getTopLevelPredicate";
/**
 * @private
 * Extracts the flatten value that the search should be filtered by.
 * Also validates that the flatten predicate is not combined in some
 * invalid way with other predicates.
 *
 * @param query query to extract the flatten predicate from
 * @returns the flatten value to filter by
 */
export function getFlattenQueryParam(query) {
    const flattenPredicate = getTopLevelPredicate("flatten", query.filters);
    return flattenPredicate === null || flattenPredicate === void 0 ? void 0 : flattenPredicate.flatten;
}
//# sourceMappingURL=getFlattenQueryParam.js.map