import { AggregateDescription, BinarizeDescription, BinDescription, BooleanLogicDescription, ColumnListOperationDescription, ConvertDescription, DeriveDescription, EraseDescription, FetchDescription, FillDescription, FilterDescription, FoldDescription, ImputeDescription, JoinDescription, LookupDescription, MergeDescription, NoParametersDescription, OneHotDescription, OrderbyDescription, PivotDescription, RecodeDescription, RenameDescription, RollupDescription, SampleDescription, SetOperationDescription, SpreadDescription, UnfoldDescription, WindowDescription } from './verbDescriptions/index.js';
const descriptions = {
    aggregate: AggregateDescription,
    bin: BinDescription,
    binarize: BinarizeDescription,
    boolean: BooleanLogicDescription,
    concat: SetOperationDescription,
    convert: ConvertDescription,
    dedupe: ColumnListOperationDescription,
    derive: DeriveDescription,
    difference: SetOperationDescription,
    erase: EraseDescription,
    fetch: FetchDescription,
    fill: FillDescription,
    filter: FilterDescription,
    fold: FoldDescription,
    groupby: ColumnListOperationDescription,
    impute: ImputeDescription,
    intersect: SetOperationDescription,
    join: JoinDescription,
    lookup: LookupDescription,
    merge: MergeDescription,
    onehot: OneHotDescription,
    orderby: OrderbyDescription,
    pivot: PivotDescription,
    recode: RecodeDescription,
    rename: RenameDescription,
    rollup: RollupDescription,
    sample: SampleDescription,
    select: ColumnListOperationDescription,
    spread: SpreadDescription,
    unfold: UnfoldDescription,
    ungroup: NoParametersDescription,
    union: SetOperationDescription,
    unorder: NoParametersDescription,
    unroll: ColumnListOperationDescription,
    window: WindowDescription
};
/**
 * Given a Step definition, returns the correct React Description component function.
 * This is essentially a compact read-only description of the step parameters
 * @param step -
 */ export function selectStepDescription(step) {
    const result = descriptions[step.verb];
    if (!result) {
        throw new Error(`could not find step with verb ${step?.verb}`);
    }
    return result;
}
