import * as React from "react";
import y from "../../../../../../../../../_virtual/index12.js";
import { useControllableState } from "../../../../../../../@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.1.13_react@19.1.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
import { segmentedControlRootPropDefs as o } from "./segmented-control.props.js";
import { extractProps as v } from "../helpers/extract-props.js";
import { marginPropDefs as r } from "../props/margin.props.js";
import { Root as Root2, Item as Item2 } from "../../../../../../../@radix-ui_react-toggle-group@1.1.11_@types_react-dom@19.1.9_@types_react@19.1.13__@type_70b0697ad69d828e63f39eb7d4cde3cc/node_modules/@radix-ui/react-toggle-group/dist/index.js";
const p = React.forwardRef((o$1, t) => {
  const { className: r$1, children: n, radius: d, value: i, defaultValue: g, onValueChange: f, ...P } = v(o$1, o, r), [u, C] = useControllableState({ prop: i, onChange: f, defaultProp: g });
  return React.createElement(Root2, { "data-disabled": o$1.disabled || void 0, "data-radius": d, ref: t, className: y("rt-SegmentedControlRoot", r$1), onValueChange: (s) => {
    s && C(s);
  }, ...P, type: "single", value: u, asChild: false, disabled: !!o$1.disabled }, n, React.createElement("div", { className: "rt-SegmentedControlIndicator" }));
});
p.displayName = "SegmentedControl.Root";
const l = React.forwardRef(({ children: o2, className: t, ...r2 }, n) => React.createElement(Item2, { ref: n, className: y("rt-reset", "rt-SegmentedControlItem", t), ...r2, disabled: false, asChild: false }, React.createElement("span", { className: "rt-SegmentedControlItemSeparator" }), React.createElement("span", { className: "rt-SegmentedControlItemLabel" }, React.createElement("span", { className: "rt-SegmentedControlItemLabelActive" }, o2), React.createElement("span", { className: "rt-SegmentedControlItemLabelInactive", "aria-hidden": true }, o2))));
l.displayName = "SegmentedControl.Item";
export {
  l as Item,
  p as Root
};
//# sourceMappingURL=segmented-control.js.map
