// (C) 2024-2025 GoodData Corporation
import { idRef, isCatalogDateAttributeHierarchy, } from "@gooddata/sdk-model";
/**
 * @internal
 */
export const hierarchyToDrillDownReference = (hierarchy, attribute) => {
    if (isCatalogDateAttributeHierarchy(hierarchy)) {
        return {
            type: "dateHierarchyReference",
            dateHierarchyTemplate: idRef(hierarchy.templateId, "dateHierarchyTemplate"),
            dateDatasetAttribute: attribute,
        };
    }
    else {
        return {
            type: "attributeHierarchyReference",
            attributeHierarchy: hierarchy.attributeHierarchy.ref,
            attribute: attribute,
        };
    }
};
//# sourceMappingURL=drillDown.js.map