/*!
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project.
 */ import { jsx as _jsx } from "react/jsx-runtime";
import { BooleanOperator } from '@datashaper/schema';
import { memo, useMemo } from 'react';
import { VerbForm } from '../verbForm/VerbForm.js';
import { enumDropdown } from '../verbForm/VerbFormFactories.js';
/**
 * Inputs to combine column using boolean logic.
 */ export const BooleanLogicBase = /*#__PURE__*/ memo(function BooleanLogicBase({ step , onChange  }) {
    const inputs = useMemo(()=>[
            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',
                xnor: 'XNOR'
            })
        ], [
        step
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        step: step,
        onChange: onChange,
        inputs: inputs
    });
});
