// (C) 2025 GoodData Corporation
import { useMemo } from "react";
import { useEvaluatedMetricsAndAttributes } from "./useEvaluatedMetricsAndAttributes.js";
import { collectReferences } from "../helpers/references.js";
export function useEvaluatedReferences(value, filters, config) {
    const isEmptyValue = useMemo(() => !value?.replace(/\s/g, ""), [value]);
    const references = useMemo(() => collectReferences(value), [value]);
    const { loading, result: metrics, error: metricsError, } = useEvaluatedMetricsAndAttributes(references, filters, config);
    return {
        isEmptyValue,
        loading,
        metrics,
        error: metricsError,
    };
}
//# sourceMappingURL=useEvaluatedReferences.js.map