import { j as jsxRuntimeExports } from "../../../../../../../_virtual/jsx-runtime.js";
import { useId } from "react";
import "../../../../../../../node_modules/.pnpm/@formkit_auto-animate@0.8.2/node_modules/@formkit/auto-animate/index.js";
import "../../../../../../../node_modules/.pnpm/react-hot-toast@2.5.2_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/react-hot-toast/dist/index.js";
import { FieldTitle } from "../field-factory.js";
import { Switch as i } from "../../../../../../../node_modules/.pnpm/@radix-ui_themes@3.2.1_@types_react-dom@19.1.9_@types_react@19.1.13__@types_react@19.1._832fa1fef691e6e9510ada03948dc85c/node_modules/@radix-ui/themes/dist/esm/components/switch.js";
const SwitchField = (props) => {
  const { onChange, title, description, currentValue, brickId } = props;
  const id = useId();
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "switch-field flex items-center justify-between flex-grow gap-4", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(FieldTitle, { htmlFor: id, title, description }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      i,
      {
        id,
        onCheckedChange: (value) => {
          onChange(value);
        },
        size: "2",
        variant: "soft",
        defaultChecked: currentValue
      }
    )
  ] });
};
export {
  SwitchField as default
};
//# sourceMappingURL=switch.js.map
