import { ButtonCommonProps, CommonProps, Refable, type Styleable } from "@trackunit/react-components"; import { ReactElement, RefObject } from "react"; export type ActionType = "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL" | "COPY" | "EDIT"; interface AbstractActionButtonProps extends Omit, CommonProps, Refable, Styleable { /** * The type of action performed when clicking the button. */ type: ActionType; /** * The value to be passed into the button. */ value?: string | RefObject | null; /** * The title of the action button. */ title: string; } interface GenericActionButtonProps extends AbstractActionButtonProps { /** * The type of action performed when clicking the button. */ type: "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL"; /** * The value to be passed into the button. */ value?: string | null; } interface CopyActionButtonProps extends AbstractActionButtonProps { /** * The type of action performed when clicking the button. */ type: "COPY"; /** * The value to be passed into the button. */ value?: RefObject; } interface EditActionButtonProps extends AbstractActionButtonProps { /** * The type of action performed when clicking the button. */ type: "EDIT"; /** * The value to be passed into the button. */ value?: RefObject; } type ActionButtonProps = CopyActionButtonProps | GenericActionButtonProps | EditActionButtonProps; /** * The ActionButton component is a wrapper over IconButton to perform an action when the onClick event is triggered. * * @param {ActionButtonProps} props - The props for the ActionButton component * @returns {ReactElement} ActionButton component */ export declare const ActionButton: ({ type, value, "data-testid": dataTestId, size, disabled, className, title, style, ref, }: ActionButtonProps) => ReactElement; export {};