import { jsx as _jsx } from "react/jsx-runtime";
import { WindowFunction } from '@data-wrangling-components/core';
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 WindowBase = /*#__PURE__*/ memo(function WindowBase({ step , onChange  }) {
    const inputs = useMemo(()=>[
            enumDropdown('Function', WindowFunction, step.args.operation, (s, val)=>s.args.operation = val, {
                required: true,
                placeholder: 'Choose function'
            }), 
        ], [
        step
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        inputs: inputs,
        step: step,
        onChange: onChange
    });
});
