import { render } from '@ablogcms/react-utils';
import Portal from '@ablogcms/components/portal';
import { ModalController } from '@ablogcms/modal';

export default function dispatchModal() {
  const element = document.createDocumentFragment();

  ModalController.openTrigger = '.js-acms-modal-open';
  ModalController.closeTrigger = '.js-acms-modal-close';

  render(
    <Portal>
      <ModalController />
    </Portal>,
    element
  );
}
