import { ComponentType } from 'react'; import { Connectable, Scheduler } from '../Connectable'; import { PortalStore } from './PortalStore'; import { ControlledProps, PortalController, PortalDescriptor, PortalOptions, UncontrolledProps, UniqID, UnmountSymbol, UpdatePropsHandler } from './types'; export declare class PortalManager extends Connectable { constructor(scheduler?: Scheduler); /** * you can custom your manager by control this */ protected readonly portalStore: PortalStore; private readonly _feedbackMap; private readonly _uniqIdUtils; /** * open a component with portal (Dialog, snackbar, modal...) * @param Component the component you want to open * @param options some options (id, props...) */ open

(Component: ComponentType>, options?: PortalOptions): PortalController; /** * close all */ closeAll(): void; /** * get portal controller which on top */ getTop

(): PortalController | undefined; /** * get portal controller by id */ getByID

(id: UniqID): PortalController | undefined; /** * check if it's opened by id. equal 'portalController.isOpened' */ isOpened(id: UniqID): boolean; /** * check if it's on top by id. equal 'portalController.isTop' */ isTop(id: UniqID): boolean; /** * for RC component (Modal, component based on modal, snackbar). * invoke this function would set 'open' prop to be false * then unmount component after animation finish * * for non-RC component, you need unmount by self or call unmount directly * * equal 'portalController.close()' */ closeByID(id: UniqID, feedback?: F): void; /** * invoke this to close portal is not recommend, will loss close animation * * this function just help you unmount component after close animation finish * * RC component (Modal, component based on modal, snackbar) would invoke this after close animation finish */ [UnmountSymbol](id: UniqID): void; /** * update props by id, equal 'portalController.updateProps(newProps)' */ updatePropsByID

(id: UniqID, propsOrHandler: UncontrolledProps

| UpdatePropsHandler

): void; protected onConnected(): void; protected onDisconnected(): void; private _openPortal; private createPortalDescriptor; }