/*!
 * 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 { FieldAggregateOperation } from '@datashaper/schema';
import { memo, useMemo } from 'react';
import { VerbForm } from '../verbForm/VerbForm.js';
import { enumDropdown } from '../verbForm/VerbFormFactories.js';
/**
 * Just the column/op inputs for an rollup.
 * Input table is expected to be edited elsewhere and configured as the step input.
 */ export const RollupBase = /*#__PURE__*/ memo(function RollupBase({ step , onChange  }) {
    const inputs = useMemo(()=>[
            enumDropdown('Function', FieldAggregateOperation, step.args.operation, (s, val)=>s.args.operation = val, {
                required: true
            })
        ], [
        step
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        inputs: inputs,
        step: step,
        onChange: onChange
    });
});
