import useAsyncControl from "../../hooks/useAsyncControl";
import { ComponentProps, CSSProperties, PropsWithChildren, ReactElement } from "react";
/**
 * Wraps a component, triggers the provided action onMount, shows loading, and if the action fails and rejects handles the UI for error.
 * Do not use try catch on the action as this component already handles rejections.
 *
 * @example
 * <AsyncTriggerContainer action={anAsyncProcess}>
 *  <>This is only shown when the action finished successfully</>
 * </AsyncTriggerContainer>
 */
/**
 * A component that manages the lifecycle of an asynchronous operation.
 * It displays a loading state while the operation runs, shows the child content
 * when the operation succeeds, and provides a retry option if the operation fails.
 */
export default function AsyncTriggerContainer({ action, children, loadingLabel, className, style, }: PropsWithChildren<{
    action: (() => Promise<any>) | undefined;
    /** Optionally, provide a component to show while loading. If not provided, the global loading label provided at OneUIProvider will be shown.  */
    loadingLabel?: ReactElement;
    className?: string;
    style?: CSSProperties;
}>): import("react/jsx-runtime").JSX.Element;
export declare function AsyncTriggerContainerView({ className, children, style, showContent, control, loadingLabel, }: Pick<ComponentProps<typeof AsyncTriggerContainer>, "className" | "children" | "style" | "loadingLabel"> & {
    showContent: boolean;
    control: ReturnType<typeof useAsyncControl> & {
        action: () => void;
    };
}): import("react/jsx-runtime").JSX.Element;
