import { reactive, ref } from 'vue';
import { createComponent } from './createComponent.js';
import './ToolTip.vue.js';
import script from './ToolTip.vue2.js';

function useToolTip(target) {
  var offset = reactive({
    x: 0,
    y: 0
  });
  var content = ref(null);
  var hidden = ref(true);
  var _createComponent = createComponent(script, {
      offset: offset,
      content: content,
      hidden: hidden
    }, target),
    close = _createComponent.close,
    open = _createComponent.open;
  return {
    close: close,
    open: open,
    offset: offset,
    content: content,
    hidden: hidden
  };
}

export { useToolTip };
