"use client";
import * as React from "react";
import { useButton } from "../use-button/useButton.js";
import { useRenderElement } from "../utils/useRenderElement.js";
const Button = /* @__PURE__ */ React.forwardRef(function Button2(componentProps, forwardedRef) {
  const {
    render,
    className,
    disabled: disabledProp = false,
    focusableWhenDisabled = false,
    nativeButton = true,
    ...elementProps
  } = componentProps;
  const disabled = Boolean(disabledProp);
  const {
    getButtonProps,
    buttonRef
  } = useButton({
    disabled,
    focusableWhenDisabled,
    native: nativeButton
  });
  const state = React.useMemo(() => ({
    disabled
  }), [disabled]);
  return useRenderElement("button", componentProps, {
    state,
    ref: [forwardedRef, buttonRef],
    props: [elementProps, getButtonProps]
  });
});
if (process.env.NODE_ENV !== "production") Button.displayName = "Button";
export {
  Button
};
//# sourceMappingURL=Button.js.map
