import * as e from "react";
import m from "../../../../../../../../../_virtual/index9.js";
import { Root as C, Item as g } from "../../../../../../../@radix-ui_react-toggle-group@1.1.0_@types_react-dom@18.3.6_@types_react@18.3.3__@types__b10e33b51cd126cada778228afbcac05/node_modules/@radix-ui/react-toggle-group/dist/index.js";
import { useControllableState as u } from "../../../../../../../@radix-ui_react-use-controllable-state@1.1.0_@types_react@18.3.3_react@18.3.0-canary-3d9b20132-20240124/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
import { segmentedControlRootPropDefs as I } from "./segmented-control.props.js";
import { extractProps as N } from "../helpers/extract-props.js";
import { marginPropDefs as S } from "../props/margin.props.js";
const R = e.forwardRef((t, a) => {
  const { className: r, children: o, radius: s, value: n, defaultValue: d, onValueChange: c, ...i } = N(t, I, S), [p, f] = u({ prop: n, onChange: c, defaultProp: d });
  return e.createElement(C, { "data-radius": s, ref: a, className: m("rt-SegmentedControlRoot", r), onValueChange: (l) => {
    l && f(l);
  }, ...i, type: "single", value: p, asChild: !1, disabled: !1 }, o, e.createElement("div", { className: "rt-SegmentedControlIndicator" }));
});
R.displayName = "SegmentedControl.Root";
const h = e.forwardRef(({ children: t, className: a, ...r }, o) => e.createElement(g, { ref: o, className: m("rt-reset", "rt-SegmentedControlItem", a), ...r, disabled: !1, asChild: !1 }, e.createElement("span", { className: "rt-SegmentedControlItemSeparator" }), e.createElement("span", { className: "rt-SegmentedControlItemLabel" }, e.createElement("span", { className: "rt-SegmentedControlItemLabelActive" }, t), e.createElement("span", { className: "rt-SegmentedControlItemLabelInactive" }, t))));
h.displayName = "SegmentedControl.Item";
export {
  h as Item,
  R as Root
};
//# sourceMappingURL=segmented-control.js.map
