import { inject } from 'readuz'; import { DIReader } from './common'; import { getCxf } from './helpers'; export type OpenDialog = (url: string) => void; export const openDialog: DIReader = inject( env => env.cxfProvider, env => env.config, (cxfProvider, {CXF_OPEN_DIALOG}) => (url) => { const cxf = getCxf(cxfProvider); cxf.emit(CXF_OPEN_DIALOG, url); }, );