"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reset = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
var antd_1 = require("antd");
function Reset(_a) {
    var addBox = _a.addBox, router = _a.router, form = _a.form, onChange = _a.onChange;
    return ((0, jsx_runtime_1.jsxs)(antd_1.Form.Item, __assign({ wrapperCol: { offset: 0, span: 24 } }, { children: [addBox, router.query.id == null && ((0, jsx_runtime_1.jsx)(antd_1.Popconfirm, __assign({ title: "Reset all values to their default?", onConfirm: function () {
                    form.resetFields();
                    onChange();
                } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ style: { float: "right" } }, { children: "Reset Form" })) })))] })));
}
exports.Reset = Reset;
//# sourceMappingURL=reset.js.map