/*!
 * 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 { CodebookStrategy } from '@datashaper/schema';
import { useMemo } from 'react';
import { VerbForm } from '../verbForm/VerbForm.js';
import { enumDropdown } from '../verbForm/VerbFormFactories.js';
/**
 * Just the group/column/op inputs for an aggregation.
 * Input table is expected to be edited elsewhere and configured as the step input.
 */ export const EncodeDecodeBase = function EncodeDecodeBase({ step , onChange  }) {
    const verbInputs = useMemo(()=>[
            enumDropdown('Codebook strategy', CodebookStrategy, step.args.strategy, (s, opt)=>s.args.strategy = opt, {
                required: true,
                placeholder: 'Choose strategy'
            })
        ], [
        step
    ]);
    return /*#__PURE__*/ _jsx(VerbForm, {
        step: step,
        inputs: verbInputs,
        onChange: onChange
    });
};
