import React, { useMemo } from 'react';
import classnames from 'classnames';
import { operatorOptions } from '@reltio/mdm-sdk';
import { DropDownEditor } from '../DropDownEditor';
import { useFilterSettingsContext } from '../contexts/FilterSettingsContext';
import { useStyles } from './styles';
export var LogicOperator = function (_a) {
    var className = _a.className, value = _a.value, onChange = _a.onChange;
    var classes = useStyles();
    var excludedLogicOperators = useFilterSettingsContext().excludedLogicOperators;
    var entries = useMemo(function () {
        return excludedLogicOperators
            ? operatorOptions.filter(function (_a) {
                var value = _a.value;
                return !(excludedLogicOperators === null || excludedLogicOperators === void 0 ? void 0 : excludedLogicOperators.includes(value));
            })
            : operatorOptions;
    }, [excludedLogicOperators]);
    return (React.createElement(DropDownEditor, { className: classnames(classes.dropDown, className), classes: classes, value: value, entries: entries, onChange: onChange }));
};
