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 { LookupBase } from './Lookup.base.js';
/**
 * Provides inputs for a Lookup step.
 */ export const Lookup = /*#__PURE__*/ memo(function Lookup({ step , graph , onChange  }) {
    const leftTable = useDataTable(step.input[NodeInput.Source]?.node, graph);
    const rightTable = useDataTable(step.input[NodeInput.Other]?.node, graph);
    const tables = useTableNames(graph);
    const leftColumns = useTableColumnNames(leftTable);
    const rightColumns = useTableColumnNames(rightTable);
    return /*#__PURE__*/ _jsx(LookupBase, {
        step: step,
        onChange: onChange,
        tables: tables,
        leftColumns: leftColumns,
        rightColumns: rightColumns
    });
});
