import React from 'react';
import { IconStringList } from '../../module';
import { ConfirmationPopoverContentProps } from '../ConfirmationPopover/ConfirmationPopoverContent';
import { TooltipProps } from '../Tooltip/Tooltip';
import SingleCsv from '../CsvExport/SingleCsv';
export type MenuActionPropsBase = {
    /** Optionally style the action `text` and `icon` as red */
    destructive?: boolean;
    /** Optionally add a divider above an action. This should only be used for a single action. If there are multiple actions that should appear after the divider, make sure those actions appear after the action that has this prop. */
    hasDivider?: boolean;
    /** Optionally disable an action */
    disabled?: {
        /** The current value of the disabled prop */
        value: boolean;
        /** Optionally show a tooltip when an action is disabled */
        tooltip?: Omit<TooltipProps, 'children'>;
    };
    /** Optionally show a confirmation when selecting an option */
    confirmation?: Omit<ConfirmationPopoverContentProps, 'cancelCallout'>;
};
type MenuActionPropsStandard = MenuActionPropsBase & {
    /** Optional icon to appear to the left of the `text` */
    icon?: IconStringList;
    /** Text displayed for an action */
    text: string;
    /** Function callout for an action */
    callout?: () => void;
    toggle?: never;
    csv?: never;
};
type MenuActionPropsWithLink = MenuActionPropsStandard & {
    /** If a `link` is provided, then the Button will render as='link' */
    link: string;
    /** Router component to use for the link */
    routerComponent: React.ElementType;
    /** Router prop to use for the link */
    routerProp: string;
    setLoading?: never;
    loading?: never;
};
type MenuActionPropsWithoutLink = MenuActionPropsStandard & {
    link?: never;
    routerComponent?: never;
    routerProp?: never;
    setLoading?: never;
    loading?: never;
};
export type MenuActionPropsWithToggle = MenuActionPropsBase & {
    /** Optional icon to appear to the left of the `text` */
    icon?: IconStringList;
    /** Text displayed for an action */
    text: string;
    callout?: never;
    /** `Toggle` to appear to the right of the `text` */
    toggle: {
        checked: boolean;
        callout: (value: boolean) => void;
    };
    csv?: never;
    link?: never;
    routerComponent?: never;
    routerProp?: never;
    setLoading?: never;
    loading?: never;
};
type SingleCsvProps = React.ComponentProps<typeof SingleCsv>;
type MenuActionPropsWithCSV = MenuActionPropsBase & {
    /** CSV action */
    csv: SingleCsvProps['csv'];
    text?: never;
    callout?: never;
    toggle?: never;
    icon?: never;
    link?: never;
    routerComponent?: never;
    routerProp?: never;
    /** Callback to update the state indicating change in download. */
    setLoading?: SingleCsvProps['setLoading'];
    /** State indicating download status */
    loading?: SingleCsvProps['loading'];
};
export type MenuActionProps = MenuActionPropsWithToggle | MenuActionPropsWithCSV | MenuActionPropsWithLink | MenuActionPropsWithoutLink;
export interface MenuProps {
    /** Array of actions to used for the Menu */
    actions: MenuActionProps[];
    /** A close function is often required to close a popover where the Menu is being used. */
    close?: () => void;
    /** This tells the consuming component when the form state is being changed so that component can re-render correctly. Only used when there is a confirmation option. */
    reRenderView?: () => void;
    /** This is used to close the confirmation within a popover. */
    closeConfirmation?: boolean;
}
declare const Menu: ({ actions, close, reRenderView, closeConfirmation, }: MenuProps) => JSX.Element;
export default Menu;
export declare const IconAndName: ({ icon, text, }: Pick<MenuActionProps, "icon" | "text">) => React.JSX.Element;
