import { jsx as n } from "@emotion/react/jsx-runtime";
import { withToggle as p } from "../../../../hocs/withToggle/index.js";
import { getComponentSlotRoot as i } from "../../../../utils/getComponentSlotRoot.js";
import { getPropDataTestId as T } from "../../../../test/getNameDataTestId.js";
import s from "clsx";
import { TOGGLE_BUTTON_KEY_COMPONENT as o } from "./constants.js";
import { ToggleButtonRootStyled as f } from "./slots/ToggleButtonSlots.js";
import { ToggleButtonSlots as u } from "./slots/ToggleButtonEnum.js";
const c = ({
  onToggle: t,
  isToggled: r,
  children: e,
  dataTestId: m,
  ...g
}) => {
  const l = {
    isToggled: r
  };
  return /* @__PURE__ */ n(
    f,
    {
      className: s(i(o)),
      ...T(o, u.toggleButtonRoot, m),
      role: "toggle-button",
      ...g,
      ownerState: l,
      onClick: t,
      children: e
    }
  );
}, R = p(c);
export {
  R as ToggleButton
};
