import React, { FunctionComponent, ReactNode } from "react"; import * as ButtonComps from "../../v2/components/Buttons"; export interface ActionItem { display: string; icon?: string; onClick?: (e: React.MouseEvent) => void; confirmAction?: { title?: string; message?: string; onConfirm?: () => void; }; disabled?: boolean; infoTooltip?: { text?: string; popOutOfOverflowHiddenParent?: boolean; position?: "top" | "bottom" | "left" | "right"; }; } export interface CustomSelectCompProps { active: boolean; onClick: () => void; } export interface ActionMenuProps { icon?: string; invert?: boolean; actions: ActionItem[]; align?: "left" | "right" | "center"; iconSize?: "S" | "M"; M?: boolean; ButtonComp?: keyof typeof ButtonComps; setShowActions?: React.Dispatch>; popOutOfOverflowHiddenParent?: boolean; CustomSelectComp?: ReactNode | FunctionComponent; storybookPreview?: boolean; } /** * @component Renders an action menu component with customizable text and styling. * * - The props object containing the following properties: * @prop {string} icon: The name of the icon to be displayed. Defaults to "DotsThree". * @prop {boolean} invert: A boolean indicating whether to invert the action menu colors. Defaults to false. * @prop {ActionItem[]} actions: An array of action items to be displayed in the action menu. * @prop {"left" | "right" | "center"} align: The alignment of the action menu relative to its parent element. Defaults to "right". * @prop {"S" | "M"} iconSize: The size of the icon. Defaults to "S". * @prop {boolean} M: A boolean indicating whether to use the medium sized buttons. Defaults to false. * @prop {keyof typeof ButtonComps} ButtonComp: The name of the button component to use for each action item. Defaults to "ButtonGhost". * @prop {React.Dispatch>} setShowActions: A callback function to set the expanded state of the action menu. * @prop {boolean} popOutOfOverflowHiddenParent: A boolean indicating whether the action menu should pop out of an overflow:hidden parent element. Defaults to false. * @prop {React.ReactNode | React.FunctionComponent} CustomSelectComp: A custom select component to use instead of the default select component. * @prop {boolean} storybookPreview: A boolean indicating whether the component is being rendered in storybook. Defaults to false. * @return {ReactElement} The rendered action menu component. */ export declare const ActionMenu: FunctionComponent;