import { DirectiveOptions, VNode } from 'vue';
import { DirectiveBinding } from 'vue/types/options';
import { itc } from './ibz-tooltip-controller';

/**
 * tooltip指令
 */
export const IBzTooltip: DirectiveOptions = {
  bind(el: HTMLElement, binding: DirectiveBinding, vNode: VNode) {
    itc.bind(el as HTMLDivElement, binding, vNode);
  },
  unbind(el: HTMLElement, binding: DirectiveBinding, vNode: VNode) {
    itc.unbind(el as HTMLDivElement, binding, vNode);
  },
};
