@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
20 lines (19 loc) • 688 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { NewReportWizard } from './NewReportWizard';
import { ScheduledReportWizard } from './ScheduledReportWizard';
const isScheduledReportWizard = (props) => {
if (props.popupParams?.action === 'NewSchedule') {
return true;
}
if (props.data != null && 'Schedule' in props.data) {
return true;
}
return props.abObjectType?.name === 'Schedule';
};
export const ExportPopupWizardRouter = (props) => {
if (isScheduledReportWizard(props)) {
const scheduleProps = props;
return _jsx(ScheduledReportWizard, { ...scheduleProps });
}
return _jsx(NewReportWizard, { ...props });
};