'use strict';

var vue = require('vue');
var core = require('@vueuse/core');

function usePageHtmlClass(classNames) {
  const addHtmlClasses = () => {
    const names = vue.isRef(classNames) ? classNames.value : classNames;
    if (names.length > 0) {
      document?.documentElement?.classList.add(...names);
    }
  };
  const removeHtmlClasses = () => {
    const names = vue.isRef(classNames) ? classNames.value : classNames;
    if (names.length > 0) {
      document?.documentElement?.classList.remove(...names);
    }
  };
  core.tryOnMounted(() => {
    addHtmlClasses();
  });
  core.tryOnUnmounted(() => {
    removeHtmlClasses();
  });
}

exports.usePageHtmlClass = usePageHtmlClass;
//# sourceMappingURL=index.js.map
