/*!
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project.
 */ import { jsx as _jsx } from "react/jsx-runtime";
import { ParseType } from '@datashaper/schema';
import { memo, useMemo } from 'react';
import { VerbDescription } from '../verbForm/VerbDescription.js';
export const ConvertDescription = /*#__PURE__*/ memo(function ConvertDescription(props) {
    const rows = useMemo(()=>{
        const { step: { args  } ,  } = props;
        return [
            {
                before: `convert column`,
                value: args.column
            },
            {
                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
    });
});
