import { jsx as _jsx } from "react/jsx-runtime";
import { BooleanOperator } from '@data-wrangling-components/core';
import { memo, useMemo } from 'react';
import { VerbForm } from '../verbForm/VerbForm.js';
import { enumDropdown, inputColumnList } from '../verbForm/VerbFormFactories.js';
/**
 * Inputs to combine column using boolean logic.
 */ export const BooleanLogicBase = /*#__PURE__*/ memo(function BooleanLogicBase({ step , onChange , columns  }) {
    const inputs = useMemo(()=>[
            inputColumnList(step, columns),
            enumDropdown('Logical operator', BooleanOperator, step.args.operator, (s, opt)=>s.args.operator = opt, {
                required: true,
                placeholder: 'Choose boolean'
            }, {
                or: 'OR',
                and: 'AND',
                nor: 'NOR',
                nand: 'NAND',
                xor: 'XOR'
            }), 
        ], [
        step,
        columns
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        step: step,
        onChange: onChange,
        inputs: inputs
    });
});
