import {
    Dispatch,
    HTMLAttributes,
    MutableRefObject,
    SetStateAction,
} from 'react';
import { InteractionEventsType } from './hooks/useRippleEffect';

export type baseDOMRect = {
    width: number;
    height: number;
    left: number;
    top: number;
};

export interface RippleContainer {
    start: (
        event: InteractionEventsType,
        changeStateCallback: (state: boolean) => void,
    ) => void;
    stop: (
        event: InteractionEventsType,
        changeStateCallback: (state: boolean) => void,
    ) => void;
    current: MutableRefObject<HTMLSpanElement>;
}

export interface RipplePropsForComponents<T> extends HTMLAttributes<T> {
    ripple?: boolean;
    centralRipple?: boolean;
}

export interface RippleAreaProps extends HTMLAttributes<HTMLElement> {
    callback?: Dispatch<SetStateAction<boolean>>;
    central?: boolean;
}

export interface RippleProps extends HTMLAttributes<HTMLElement> {
    rippleKey: number;
    rippleX: number;
    rippleY: number;
    rippleS: number;
    lifetime: number;
    endLifetime?: (value: number) => void;
}
