Here is the function itself:
import { h as d } from "./hooks.module.LmwmkJtO.js";
import { l as f } from "./preact.module.B_Hg0Uo-.js";
var c = 0;
function n(t, r, i, s, l, u) {
r || (r = {});
var a,
e,
o = r;
if ("ref" in o)
for (e in o = {}, r)
e == "ref" ? a = r[e] : o[e] = r[e];
var m = {
type: t,
props: o,
key: i,
ref: a,
__k: null,
__: null,
__b: 0,
__e: null,
__c: null,
constructor: void 0,
__v: --c,
__i: -1,
__u: 0,
__source: l,
__self: u
};
if (typeof t == "function" && (a = t.defaultProps))
for (e in a)
o[e] === void 0 && (o[e] = a[e]);
return f.vnode && f.vnode(m), m
}
function b() {
const [t, r] = d("");
async function i(s) {
s.preventDefault();
const l = new FormData(s.target),
a = await (await fetch("/api/feedback", {
method: "POST",
body: l
})).json();
a.message && r(a.message)
}
return n("form", {
onSubmit: i,
children: [n("label", {
children: ["Name", n("input", {
type: "text",
id: "name",
name: "name",
required: !0
})]
}), n("label", {
children: ["Email", n("input", {
type: "email",
id: "email",
name: "email",
required: !0
})]
}), n("label", {
children: ["Message", n("textarea", {
id: "message",
name: "message",
required: !0
})]
}), n("button", {
children: "Send"
}), t && n("p", {
children: t
})]
})
}
export { b as default };