// (C) 2025-2026 GoodData Corporation
import { BucketNames } from "@gooddata/sdk-ui";
import { ATTRIBUTE, DATE } from "../../../constants/bucket.js";
import { getItemsFromBuckets } from "../../../utils/bucketHelper.js";
export const shouldAdjustColumnHeadersPositionToTop = (newReferencePoint, rowAttributes, measureGroupDimension) => {
    return (newReferencePoint.properties?.controls?.["columnHeadersPosition"] &&
        (rowAttributes.length > 0 || measureGroupDimension === "columns"));
};
export const getColumnAttributes = (buckets) => {
    return getItemsFromBuckets(buckets, [BucketNames.COLUMNS, BucketNames.STACK, BucketNames.SEGMENT], [ATTRIBUTE, DATE]);
};
export const getRowAttributes = (buckets) => {
    return getItemsFromBuckets(buckets, [
        BucketNames.ATTRIBUTE,
        BucketNames.ATTRIBUTES,
        BucketNames.ATTRIBUTE_FROM,
        BucketNames.ATTRIBUTE_TO,
        BucketNames.VIEW,
        BucketNames.TREND,
        BucketNames.LOCATION,
        BucketNames.AREA,
    ], [ATTRIBUTE, DATE]);
};
//# sourceMappingURL=helpers.js.map