import { jsx as _jsx } from "react/jsx-runtime";
import { ParseType } from '@data-wrangling-components/core';
import { memo, useMemo } from 'react';
import { createRowEntries } from '../verbForm/createRowEntries.js';
import { VerbDescription } from '../verbForm/VerbDescription.js';
export const ConvertDescription = /*#__PURE__*/ memo(function ConvertDescription(props) {
    const rows = useMemo(()=>{
        const { step: { args  } ,  } = props;
        const sub = createRowEntries(args.columns, (c)=>({
                value: c
            }), 3, props);
        return [
            {
                before: `convert column${args.columns?.length !== 1 ? 's' : ''}`,
                value: args.columns.length === 0 ? undefined : '',
                sub
            },
            {
                before: 'to type',
                value: args.type,
                sub: args.type === ParseType.Integer ? [
                    {
                        before: 'with base',
                        value: args.radix
                    }, 
                ] : undefined
            }, 
        ];
    }, [
        props
    ]);
    return /*#__PURE__*/ _jsx(VerbDescription, {
        ...props,
        rows: rows
    });
});
