import { RefObject } from "react"; import type { JBModalWebComponent, JBModalEventType } from 'jb-modal'; export type EventProps = { /** * when component loaded, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount */ onLoad?: (e: JBModalEventType) => void; /** * when all property set and ready to use, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount */ onInit?: (e: JBModalEventType) => void; onClose?: (e: JBModalEventType) => void; /** * when modal opened automatically by url hash (when element have id and url has #id) use this to update open state in parent component */ onUrlOpen?: (e: JBModalEventType) => void; }; export declare function useEvents(element: RefObject, props: EventProps): void;