import { MutableRefObject, PropsWithChildren, ReactElement } from 'react'; import { ShowModalProps } from './LuiModalAsyncContext'; export interface LuiModalAsyncInstance { uuid: string; ownerRef: MutableRefObject; componentInstance: ReactElement; resolve: (result: any) => void; showModalProps?: ShowModalProps; } /** * Provides the ability to show modals using react components without needing useState boilerplate and inline dialogs. * * To use: *
    *
  1. Add this Provider somewhere in your standard providers *
     * 
     *    ...children
     * 
     * 
    *
  2. *
  3. Add the modal return type to the element as below, and use the props resolve/close from ModalProps for results. *
     * export interface SomeModalProps extends ModalProps {
     *   someProp?: number; // user props
     * }
     *
     * export const SomeModal = ({initialState, resolve, close}: SomeModalProps): ReactElement => {
     *    return Modal(
     *       
    * Itsa me, I'm a modal * * *
    * )} * } *
    *
  4. *
  5. To show the dialog and get the result... *
     *   // Note: modalOwnerRef is only required if you need to support popout windows
     *   const { showModal, modalOwnerRef  } = useShowAsyncModal();
     *   ...
     *   const showModal = () => {
     *     const result = await showModal(SomeModal, { someProp: 1 });
     *     if (!result) return; // modal cancelled
     *   }
     *
     *   return 
     * 
    *
  6. *
*/ export declare const LuiModalAsyncContextProvider: ({ children }: PropsWithChildren) => ReactElement;