import { jsx as e, jsxs as a } from "react/jsx-runtime";
import c from "react";
import p from "../../Form.js";
import u from "../../hooks/useZodForm.js";
import r from "../../../box/Box.js";
import f from "../../../text/Text.js";
import o from "../../../field/Field.js";
import s from "../../../field/components/field-label/FieldLabel.js";
import i from "../../../field/components/field-control/FieldControl.js";
import l from "../../../simple-input/SimpleInput.js";
import g from "../../../button/Button.js";
import { o as h, s as m } from "../../../../types-Brp6Qwfh.js";
const b = h({
  email: m().email({ message: "Please enter a valid email address" }),
  password: m().min(1, { message: "Password is required" })
}), T = () => {
  const t = u({
    schema: b,
    defaultValues: { email: "", password: "" }
  }), n = c.useCallback((d) => {
    console.log(d), alert("Login form submitted successfully!");
  }, []);
  return /* @__PURE__ */ e(r, { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ a(r, { className: "w-[var(--spacing-96)] p-[var(--spacing-6)] bg-[var(--base-background)] rounded-[var(--border-radius-lg)] shadow-md", children: [
    /* @__PURE__ */ e(f, { type: "h2", align: "center", children: "Login" }),
    /* @__PURE__ */ e(r, { className: "mt-[var(--spacing-4)]", children: /* @__PURE__ */ e(p, { form: t, onSubmit: n, children: /* @__PURE__ */ a(r, { className: "flex flex-col gap-[var(--spacing-4)]", children: [
      /* @__PURE__ */ a(o, { name: "email", children: [
        /* @__PURE__ */ e(s, { required: !0, children: "Email" }),
        /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(l, { type: "email", placeholder: "Enter your email" }) })
      ] }),
      /* @__PURE__ */ a(o, { name: "password", children: [
        /* @__PURE__ */ e(s, { required: !0, children: "Password" }),
        /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(l, { type: "password", placeholder: "Enter your password" }) })
      ] }),
      /* @__PURE__ */ e(r, { className: "pt-[var(--spacing-2)]", children: /* @__PURE__ */ e(g, { variant: "default", type: "submit", label: "Login" }) })
    ] }) }) })
  ] }) });
};
export {
  T as default
};
//# sourceMappingURL=LoginFormWrapper.js.map
