import React from 'react';
export const usePredicateDef = (operator, qlPredicateDefs) => {
    const predicateDef = React.useMemo(() => {
        if (!operator) {
            return null;
        }
        return qlPredicateDefs.find((predicateDef) => predicateDef.operator === operator) ?? null;
    }, [operator]);
    return predicateDef;
};
