import { jsx as _jsx } from "react/jsx-runtime";
import { NodeInput } from '@essex/dataflow';
import { memo } from 'react';
import { useDataTable, useTableColumnNames, useTableNames } from '../hooks/index.js';
import { JoinBase } from './Join.base.js';
/**
 * Provides inputs for a Join step.
 */ export const Join = /*#__PURE__*/ memo(function Join({ step , graph , input , onChange ,  }) {
    const tableNames = useTableNames(graph);
    const leftTable = useDataTable(input || step.input[NodeInput.Source]?.node, graph);
    const rightTable = useDataTable(step.input[NodeInput.Other]?.node, graph);
    const leftColumns = useTableColumnNames(leftTable);
    const rightColumns = useTableColumnNames(rightTable);
    return /*#__PURE__*/ _jsx(JoinBase, {
        step: step,
        onChange: onChange,
        tables: tableNames,
        leftColumns: leftColumns,
        rightColumns: rightColumns
    });
});
