import { jsx as s } from "@emotion/react/jsx-runtime";
import { useFormContext as n, useController as m } from "react-hook-form";
import { HelperError as l } from "../../HelperError/HelperError.js";
function p(e) {
  const { name: o } = e, { control: t } = n(), { fieldState: r } = m({
    name: o,
    control: t,
    rules: { required: !0 }
  });
  return r?.error?.message ? /* @__PURE__ */ s(l, { message: r?.error?.message }) : null;
}
export {
  p as RHFHelperError
};
