import { LuiButtonProps } from '@linzjs/lui/dist/components/LuiButton/LuiButton'; import { IconName } from '@linzjs/lui/dist/components/LuiIcon/LuiIcon'; import { PropsWithChildren, ReactElement } from 'react'; import { LuiModalAsyncProps } from './LuiModalAsync'; import { LuiModalAsyncCallback, PromiseWithResolve } from './LuiModalAsyncContext'; export type PrefabType = 'outline' | 'success' | 'info' | 'warning' | 'error' | 'progress' | 'blocked'; export interface LuiModalAsyncPrefabButton { default?: boolean; className?: string; level?: LuiButtonProps['level']; intent?: LuiButtonProps['intent']; disabled?: boolean; loading?: boolean; title: string; icon?: IconName; iconRight?: IconName; value?: RT; } export interface useLuiModalPrefabProps extends LuiModalAsyncProps { showOnAllWindows?: boolean; level: PrefabType; title: string; helpLink?: string; onHelpClick?: () => void; buttons?: LuiModalAsyncPrefabButton[]; dontShowAgainSessionKey?: string; polledCloseCondition?: () => boolean; } export interface LuiModalAsyncPrefabProps extends useLuiModalPrefabProps, LuiModalAsyncCallback { } export declare const getIconForLevel: (level: PrefabType) => IconName | 'custom_progress' | null; export declare const LuiModalDontShowSessionSet: (userKey: string) => void; export declare const LuiModalDontShowSessionRemove: (userKey: string) => void; export declare const LuiModalDontShowSessionCheck: (userKey: string) => boolean; /** * A generic template for common types of modals. */ export declare const LuiModalPrefab: (props: PropsWithChildren>) => ReactElement; /** * Instantiate a generic template for common types of modals. * * Usage: * const { modalOwnerRef, showPrefabModal } = useLuiModalPrefab(); * * return ( * */ export declare const useLuiModalPrefab: () => { modalOwnerRef: import("react").MutableRefObject; showPrefabModal: (props: PropsWithChildren>) => PromiseWithResolve; };