import { jsx } from "react/jsx-runtime";
import { useFormContext, Controller } from "react-hook-form";
/* empty css                                                                                                                                                                                       */
/* empty css                                                                                                                                                                                        */
/* empty css                                                                                                                                                                                                */
/* empty css                                                                                                                                                                                           */
/* empty css                                                                                                                                                                                           */
import { SegmentedControl } from "../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/SegmentedControl/SegmentedControl.mjs";
const FormSegmentedControl = ({ name, rules, ...restProps }) => {
  const { control } = useFormContext();
  return /* @__PURE__ */ jsx(
    Controller,
    {
      name,
      control,
      rules,
      render: ({ field: { onChange, value } }) => {
        return /* @__PURE__ */ jsx(SegmentedControl, { value, onChange, ...restProps });
      }
    }
  );
};
export {
  FormSegmentedControl
};
