// (C) 2024-2026 GoodData Corporation
import { filterAttributeElements, getAttributeElementsItems, isArbitraryAttributeFilter, isMatchAttributeFilter, isNegativeAttributeFilter, } from "@gooddata/sdk-model";
import { getAttributeFilterSubtitle, getExtendedAttributeFilterSubtitle } from "@gooddata/sdk-ui-filters";
export function translateAttributeFilter(intl, filter) {
    if (isArbitraryAttributeFilter(filter) || isMatchAttributeFilter(filter)) {
        return getExtendedAttributeFilterSubtitle(filter, intl);
    }
    const isNegative = isNegativeAttributeFilter(filter);
    const attributeElements = filterAttributeElements(filter);
    const attributeElementsItems = getAttributeElementsItems(attributeElements);
    return getAttributeFilterSubtitle(isNegative, attributeElementsItems.map((item) => ({ title: item, uri: item })), intl);
}
//# sourceMappingURL=attributeFilterNaming.js.map