import { modifier } from 'ember-modifier';

let counter = 0;
var openCollapsibleNav = modifier(function openCollapsibleNav(_, [navIsDocked]) {
  counter++;
  if (navIsDocked) {
    document.body.classList.add('euiBody--collapsibleNavIsDocked');
  }
  document.body.classList.add('euiBody--collapsibleNavIsOpen');
  return () => {
    counter--;
    if (!counter) {
      if (navIsDocked) {
        document.body.classList.remove('euiBody--collapsibleNavIsDocked');
      }
      document.body.classList.remove('euiBody--collapsibleNavIsOpen');
    }
  };
});

export { openCollapsibleNav as default };
//# sourceMappingURL=open-collapsible-nav.js.map
