import { ReactElement, ReactNode } from 'react'; import "reflect-metadata"; import { ApplicationErrorState } from '../interfaces'; /** * An HOC that will render components using SLOT-FILL in case of * backendError else it will render the Component Passed */ interface ApplicationErrorHandlerCommonProps { plugins: Record; children: ReactNode; } type IRendererComponentType = (props: { applicationErrors: ApplicationErrorState[]; backendError: ApplicationErrorState; }) => ReactElement; type IApplicationErrorSlotType = (props: { name: string; fillProps: { active: boolean; applicationErrors: ApplicationErrorState[]; }; }) => ReactElement; /** * ApplicationErrorSlot is needed for mobile. Since for mobile * we import Slot from @common-stack/react-mobile. The default * Slot under RenderApplicationErrorSlot works for browser * both ant and chakra * * @param FallbackComponent ReactNode * @param [ApplicationErrorSlot] IApplicationErrorSlotType * @param [RendererComponent] IRendererComponentType * @returns ReactNode */ export declare function ApplicationErrorHandlerCommon(FallbackComponent: any, ApplicationErrorSlot?: IApplicationErrorSlotType, RendererComponent?: IRendererComponentType): ({ plugins, children }: ApplicationErrorHandlerCommonProps) => ReactElement; export {}; //# sourceMappingURL=ApplicationErrorHandlerCommon.d.ts.map