import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button } from '@powerhousedao/design-system';
import { Form } from '../../form/index.js';
import { IdField } from '../../id-field/index.js';
import { NumberField } from '../../number-field/index.js';
import { StringField } from '../../string-field/index.js';
const FormWithResetOnSuccessfulSubmit = () => {
    return (_jsx(Form, { onSubmit: (data) => {
            // eslint-disable-next-line no-alert
            alert(JSON.stringify(data, null, 2));
        }, resetOnSuccessfulSubmit: true, defaultValues: {
            example: '',
            number: 0,
        }, children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(IdField, {}), _jsx(StringField, { name: "example", placeholder: "Type something", label: "Field example", required: true }), _jsx(NumberField, { name: "number", label: "Number", required: true }), _jsx("div", { className: "w-72 text-sm text-gray-500", children: "After submitting the form, all form fields will be reset to their initial values" }), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
};
export default FormWithResetOnSuccessfulSubmit;
//# sourceMappingURL=reset-on-successful-submit.js.map