import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
const noop = ()=>{
// do nothing
};
/**
 * **Server Component**
 *
 * This is probably one of the least useful components available as it doesn't
 * do much styling or logic. All this form component will do is add basic flex
 * behavior and prevent the default form submit behavior.
 */ export const Form = /*#__PURE__*/ forwardRef(function Form(props, ref) {
    const { children, onSubmit = noop, disablePreventDefault = false, ...remaining } = props;
    return /*#__PURE__*/ _jsx("form", {
        ...remaining,
        onSubmit: (event)=>{
            if (!disablePreventDefault) {
                event.preventDefault();
            }
            onSubmit(event);
        },
        ref: ref,
        children: children
    });
});

//# sourceMappingURL=Form.js.map