import tippy from 'tippy.js';
import '../assets/scss/directives/tooltip.scss';

export default {
  bind(el, { value, modifiers }) {
    if (value === null) {
      return;
    }
    tippy(el, {
      content: value,
      allowHTML: true,
      theme: 'itfin',
      interactive: true,
      delay: 500,
      placement: 'top-start',
      appendTo: document.body,
    });
  },
};
