import React, { forwardRef } from "react";
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
import { fnWithProps } from "../../../types/fnWithProps.js";
import { useRipple } from "../../../utils/useRipple.js";
import { Container, StyledButton } from "./ModalButtons.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 = "ModalButtons.Button";
Button.toString = () => StyledButton.toString();
const ModalButtons = fnWithProps(Container, {
    Button,
});
export { ModalButtons, };
//# sourceMappingURL=ModalButtons.js.map