import { jsx as _jsx } from "react/jsx-runtime";
import { memo, useMemo } from 'react';
import { FormInputType, VerbForm } from '../verbForm/VerbForm.js';
import { inputColumnList } from '../verbForm/VerbFormFactories.js';
/**
 * Provides inputs for a Spread step.
 */ export const SpreadBase = /*#__PURE__*/ memo(function SpreadBase({ step , onChange , columns  }) {
    const inputs = useMemo(()=>[
            inputColumnList(step, columns, 'Columns to spread'),
            {
                label: 'Split delimiter',
                type: FormInputType.Text,
                current: step.args.delimiter,
                onChange: (s, val)=>s.args.delimiter = val
            },
            {
                label: 'Onehot encode values',
                type: FormInputType.Checkbox,
                current: step.args.onehot,
                onChange: (s, val)=>s.args.onehot = val,
                styles: {
                    root: {
                        marginTop: 8
                    }
                }
            }, 
        ], [
        step,
        columns
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        inputs: inputs,
        step: step,
        onChange: onChange
    });
});
