import { jsx as _jsx } from "react/jsx-runtime";
import { NodeInput } from '@essex/dataflow';
import { memo, useMemo } from 'react';
import { createRowEntries } from '../verbForm/createRowEntries.js';
import { VerbDescription } from '../verbForm/VerbDescription.js';
export const LookupDescription = /*#__PURE__*/ memo(function LookupDescription(props) {
    const rows = useMemo(()=>{
        const { step: { args  } ,  } = props;
        const sub = createRowEntries(args.columns, (c)=>({
                value: c
            }), 3, props);
        return [
            {
                before: 'lookup from',
                value: props.step.input[NodeInput.Other]?.node
            },
            {
                before: 'on',
                value: args.on?.join(' | ')
            },
            {
                before: 'copy columns',
                value: args.columns.length === 0 ? undefined : '',
                sub
            }, 
        ];
    }, [
        props
    ]);
    return /*#__PURE__*/ _jsx(VerbDescription, {
        ...props,
        rows: rows
    });
});
