import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { useTestIds, useUID } from '../../hooks';
import MultiStepForm from '../MultiStepForm';
import { withTestIds } from '../../utils';
import { getFormTestIds } from './Form.test-ids';
const Form = forwardRef(function Form({ testId, children, actions, progress, heading, label, description, banners, ...restProps }, ref) {
    const stepId = useUID();
    const testIds = useTestIds(testId, getFormTestIds);
    return (_jsx(MultiStepForm, { "data-testid": testIds.root, autoComplete: '_off', ...restProps, heading: heading, steps: [
            {
                id: stepId,
                name: label ?? '',
                actions,
                content: children,
                description,
                banners
            }
        ], currentStepId: stepId, progress: progress, ref: ref }));
});
export default withTestIds(Form, getFormTestIds);
//# sourceMappingURL=Form.js.map