import React from "react";
export type CloseCb = {
    onClose: () => void;
    closeAllModal: () => void;
    modalId: number;
};
export type ModalType<TProps> = TProps extends void ? {
    component: React.FC<TProps & CloseCb>;
} : {
    component: React.FC<TProps & CloseCb>;
    props: TProps & {
        onClose?: () => void;
        closeAllModal?: () => void;
    };
};
export type ModalState = {
    stack: Array<ModalType<unknown> & {
        id: number;
    }>;
    closeId: number;
};
export declare enum ModalActions {
    PUSH_MODAL = "PUSH_MODAL",
    POP_MODAL = "POP_MODAL",
    REMOVE_MODAL = "REMOVE_MODAL",
    CLOSE_MODAL = "CLOSE_MODAL",
    RESET_MODAL = "RESET_MODAL"
}
type PUSH_MODAL<TProps> = {
    type: ModalActions.PUSH_MODAL;
    payload: ModalType<TProps>;
};
type POP_MODAL = {
    type: ModalActions.POP_MODAL;
};
type REMOVE_MODAL = {
    type: ModalActions.REMOVE_MODAL;
    id: number;
};
type CLOSE_MODAL = {
    type: ModalActions.CLOSE_MODAL;
    id: number;
};
type RESET_MODAL = {
    type: ModalActions.RESET_MODAL;
};
export type Actions = PUSH_MODAL<unknown> | POP_MODAL | REMOVE_MODAL | CLOSE_MODAL | RESET_MODAL;
export declare const initialModalState: ModalState;
export declare const modalReducer: (state: ModalState | undefined, action: Actions) => ModalState;
export interface IModalProps {
    [key: string]: Partial<{
        [key: string]: unknown;
    }>;
}
export type GetModalProps<K extends keyof IModalProps> = IModalProps[K] & CloseCb;
export {};
