import { jsx as _jsx } from "react/jsx-runtime";
import { BinStrategy } from '@data-wrangling-components/core';
import { memo, useMemo } from 'react';
import { VerbDescription } from '../verbForm/VerbDescription.js';
export const BinDescription = /*#__PURE__*/ memo(function BinDescription(props) {
    const rows = useMemo(()=>{
        const { step: { args  } ,  } = props;
        return [
            {
                before: 'column',
                value: args.column,
                sub: [
                    {
                        before: 'using',
                        value: args.strategy,
                        after: 'strategy',
                        sub: args.strategy && args.strategy !== BinStrategy.Auto ? [
                            {
                                value: args.strategy === BinStrategy.FixedCount ? args.fixedcount : args.fixedwidth,
                                after: args.strategy === BinStrategy.FixedCount ? 'bins' : 'bin width'
                            },
                            {
                                before: 'min',
                                value: args.min
                            },
                            {
                                before: 'max',
                                value: args.max
                            },
                            {
                                value: args.clamped ? 'clamped' : 'not clamped'
                            }, 
                        ] : undefined
                    },
                    {
                        before: 'output type',
                        value: args.printRange ? 'printed range' : 'numeric'
                    }, 
                ]
            }, 
        ];
    }, [
        props
    ]);
    return /*#__PURE__*/ _jsx(VerbDescription, {
        ...props,
        rows: rows
    });
});
