import React, { forwardRef } from "react";
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
import { useRipple } from "../../../utils/useRipple.js";
import { StyledButton } from "./Button.styled.js";
const Button = forwardRef((props, ref) => {
    const { children, onPointerDown, onKeyDown, ...rest } = props;
    const innerRef = useForwardedRef(ref);
    const ripple = useRipple({ ref: innerRef, onPointerDown, onKeyDown });
    return (React.createElement(StyledButton, { ref: innerRef, onPointerDown: ripple.onPointerDown, onKeyDown: ripple.onKeyDown, ...rest },
        children,
        ripple.ripples));
});
Button.displayName = "Button";
Button.toString = () => StyledButton.toString();
export { Button, };
//# sourceMappingURL=Button.js.map