/*! * Copyright (c) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project. */ import type { LookupArgs } from '@datashaper/schema' import { NodeInput } from '@datashaper/workflow' import { memo } from 'react' import { useColumnNames, useTableDropdownOptions, useWorkflowDataTable, } from '../../../../hooks/index.js' import type { StepFormProps } from '../types.js' import { LookupFormBase } from './LookupForm.base.js' import { getInputNode } from '../../../../util.js' /** * Provides inputs for a Lookup step. */ export const LookupForm: React.FC> = memo( function LookupForm({ step, workflow, onChange }) { const leftTable = useWorkflowDataTable( getInputNode(step, NodeInput.Source), workflow, ) const rightTable = useWorkflowDataTable( getInputNode(step, NodeInput.Other), workflow, ) const tableOptions = useTableDropdownOptions(workflow) const leftColumns = useColumnNames(leftTable) const rightColumns = useColumnNames(rightTable) return ( ) }, )