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

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

  DrawerController.openTrigger = '.js-acms-drawer-open';
  DrawerController.closeTrigger = '.js-acms-drawer-close';

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