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