"use client";
import {motion, type HTMLMotionProps, type Transition} from "motion/react";
import * as React from "react";
import {cn} from "@/lib/utilities";
import styles from "./ripple-button.module.css";
interface Ripple {
id: number;
x: number;
y: number;
}
/** Props accepted by {@link RippleButton}. */
export interface RippleButtonProps extends HTMLMotionProps<"button"> {
/** Button contents rendered above the ripple layer. @default undefined */
children: React.ReactNode;
/** Additional CSS classes merged with each generated ripple. @default undefined */
rippleClassName?: string;
/** Final expansion scale applied to each ripple animation. @default 10 */
scale?: number;
/** Motion timing used for each ripple animation. @default {duration: 0.6, ease: "easeOut"} */
transition?: Transition;
}
/**
* Renders a pressable button that emits animated ripples from the click position.
*
* @remarks
* - Animated component using the `motion` library
* - Renders a `