import { jsx as _jsx } from "react/jsx-runtime";
import { memo, useMemo } from 'react';
import { createRowEntries } from '../verbForm/createRowEntries.js';
import { VerbDescription } from '../verbForm/VerbDescription.js';
export const OrderbyDescription = /*#__PURE__*/ memo(function OrderbyDescription(props) {
    const rows = useMemo(()=>{
        const { step: { args  } ,  } = props;
        const sub = createRowEntries(args.orders || [], (o)=>({
                value: o.column,
                after: o.direction
            }), 1, props);
        return [
            {
                before: 'order',
                value: args.orders?.length === 0 ? undefined : '',
                sub
            }, 
        ];
    }, [
        props
    ]);
    return /*#__PURE__*/ _jsx(VerbDescription, {
        ...props,
        rows: rows
    });
});
