import * as React from 'react';
import { ColumnFilterComponent } from './ColumnFilter';
import { useAdaptableFilterWrapper } from './useAdaptableFilterWrapper';
/**
 * This wrapper knows about predicates.
 * It transforms predicates in QlPredicates.
 */
export const AdaptableColumnFilter = (props) => {
    const { qlPredicate, qlPredicateDefs, columnFilter, handlePredicateChange } = useAdaptableFilterWrapper(props.columnId, 'FilterForm');
    return (React.createElement(ColumnFilterComponent, { location: props.location, wrapperProps: props.wrapperProps, columnId: props.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: React.useCallback((predicate) => {
            handlePredicateChange(predicate);
        }, [handlePredicateChange]) }));
};
